I am trying to use Call File on Asterisk by providing ~/.call in my /lib/spool/asterisk/outgoing directory, but my goal is to test how many channels my Asterisk server can handle by providing virtual endpoints to make it similar to real scenario. I can test bulk calls using my stasis application but the problem is I get the events as one channel ringing and the rest will all be busy. Please tell me if my call file can achieve bulk calls on asterisk server.
Hello Amin,
I am not sure perhaps you can check the NAT configuration. May be in pjsip.conf you have to enable rewrite_contact =yes and ice =yes in the endpoints.
I don’t really understand what you mean by virtual channel.
In most cases the Asterisk daemon is limited by media rather than signalling, so if a virtual channel doesn’t have media, it is not a good test.
Why are you including a 3 second wit after a failed call? I’m wondering if you think that Dial exits as soon as dialing ends; it actually continues until one party hangs up, or the call fails. In the former case, unless specific options are set, it “returns non-zero” which causes the dialplan interpreter to stop.
My friend told me that using call files you can call as many endpoints as you like, even if they are not configured on pjsip.conf, this way we consider them as virtual endpoints and we can test how many channels are opening on my Asterisk server.
Thank you for your clarification @david551 regarding using PJSIP for callfiles. I assume I cannot test my server unless I use SIPP performance tool as stress testing my asterisk server is a major concern. My issue here is that I am trying to originate 2000 calls to my stasis application to make it similar to real life scenario but I am receiving the events one-by-one which is unlikely the case when the server is in production. I am expecting the calls or the events to process altogether and not receive them one-by-one. Please bear with me while I explain more in depth using an example:
As you can see the Channels are coming one-by-one and not altogether, that is why I need a test that can confirm that all calls that come through my stasis application and asterisk server arrive at the same time to test if my server can handle the traffic, keep in mind that here I am calling one endpoint on one phone
Here is the API that I am hitting to achieve this if it helps:
While testing with SIPP tool i noticed that there are active calls on my Asterisk server which I assume it can be a functional test for my server in terms of traffic load, here are the results:
PJSIP/sipp-00000187 700@sipp:1 Ring MusicOnHold()
PJSIP/sipp-00000180 700@sipp:1 Ring MusicOnHold()
950 active channels
950 of 1000 max active calls (95.00% of capacity)
950 calls processed
------------------------------ Scenario Screen -------- [1-9]: Change Screen –
Call-rate(length) Port Total-time Total-calls Remote-host
10.0(5000000 ms)/1.000s 5061 356.89 s 950 10.321.45.123:5120(UDP)
0 new calls during 1.007 s period 0 ms scheduler resolution
950 calls (limit 950) Peak was 950 calls, after 95 s
1 Running, 951 Paused, 3 Woken up
0 dead call msg (discarded) 0 out-of-call msg (discarded)
3 open sockets
0 Total echo RTP pckts 1st stream 0.000 last period RTP rate (kB/s)
0 Total echo RTP pckts 2nd stream 0.000 last period RTP rate (kB/s)
You can get different RTP files : https://mpbx.a4business.com/pcap.tgz ,
which I’ve found and converted from wav using wav2rtp cli app.
( concatenate files to get longer duration )
This part of scenario makes the streaming of RTP :
To start just one call for test, with certain CallerID and destination
number, I used info files, and run it with command:
where 192.168.1.11 - remote asterisk server.
-s 123456 - CallerID number
-recv_timeout - SIPP send call, and giving up if no answer during
first 5 sec
-d : max call duration of connected call./
The file cli/986533.csv has only two lines, and used in scenario as field0
( thats the only way to put Source Caller ID which I’ve found for sipp )
RANDOM
986533
it was required to get a real duration of the call once it completed ( if
not connected - return 0 ), for billing. so this just a part of all script
which I’ve made for it.
The “bottle-neck” was how many connection per second asterisk is able to
accept.
i,e. if I generate longer duration calls ( 5 minutes ), 10 new call per
second - it could grow up to max 3000 concurrent calls on 1GB NIC card , it
made almost 250MBit/s of one way traffic (from sipp to asterisk ) .
if generate 20 calls per second, with 2m duration, asterisk dies (core
dump) after ~1000 concurrent calls ( while max should be 2400 with this
call rate!!)
Sorry for late reply but here are my results with sending calls RTP media. I assume I can conclude that my personal machine can hold up to 20 calls maximum?
[rtp]
exten => 700,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
core show channels:
Channel Location State Application(Data)
PJSIP/sipp-00000573 700@rtp:1 Up Answer()
PJSIP/sipp-00000572 700@rtp:1 Up Answer()
PJSIP/sipp-00000571 700@rtp:1 Up Answer()
PJSIP/sipp-00000570 700@rtp:1 Up Answer()
PJSIP/sipp-00000568 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000569 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000566 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000567 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000564 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000565 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000562 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000563 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-00000561 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-0000056f 700@rtp:1 Up Answer()
PJSIP/sipp-0000056d 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-0000056e 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-0000056b 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-0000056c 700@rtp:2 Up Playback(hello-world)
PJSIP/sipp-0000056a 700@rtp:2 Up Playback(hello-world)
19 active channels
19 of 1000 max active calls ( 1.90% of capacity)
1794 calls processed
Sipp:
------------------------------ Scenario Screen -------- [1-9]: Change Screen –
Call-rate(length) Port Total-time Total-calls Remote-host
10.0(5000000 ms)/1.000s 5061 179.35 s 1793 (UDP)
10 new calls during 1.002 s period 0 ms scheduler resolution 19 calls (limit 950) Peak was 20 calls, after 2 s
1 Running, 20 Paused, 4 Woken up
0 dead call msg (discarded) 0 out-of-call msg (discarded)
3 open sockets
111938 Total RTP pckts sent 157.942 last period RTP rate (kB/s)