I have a strange issue when some calls have 10-15 seconds until Asterisk is sending INVITE to the peer.
The problem is not permanently, few calls are working fine, and then 1-2 calls are with delay.
For ex. one call with delay:
CLI> pjsip show history
00003 1552335791 * <== 192.168.2.200:56089 INVITE sip:11@192.168.2.1 SIP/2.0
00004 1552335791 * ==> 192.168.2.200:56089 SIP/2.0 100 Trying
00009 1552335800 * ==> 192.168.2.200:14106 INVITE sip:11@192.168.2.200:14106 SIP/2.0
00010 1552335800 * <== 192.168.2.200:14106 SIP/2.0 100 Trying
00011 1552335800 * <== 192.168.2.200:14106 SIP/2.0 180 Ringing
00012 1552335800 * ==> 192.168.2.200:56089 SIP/2.0 180 Ringing
As you can see there is 9 seconds delay, until * is sending INVITE to the peer. This is what I get in debug logs (IP Address and domain are obfuscated):
[2019-03-11 20:23:11.160] DEBUG[13500] res_pjsip_session.c: Negotiating incoming SDP media stream ‘audio’ using audio SDP handler
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: Splitting ‘192.168.2.250’ into…
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: …host ‘192.168.2.250’ and port ‘’.
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: Splitting ‘0.0.0.0’ into…
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: …host ‘0.0.0.0’ and port ‘’.
[2019-03-11 20:23:11.160] DEBUG[13500] res_pjsip_sdp_rtp.c: Transport transport-udp bound to 0.0.0.0: Using it for RTP media.
[2019-03-11 20:23:11.160] DEBUG[13500] rtp_engine.c: Using engine ‘asterisk’ for RTP instance ‘0x7faf0c06fb70’
[2019-03-11 20:23:11.160] DEBUG[13500] res_rtp_asterisk.c: Allocated port 14788 for RTP instance ‘0x7faf0c06fb70’
[2019-03-11 20:23:11.160] DEBUG[13500] res_rtp_asterisk.c: Creating ICE session 0.0.0.0:14788 (14788) for RTP instance ‘0x7faf0c06fb70’
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: Splitting ‘192.168.2.1’ into…
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: …host ‘192.168.2.1’ and port ‘’.
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: Splitting ‘192.168.2.1’ into…
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: …host ‘192.168.2.1’ and port ‘’.
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: Splitting ‘1.2.3.4’ into…
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: …host ‘1.2.3.4’ and port ‘’.
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: Splitting ‘1.2.3.4’ into…
[2019-03-11 20:23:11.160] DEBUG[13500] netsock2.c: …host ‘1.2.3.4’ and port ‘’.
[2019-03-11 20:23:20.161] DEBUG[13500] rtp_engine.c: RTP instance ‘0x7faf0c06fb70’ is setup and ready to go
[2019-03-11 20:23:20.161] DEBUG[13500] netsock2.c: Splitting ‘pbx.company.com’ into…
[2019-03-11 20:23:20.161] DEBUG[13500] netsock2.c: …host ‘pbx.company.com’ and port ‘’.
[2019-03-11 20:23:20.163] DEBUG[13500] acl.c: Multiple addresses. Using the first only
[2019-03-11 20:23:20.163] DEBUG[13500] res_rtp_asterisk.c: Setup RTCP on RTP instance ‘0x7faf0c06fb70’
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Setting tx payload type 8 based on m type on 0x7faf423ec2b0
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Setting tx payload type 0 based on m type on 0x7faf423ec2b0
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Crossover copying tx to rx payload mapping 0 (0x7faf0c064018) from 0x7faf423ec2b0 to 0x7faf423ec2b0
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Crossover copying tx to rx payload mapping 8 (0x7faf0c0125a8) from 0x7faf423ec2b0 to 0x7faf423ec2b0
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Crossover copying tx to rx payload mapping 101 (0x7faf0c064068) from 0x7faf423ec2b0 to 0x7faf423ec2b0
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Crossover copying tx to rx payload mapping 123 (0x7faf0c0640b8) from 0x7faf423ec2b0 to 0x7faf423ec2b0
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying rx payload mapping 0 (0x7faf0c064018) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying rx payload mapping 8 (0x7faf0c0125a8) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying rx payload mapping 101 (0x7faf0c064068) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying rx payload mapping 123 (0x7faf0c0640b8) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying tx payload mapping 0 (0x7faf0c064018) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying tx payload mapping 8 (0x7faf0c0125a8) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying tx payload mapping 101 (0x7faf0c064068) from 0x7faf423ec2b0 to 0x7faf0c06fd48
[2019-03-11 20:23:20.163] DEBUG[13500] rtp_engine.c: Copying tx payload mapping 123 (0x7faf0c0640b8) from 0x7faf423ec2b0 to 0x7faf0c06fd48
I’m using pjsip transport and UDP protocol. All peers are saved in realtime database.
It’s something wrong with rtp engine?
pjsip show endpoint 16
rtp_engine : asterisk
pbx1*CLI> core show settings
PBX Core settings
-----------------
Version: 16.2.1
Build Options: BUILD_NATIVE, OPTIONAL_API
Thank you.