Channel Creation Issue In ARI

Home » Asterisk Users » Channel Creation Issue In ARI
Asterisk Users 7 Comments

Hi Team,

We tried to run 200 channels parallel for 2 hour and found that in some cases (very frequently), “create channel rest api” takes more than 5
seconds to respond. Which causes a queue at the application end. What is the reason for that behaviour?

Environment:

VM Configurations Operating System : CentOS Linux release 7.9.2009
CPU : 8 core Memory : 16 GB ram Application : Java

Thanks Tejveer Sharma

7 thoughts on - Channel Creation Issue In ARI

  • Define “200 channels parallel”. How many are you creating at once? There are things which inherently make things non-parallelize during certain operations, such as channel creation.

  • Hi Joshua C. Colp,

    We try to run load through our java application , In which we create a channel and make an outbound call (using SIPPI client for testing), after the call answer a prompt is played and then execute the disconnect channel
    . This all takes almost 10-15 seconds. Application makes sure not more than
    200 outbound calls will be in the system at any given time. In the starting channel creation is quite fast but over some period of time it got stable. Even in stable scenario channel creation rest api calls using ARI take almost 5 to 6 seconds to create a channel and return back channel id.

    Thanks Tejveer Sharma

  • That’s not really sufficient, still. What does “try to run load” mean? How many simultaneous calls are you trying to create? How many are hanging up at the same time? Are these all in the same application? Is the application reusing the same HTTP connection so requests have to wait as well?

  • 200 simultaneous calls we are trying to create . There is a single application. We have a Http connection pool for connectivity.
    50 channels are hanging up and 50 channels creation happens at the same time.

    Thanks Tejveer Sharma

  • There would be a bottleneck somewhere there, as channels are being destroyed/created near the same time. You’d need to do performance testing of Asterisk and isolate specific areas for your usage.

  • Hi Joshua,

    Thanks for your response.

    I am actually trying to do performance testing of Asterisk and trying to identify where the bottleneck is. And that is how we reached this simplistic scenario where the “issue” is reproduced. Here, the total channels never go beyond 200 but we are simulating a dialer application where 50% calls are not answered (routing failures, invalid number, network failure etc.) and hence the channel creation/destruction rate is high.

    As per your comment, it seems that high rate of channel creation/destruction might be the culprit. Our observation is that at this high rate (~30 channel create/delete per second), a few CreateChannel requests take more than 5 seconds while the others are served with a decent response time of ~15ms.

    Is there a known limit for how much channel creation rate Asterisk can support? It will help me in debugging my configuration. Do you think the queue might be building up in Asterisk as the Stassis application tries to send responses/events to the ARI application?

    I couldn’t find much material on pointers to debug this kind of configuration and any pointers to literature of any kind is much appreciated.

    Thanks

    Tejveer Sharma

  • There is no “known limit”, and such a limit would also depend on other variables such as the system itself. There is also no material on how to debug such a thing because generally you have to examine the complete code path, profile it, and have an understanding of the complete thing to know where issues may occur. I haven’t done profiling of this so I don’t know the areas with any certainty of where there may be bottlenecks. I can only guess.