Actually, our Asterisk is on a public IP so there should be no domain resolution issues involved. I still don’t understand why Linphone act as a server only while Asterisk has to be both client and server. Is it by design?
Here’s the log [part 1] in which peer C is trying to call peer A who is busy:
<------------->
[2017-08-12 11:15:04] VERBOSE[15018] chan_sip.c:
<--- SIP read from UDP:XXX.XXX.XXX.YYY:52589 --->
INVITE sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP SIP/2.0
v: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;rport;branch=z9hG4bKPjeb151a3b-984b-4ee0-9029-8d5d8ba6eafe
Max-Forwards: 70
f: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
t: sip:PEERA@XXX.XXX.XXX.XXX
m: <sip:PEERC@XXX.XXX.XXX.YYY:52589;ob>
i: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
CSeq: 26212 INVITE
k: replaces, 100rel, timer, norefersub
x: 1800
Min-SE: 90
User-Agent: Test Android 2.6
c: application/sdp
l: 483
v=0
o=- 3711518103 3711518103 IN IP4 XXX.XXX.XXX.ZZZ
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 40923 RTP/AVP 99 98 9 104 97 3 18 8 0 96
c=IN IP4 XXX.XXX.XXX.ZZZ
b=TIAS:64000
b=RS:0
b=RR:0
a=sendrecv
a=rtpmap:99 speex/32000
a=rtpmap:98 speex/16000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:97 speex/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ice-ufrag:3f5c529c
a=ice-pwd:2873b448
a=candidate:Hac100e27 1 UDP 2130706431 XXX.XXX.XXX.ZZZ 40923 typ host
<------------->
<--- Reliably Transmitting (NAT) to XXX.XXX.XXX.YYY:52589 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;branch=z9hG4bKPjeb151a3b-984b-4ee0-9029-8d5d8ba6eafe;received=XXX.XXX.XXX.YYY;rport=52589
From: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
To: sip:PEERA@XXX.XXX.XXX.XXX;tag=as7b4e129b
Call-ID: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
CSeq: 26212 INVITE
Server: Asterisk PBX 13.1.0~dfsg-1.1ubuntu4.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6e1febf8"
Content-Length: 0
<------------>
[2017-08-12 11:15:04] DEBUG[15018][C-0000004a] chan_sip.c: *** SIP TIMER: Initializing retransmit timer on packet: Id #986
[2017-08-12 11:15:04] DEBUG[15018][C-0000004a] chan_sip.c: Trying to put 'SIP/2.0 401' onto UDP socket destined for XXX.XXX.XXX.YYY:52589
[2017-08-12 11:15:04] VERBOSE[15018][C-0000004a] chan_sip.c: Scheduling destruction of SIP dialog '64b5f9a6-0b7e-4a38-a37d-747005234d5b' in 32000 ms (Method: INVITE)
[2017-08-12 11:15:05] VERBOSE[15018] chan_sip.c:
<--- SIP read from UDP:XXX.XXX.XXX.YYY:52589 --->
ACK sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP SIP/2.0
v: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;rport;branch=z9hG4bKPjeb151a3b-984b-4ee0-9029-8d5d8ba6eafe
Max-Forwards: 70
f: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
t: sip:PEERA@XXX.XXX.XXX.XXX;tag=as7b4e129b
i: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
CSeq: 26212 ACK
l: 0
<------------->
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 0 [ 56]: ACK sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP SIP/2.0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 1 [ 94]: v: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;rport;branch=z9hG4bKPjeb151a3b-984b-4ee0-9029-8d5d8ba6eafe
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 2 [ 16]: Max-Forwards: 70
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 3 [ 69]: f: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 4 [ 43]: t: sip:PEERA@XXX.XXX.XXX.XXX;tag=as7b4e129b
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 5 [ 39]: i: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 6 [ 15]: CSeq: 26212 ACK
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 7 [ 4]: l: 0
[2017-08-12 11:15:05] VERBOSE[15018] chan_sip.c: --- (8 headers 0 lines) ---
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: = Looking for Call ID: 64b5f9a6-0b7e-4a38-a37d-747005234d5b (Checking From) --From tag e0372590-c4bb-4909-a156-0f83642b5f78 --To-tag as7b4e129b
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: **** Received ACK (6) - Command in SIP ACK
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: ** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #986
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Stopping retransmission on '64b5f9a6-0b7e-4a38-a37d-747005234d5b' of Response 26212: Match Found
[2017-08-12 11:15:05] VERBOSE[15018] chan_sip.c:
<--- SIP read from UDP:XXX.XXX.XXX.YYY:52589 --->
INVITE sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP SIP/2.0
v: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;rport;branch=z9hG4bKPjebe22132-52e8-4140-8364-a4fcaa8015f0
Max-Forwards: 70
f: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
t: sip:PEERA@XXX.XXX.XXX.XXX
m: <sip:PEERC@XXX.XXX.XXX.YYY:52589;ob>
i: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
CSeq: 26213 INVITE
k: replaces, 100rel, timer, norefersub
x: 1800
Min-SE: 90
User-Agent: Test Android 2.6
Authorization: Digest username="PEERC", realm="asterisk", nonce="6e1febf8", uri="sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP", response="367d0b1bf0108f6cec253a668268b9c1", algorithm=MD5
c: application/sdp
l: 483
v=0
o=- 3711518103 3711518103 IN IP4 XXX.XXX.XXX.ZZZ
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 40923 RTP/AVP 99 98 9 104 97 3 18 8 0 96
c=IN IP4 XXX.XXX.XXX.ZZZ
b=TIAS:64000
b=RS:0
b=RR:0
a=sendrecv
a=rtpmap:99 speex/32000
a=rtpmap:98 speex/16000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:97 speex/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ice-ufrag:3f5c529c
a=ice-pwd:2873b448
a=candidate:Hac100e27 1 UDP 2130706431 XXX.XXX.XXX.ZZZ 40923 typ host
<------------->
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 0 [ 59]: INVITE sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP SIP/2.0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 1 [ 94]: v: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;rport;branch=z9hG4bKPjebe22132-52e8-4140-8364-a4fcaa8015f0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 2 [ 16]: Max-Forwards: 70
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 3 [ 69]: f: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 4 [ 28]: t: sip:PEERA@XXX.XXX.XXX.XXX
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 5 [ 42]: m: <sip:PEERC@XXX.XXX.XXX.YYY:52589;ob>
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 6 [ 39]: i: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 7 [ 18]: CSeq: 26213 INVITE
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 8 [ 38]: k: replaces, 100rel, timer, norefersub
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 9 [ 7]: x: 1800
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 10 [ 10]: Min-SE: 90
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 11 [ 32]: User-Agent: Test Android 2.6
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 12 [190]: Authorization: Digest username="PEERC", realm="asterisk", nonce="6e1febf8", uri="sip:PEERA@XXX.XXX.XXX.XXX:5060;transport=UDP", response="367d0b1b845d8f6cec253a668268b9c1", algorithm=MD5
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 13 [ 18]: c: application/sdp
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 14 [ 6]: l: 483
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Header 15 [ 0]:
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 0 [ 3]: v=0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 1 [ 45]: o=- 3711518103 3711518103 IN IP4 XXX.XXX.XXX.ZZZ
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 2 [ 9]: s=pjmedia
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 3 [ 7]: b=AS:84
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 4 [ 5]: t=0 0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 5 [ 9]: a=X-nat:0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 6 [ 48]: m=audio 40923 RTP/AVP 99 98 9 104 97 3 18 8 0 96
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 7 [ 21]: c=IN IP4 XXX.XXX.XXX.ZZZ
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 8 [ 12]: b=TIAS:64000
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 9 [ 6]: b=RS:0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 10 [ 6]: b=RR:0
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 11 [ 10]: a=sendrecv
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 12 [ 23]: a=rtpmap:99 speex/32000
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 13 [ 23]: a=rtpmap:98 speex/16000
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 14 [ 22]: a=rtpmap:104 iLBC/8000
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 15 [ 18]: a=fmtp:104 mode=30
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 16 [ 22]: a=rtpmap:97 speex/8000
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 17 [ 32]: a=rtpmap:96 telephone-event/8000
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 18 [ 14]: a=fmtp:96 0-16
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 19 [ 20]: a=ice-ufrag:3f5c529c
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 20 [ 18]: a=ice-pwd:2873b448
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: Body 21 [ 66]: a=candidate:Hac100e27 1 UDP 2130706431 XXX.XXX.XXX.ZZZ 40923 typ host
[2017-08-12 11:15:05] VERBOSE[15018] chan_sip.c: --- (15 headers 22 lines) ---
[2017-08-12 11:15:05] DEBUG[15018] chan_sip.c: = Looking for Call ID: 64b5f9a6-0b7e-4a38-a37d-747005234d5b (Checking From) --From tag e0372590-c4bb-4909-a156-0f83642b5f78 --To-tag
[2017-08-12 11:15:05] DEBUG[15018] netsock2.c: Splitting 'XXX.XXX.XXX.XXX:5060' into...
[2017-08-12 11:15:05] DEBUG[15018] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port '5060'.
[2017-08-12 11:15:05] DEBUG[15018] netsock2.c: Splitting 'XXX.XXX.XXX.XXX:5060' into...
[2017-08-12 11:15:05] DEBUG[15018] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port '5060'.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: **** Received INVITE (5) - Command in SIP INVITE
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.YYY:52589' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.YYY' and port '52589'.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Sending to XXX.XXX.XXX.YYY:52589 (NAT)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Initializing initreq for method INVITE - callid 64b5f9a6-0b7e-4a38-a37d-747005234d5b
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Using INVITE request as basis request - 64b5f9a6-0b7e-4a38-a37d-747005234d5b
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.XXX' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port ''.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found peer 'PEERC' for 'PEERC' from XXX.XXX.XXX.YYY:52589
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Using engine 'asterisk' for RTP instance '0x7fde8c099988'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Allocated port 14316 for RTP instance '0x7fde8c099988'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: icess0x7fde8c0 ICE session created, comp_cnt=2, role is Unknown agent
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.XXX' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port ''.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: icess0x7fde8c0 Candidate 0 added: comp_id=1, type=host, foundation=H95051561, addr=XXX.XXX.XXX.XXX:14316, base=XXX.XXX.XXX.XXX:14316, prio=0x7effffff (2130706431)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: RTP instance '0x7fde8c099988' is setup and ready to go
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: icess0x7fde8c0 Destroying ICE session 0x7fde8c057f08
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stuse0x7fde8c0 STUN session 0x7fde8c087fc8 destroy request, ref_cnt=4
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stuse0x7fde8c0 STUN session 0x7fde8c0ba348 destroy request, ref_cnt=3
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: ice_session.c ICE session 0x7fde8c057f08 destroyed
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stun_session.c STUN session 0x7fde8c087fc8 destroyed
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stun_session.c STUN session 0x7fde8c0ba348 destroyed
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Using engine 'asterisk' for RTP instance '0x7fde8c002ba8'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Allocated port 18826 for RTP instance '0x7fde8c002ba8'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: icess0x7fde8c0 ICE session created, comp_cnt=2, role is Unknown agent
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.XXX' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port ''.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: icess0x7fde8c0 Candidate 0 added: comp_id=1, type=host, foundation=H95051561, addr=XXX.XXX.XXX.XXX:18826, base=XXX.XXX.XXX.XXX:18826, prio=0x7effffff (2130706431)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: RTP instance '0x7fde8c002ba8' is setup and ready to go
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: icess0x7fde8c0 Destroying ICE session 0x7fde8c057f08
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stuse0x7fde8c0 STUN session 0x7fde8c0889c8 destroy request, ref_cnt=4
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stuse0x7fde8c0 STUN session 0x7fde8c046f28 destroy request, ref_cnt=3
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: ice_session.c ICE session 0x7fde8c057f08 destroyed
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stun_session.c STUN session 0x7fde8c0889c8 destroyed
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] pjsip: stun_session.c STUN session 0x7fde8c046f28 destroyed
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Setup RTCP on RTP instance '0x7fde8c002ba8'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Setup RTCP on RTP instance '0x7fde8c099988'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Setting NAT on RTP to On
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Setting NAT on VRTP to On
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing session-level SDP v=0... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing session-level SDP o=- 3711518103 3711518103 IN IP4 XXX.XXX.XXX.ZZZ... OK.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing session-level SDP s=pjmedia... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing session-level SDP b=AS:84... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing session-level SDP t=0 0... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing session-level SDP a=X-nat:0... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 99
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 99 (0x7fde8c0c0508) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 98
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 98 (0x7fde8c0c0d48) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 9
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 9 (0x7fde8c0c1588) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 104
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 104 (0x7fde8c0a5e38) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 97
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 97 (0x7fde8c0a6678) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 3
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 3 (0x7fde8c0a6eb8) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 18
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 18 (0x7fde8c0a76f8) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 8 (0x7fde8c0a7f38) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 0
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 0 (0x7fde8c0a8a38) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found RTP audio format 96
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Setting payload 96 (0x7fde8c0a9278) based on m type on 0x7fde5e88bbf0
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.ZZZ' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.ZZZ' and port ''.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP c=IN IP4 XXX.XXX.XXX.ZZZ... OK.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP b=TIAS:64000... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP b=RS:0... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP b=RR:0... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=sendrecv... OK.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found audio description format speex for ID 99
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:99 speex/32000... OK.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found audio description format speex for ID 98
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:98 speex/16000... OK.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found audio description format iLBC for ID 104
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:104 iLBC/8000... OK.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=fmtp:104 mode=30... OK.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found audio description format speex for ID 97
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:97 speex/8000... OK.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Found audio description format telephone-event for ID 96
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:96 telephone-event/8000... OK.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=fmtp:96 0-16... UNSUPPORTED OR FAILED.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=ice-ufrag:3f5c529c... OK.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=ice-pwd:2873b448... OK.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.ZZZ' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.ZZZ' and port ''.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Processing media-level (audio) SDP a=candidate:Hac100e27 1 UDP 2130706431 XXX.XXX.XXX.ZZZ 40923 typ host... OK.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Capabilities: us - (speex|ilbc|g722|g729|h264), peer - audio=(ulaw|gsm|alaw|g722|g729|speex|speex16|speex32|ilbc)/video=(nothing)/text=(nothing), combined - (speex|ilbc|g722|g729)
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Setting RTCP address on RTP instance '0x7fde8c099988'
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Peer audio RTP is at port XXX.XXX.XXX.ZZZ:40923
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 0 (0x7fde8c0a8a38) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 3 (0x7fde8c0a6eb8) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 8 (0x7fde8c0a7f38) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 9 (0x7fde8c0c1588) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 18 (0x7fde8c0a76f8) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 96 (0x7fde8c0a6678) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 97 (0x7fde8c0a5e38) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 98 (0x7fde8c0c0508) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 99 (0x7fde8c08ac68) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] rtp_engine.c: Copying payload 104 (0x7fde8c0c0d48) from 0x7fde5e88bbf0 to 0x7fde8c099ac8
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Ignoring duplicate RTCP property on RTP instance '0x7fde8c099988'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_rtp_asterisk.c: Setting RTCP address on RTP instance '0x7fde8c002ba8'
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Peer doesn't provide video
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: We're settling with these formats: (speex|ilbc|g722|g729)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Checking SIP call limits for device PEERC
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Updating call counter for incoming call
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Call from peer 'PEERC' is 1 out of 2147483647
[2017-08-12 11:15:05] DEBUG[14986] devicestate.c: No provider found, checking channel drivers for SIP - PEERC
[2017-08-12 11:15:05] DEBUG[14986] chan_sip.c: Checking device state for peer PEERC
[2017-08-12 11:15:05] DEBUG[14986] devicestate.c: Changing state for SIP/PEERC - state 2 (In use)
[2017-08-12 11:15:05] DEBUG[15052] app_queue.c: Device 'SIP/PEERC' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.XXX:5060' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port ''.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: Splitting 'XXX.XXX.XXX.XXX' into...
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] netsock2.c: ...host 'XXX.XXX.XXX.XXX' and port ''.
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c: Looking for PEERA in sip-ctx (domain XXX.XXX.XXX.XXX)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_config_mysql.c: MySQL RealTime: Connection okay.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten = 'PEERA' AND priority = '1' AND context = 'sip-ctx'
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Incoming INVITE with 'timer' option supported
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: INVITE also has "Session-Expires" header.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Session-Expires: 1800
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: INVITE also has "Min-SE" header.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Received Min-SE: 90
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: *** Our native formats are (speex)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: *** Joint capabilities are (speex|ilbc|g722|g729)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: *** Our capabilities are (speex|ilbc|g722|g729|h264)
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: *** AST_CODEC_CHOOSE formats are speex
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: This channel can handle video! HOLLYWOOD next!
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_config_mysql.c: MySQL RealTime: Connection okay.
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten = 'PEERA' AND priority = '1' AND context = 'sip-ctx'
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] sip/route.c: sip_route_dump: route/path hop: <sip:PEERC@XXX.XXX.XXX.YYY:52589;ob>
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: SIP/PEERC-0000002f: New call is still down.... Trying...
[2017-08-12 11:15:05] VERBOSE[15018][C-0000004a] chan_sip.c:
<--- Transmitting (NAT) to XXX.XXX.XXX.YYY:52589 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP XXX.XXX.XXX.YYY:52589;branch=z9hG4bKPjebe22132-52e8-4140-8364-a4fcaa8015f0;received=XXX.XXX.XXX.YYY;rport=52589
From: sip:PEERC@XXX.XXX.XXX.XXX;tag=e0372590-c4bb-4909-a156-0f83642b5f78
To: sip:PEERA@XXX.XXX.XXX.XXX
Call-ID: 64b5f9a6-0b7e-4a38-a37d-747005234d5b
CSeq: 26213 INVITE
Server: Asterisk PBX 13.1.0~dfsg-1.1ubuntu4.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:PEERA@XXX.XXX.XXX.XXX:5060>
Content-Length: 0
<------------>
[2017-08-12 11:15:05] DEBUG[15018][C-0000004a] chan_sip.c: Trying to put 'SIP/2.0 100' onto UDP socket destined for XXX.XXX.XXX.YYY:52589
[2017-08-12 11:15:05] DEBUG[14986] devicestate.c: No provider found, checking channel drivers for SIP - PEERC
[2017-08-12 11:15:05] DEBUG[14986] chan_sip.c: Checking device state for peer PEERC
[2017-08-12 11:15:05] DEBUG[14986] devicestate.c: Changing state for SIP/PEERC - state 2 (In use)
[2017-08-12 11:15:05] DEBUG[15632][C-0000004a] res_config_mysql.c: MySQL RealTime: Connection okay.
[2017-08-12 11:15:05] DEBUG[15632][C-0000004a] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten = 'PEERA' AND priority = '1' AND context = 'sip-ctx'
[2017-08-12 11:15:05] DEBUG[15632][C-0000004a] res_config_mysql.c: MySQL RealTime: Connection okay.
[2017-08-12 11:15:05] DEBUG[15632][C-0000004a] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten = 'PEERA' AND priority = '1' AND context = 'sip-ctx'
[2017-08-12 11:15:05] DEBUG[15632][C-0000004a] pbx.c: Result of 'EXTEN' is 'PEERA'
[2017-08-12 11:15:05] DEBUG[15632][C-0000004a] res_config_mysql.c: MySQL RealTime: ```