Asterisk performance on multiple calls

I have a setup in which I use asterisk [ Elastix 4 ] as relay , which means that I have a soft switch that redirect certain numbers to Elastix , and there I use inbound routes and miscellaneous destination to substitute the number with an actual number , like Toll Free Numbers , and these real numbers have IVR as an automated answer , I have noticed that after some number of concurrent calls that the IVR heard by the customer skipped [ trimmed from the start in about 3 - 5 seconds from the IVR ] ,

so if the IVR for instance say : Welcome To Company X , Press 1 to inquiry , …

caller # 7 or #10 [ Random ] might hear , Press 2 as a start when calling the number ,

My Setup is on VM Machine [ 8GB Ram , 8 Cores (Intel® Xeon® CPU E5-4640 v4 @ 2.10GHz) ]

approciate the help , in pointing how can I check where the delay could happen [ and if there is anything that I could do to trouble shoot the problem from asterisk side , ]

I have tried to do tcpdump to capture everything [sip and rtp ] but I could not capture the audio from there to check if the problem from the switch side or not

Regards,

Can you confirm that all 8 cores are dedicated to the one VM and not used by other machines on the host? Otherwise the number of cores is not particularly useful.

tcpdump will capture the audio, if it is reaching the box on which it is running. However you may well find that problem is the network dropping a signalling packet (the 200 OK).

I’d also consider disabling nat=comedia, if possible for your system, as that will prevent Asterisk from sending media until it has received media.

as for the cores according to the system and VM settings yes 8 cores dedicated , sip configuration for outgoing are :
host=XXX.XXX.XXX.XXX
type=peer
disallow=all
allow=g729&alaw&ulaw
dtmfmode=rfc2833
nat=no
qualify=no
context=from-pstn
sendrpid=no
srvlookup=no
progressinband=yes
autoframing=yes
canreinvite=no
tos=lowdelay

incoming :
disallow=all
allow=g729&alaw&ulaw
context=from-pstn
dtmfmode=rfc2833
insecure=port,invite
nat=no
canreinvite=no
qualify=no
tos=lowdelay
type=peer
fromdomain=XXX.XXX.XXX.XXX
host=XXX.XXX.XXX.XXX
sendrpid=no
trustrpid=yes
srvlookup=no
progressinband=yes
autoframing=yes

Some of my response assumes chan_sip, but I don’t think you say anything that indicates it is even SIP, let alone which SIP channel driver.

yes it is SIP Trunk , with genband switch Q10

chan_sip or chan_pjsip?

yes chan_sip , and the setup is done from elastix GUI

I believe that Elastix is a dead product. In any case, no GUI’s are supported here, so you need to think in terms of debugging this at a lower level.

You certainly want sip debugging on and verbosity and debug levels at at least five, so you can see what Asterisk thinks it is doing.

yes, I get that no GUI , but I was explaining how I defined the sip , but in any case , I have check the asterisk logs , it seems good , but , I was looking for a way on how to do tcpdump and get the audio for the call but so far I could not get the audio to work on wireshark to test if the audio that was sent to asterisk [ was already skipping the missing part of the IVR ] , I you would like I could post the logs , but as I told you , random , and no pattern that can be followed to produce it , just for high usage

wireshark should show the audio.

What you are looking for on the logs are messages abut retransmissions and about probation passing on the media.

here is a sample of what I look for [ after the following lines the call should start ]

Using SIP RTP CoS mark 5
– Called SIP/1700_CS2K_Out/1800022945096
> 0x7fbe58143bd0 – Probation passed - setting RTP source address to [SPCIP]:22596
– SIP/1700_CS2K_Out-00001a6d answered SIP/1700_CS2K_In-00001a6c
> 0x7fbe58143bd0 – Probation passed - setting RTP source address to [SPCIP]:22596
> 0x7fbed43a91a0 – Probation passed - setting RTP source address to [SPCIP]:22592

You need to take these from the logs, not form a screen scrape, as the important thing is the timing of these messages in relation to the Playback.

you mean I should take these from /var/log/asterisk/full ???

[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: 0x7fbe1c1c20b0 – Probation learning mode pass with source address [SPCIP]:45824
[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: Ooh, format changed from unknown to g729
[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: Created smoother: format: g729 ms: 20 len: 20
[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: Starting RTCP transmission on RTP instance ‘0x7fbed40b4bc8’
[2017-12-10 14:21:41] DEBUG[3766] chan_sip.c: = Looking for Call ID: 1636164-3721904500-186642@SBC01 (Checking From) --From tag 3721904500-186646 --To-tag as483acfdb
[2017-12-10 14:21:41] DEBUG[3766][C-00000faf] chan_sip.c: **** Received ACK (6) - Command in SIP ACK
[2017-12-10 14:21:41] DEBUG[3766][C-00000faf] chan_sip.c: Stopping retransmission on ‘1636164-3721904500-186642@SBC01’ of Response 1: Match Found
[2017-12-10 14:21:41] DEBUG[62219][C-00000f82] res_rtp_asterisk.c: Got RTCP report of 84 bytes
[2017-12-10 14:21:41] DEBUG[55784][C-00000f11] res_rtp_asterisk.c: Got RTCP report of 84 bytes
[2017-12-10 14:21:41] DEBUG[49808][C-00000ecc] res_rtp_asterisk.c: Got RTCP report of 84 bytes
[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: 0x7fbed41e92d0 – Probation learning mode pass with source address 82.213.25.241:45820
[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: Ooh, format changed from unknown to g729
[2017-12-10 14:21:41] DEBUG[63601][C-00000faf] res_rtp_asterisk.c: Created smoother: format: g729 ms: 20 len: 20

Do the spawns for the Playback follow this?

Also, I generally find you need to configure the logs for 1ms resolution on the timestamps, as a lot can happen in a second.

side question how can I change the period ??

If you mean the resolution, it is set in logger.conf.

Hello , I have configured it inside logger_general_custom.conf and logger_logfiles_custom.conf
as dateformat = %F %T.%3q