Hello guys,
I have asterisk 13.2.0 hosted on EC2 Amazon and two sip endpoints behind the same NAT. the problem is that when I make a call audio pass normally but after 30 secs the call is dropped.
asterisk server : public ip : 52.150. …
private server is in the following range: 172.31.32.0/20
here is my pjsip.conf configurations
[simpletrans]
type=transport
protocol=udp
bind=0.0.0.0:5061
local_net=172.31.32.0/20
external_media_address=52.25…
external_signaling_address=50.25…
[6002]
type=endpoint
transport = simpletrans
context=from-internal
direct_media=no
rtp_symmetric=yes
force_rport=yes
ice_support=yes
media_address=52.25…
rewrite_contact=yes
disallow=all
allow=ulaw
auth=6002
aors=6002
[6002]
type=auth
auth_type=userpass
password=1234
username=6002
[6002]
type=aor
max_contacts=2
[6005]
type=endpoint
transport = simpletrans
context=from-internal
direct_media=no
rtp_symmetric=yes
force_rport=yes
ice_support=yes
media_address=52.25…
rewrite_contact=yes
disallow=all
allow=ulaw
auth=6005
aors=6005
[6005]
type=auth
auth_type=userpass
password=5678
username=6005
here are sip traces
ACK, MESSAGE, REGISTER, REFER
Contact: sip:50.25......:5061
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
Content-Type: application/sdp
Content-Length: 667
v=0
o=- 3643358120 3643358122 IN IP4 52.25…
s=Asterisk
c=IN IP4 52.25…
t=0 0
m=audio 19020 RTP/AVP 0 101
a=ice-ufrag:28f0d25260468e3b5089974a4519d371
a=ice-pwd:34fc3c8f4a624d1c6e4c8c6e69091cb7
a=candidate:Hac1f26d2 1 UDP 2130706431 172.31… 19020 typ host
a=candidate:S34199619 1 UDP 1694498815 52.25…19020 typ srflx raddr 172.31… rport 19020
a=candidate:Hac1f26d2 2 UDP 2130706430 172.31… 19021 typ host
a=candidate:S34199619 2 UDP 1694498814 52.25… 19021 typ srflx raddr 172.31… rport 19021
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<— Received SIP request (896 bytes) from UDP:94.252.20.200:61840 —>
REGISTER sip:52.25…:5061 SIP/2.0
Accept: application/reginfo+xml, application/sdp, application/simple-message-summary, message/sipfrag, multipart/mixed, multipart/related
Via: SIP/2.0/UDP 192.168.178.78:5062;branch=z9hG4bK258f9c0b5f5333943;rport
Max-Forwards: 70
From: “6002” sip:6002@52.25......:5061;tag=2d71febe7e
To: “6002” sip:6002@52.25......:5061
Call-ID: fc7ea4bad486d0e3
CSeq: 2109275808 REGISTER
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Authorization: Digest username=“6002”,realm=“asterisk”,nonce=“1434362076/336e2669ae68744e01ad882393f237c1”,uri=“sip:52.25…:5061”,response=“03994bd874d6ee117a66b9d812a3e89e”,algorithm=md5,opaque=“662590457d716772”,qop=auth,cnonce=“38dc4776”,nc=00000002
Contact: sip:6002@192.168.178.78:5062;audio;expires=120
User-Agent: Media5-fone/4.1.3.3034 iOS/7.1.2
Content-Length: 0
<— Transmitting SIP response (483 bytes) to UDP:94.252.20.200:61840 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.178.78:5062;rport=61840;received=94.252.20.200;branch=z9hG4bK258f9c0b5f5333943
Call-ID: fc7ea4bad486d0e3
From: “6002” sip:6002@52.25......;tag=2d71febe7e
To: “6002” sip:6002@52.25......;tag=z9hG4bK258f9c0b5f5333943
CSeq: 2109275808 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1434362165/9c5eda9d53d68fb26608b8430d564056”,opaque=“121f0f2608ee925c”,stale=true,algorithm=md5,qop="auth"
Content-Length: 0
<— Received SIP request (637 bytes) from UDP:94.252.20.200:61840 —>
REGISTER sip:52.25…:5061 SIP/2.0
Accept: application/reginfo+xml, application/sdp, application/simple-message-summary, message/sipfrag, multipart/mixed, multipart/related
Via: SIP/2.0/UDP 192.168.178.78:5062;branch=z9hG4bK25f0be37e07340d04;rport
Max-Forwards: 70
From: “6002” sip:6002@52.25.....:5061;tag=2d71febe7e
To: “6002” sip:6002@52.25.....:5061
Call-ID: fc7ea4bad486d0e3
CSeq: 2109275809 REGISTER
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Contact: sip:6002@192.168.178.78:5062;audio;expires=120
User-Agent: Media5-fone/4.1.3.3034 iOS/7.1.2
Content-Length: 0
<— Transmitting SIP response (472 bytes) to UDP:94.252.20.200:61840 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.178.78:5062;rport=61840;received=94.252.20.200;branch=z9hG4bK25f0be37e07340d04
Call-ID: fc7ea4bad486d0e3
From: “6002” sip:6002@52.25.....;tag=2d71febe7e
To: “6002” sip:6002@52.25......;tag=z9hG4bK25f0be37e07340d04
CSeq: 2109275809 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1434362166/32a375a8f2ea929d013c35b6ee46da9c”,opaque=“3ef7997a50443513”,algorithm=md5,qop="auth"
Content-Length: 0
<— Received SIP request (896 bytes) from UDP:94.252.20.200:61840 —>
REGISTER sip:52.25…:5061 SIP/2.0
Accept: application/reginfo+xml, application/sdp, application/simple-message-summary, message/sipfrag, multipart/mixed, multipart/related
Via: SIP/2.0/UDP 192.168.178.78:5062;branch=z9hG4bK887090fed4987f65b;rport
Max-Forwards: 70
From: “6002” sip:6002@52.25......:5061;tag=2d71febe7e
To: “6002” sip:6002@52.25......:5061
Call-ID: fc7ea4bad486d0e3
CSeq: 2109275810 REGISTER
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Authorization: Digest username=“6002”,realm=“asterisk”,nonce=“1434362166/32a375a8f2ea929d013c35b6ee46da9c”,uri=“sip:52.25…:5061”,response=“3ce35944322638f6e6e6e6aac98a5f11”,algorithm=md5,opaque=“3ef7997a50443513”,qop=auth,cnonce=“4b04d1c0”,nc=00000001
Contact: sip:6002@192.168.178.78:5062;audio;expires=120
User-Agent: Media5-fone/4.1.3.3034 iOS/7.1.2
Content-Length: 0
<— Transmitting SIP response (404 bytes) to UDP:94.252.20.200:61840 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.178.78:5062;rport=61840;received=94.252.20.200;branch=z9hG4bK887090fed4987f65b
Call-ID: fc7ea4bad486d0e3
From: “6002” sip:6002@52.25......;tag=2d71febe7e
To: “6002” sip:6002@52.25.150.25;tag=z9hG4bK887090fed4987f65b
CSeq: 2109275810 REGISTER
Date: Mon, 15 Jun 2015 09:56:06 GMT
Contact: sip:6002@50.25......:61840;expires=119
Content-Length: 0
<— Transmitting SIP response (1307 bytes) to UDP:94.252.20.200:61835 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 94.252.20.200:61833;rport=61835;received=94.252.20.200;branch=z9hG4bKPj316a2e35c0a24a9ca27df54025090aa9
Call-ID: f3dd132983a744eca856ccef5a880f28
From: sip:6005@52.25......;tag=cb79bd3abb98401ba1108104859dd840
To: sip:6002@52.25.......;tag=1196d68b-8fdb-47d2-9c78-6bbfbd68bfb9
CSeq: 8921 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REGISTER, REFER
Contact: sip:50.25.....:5061
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
Content-Type: application/sdp
Content-Length: 667
v=0
o=- 3643358120 3643358122 IN IP4 52.25…
s=Asterisk
c=IN IP4 52.25…
t=0 0
m=audio 19020 RTP/AVP 0 101
a=ice-ufrag:28f0d25260468e3b5089974a4519d371
a=ice-pwd:34fc3c8f4a624d1c6e4c8c6e69091cb7
a=candidate:Hac1f26d2 1 UDP 2130706431 172.31… 19020 typ host
a=candidate:S34199619 1 UDP 1694498815 52.25… 19020 typ srflx raddr 172.31…rport 19020
a=candidate:Hac1f26d2 2 UDP 2130706430 172.31… 19021 typ host
a=candidate:S34199619 2 UDP 1694498814 52.25… 19021 typ srflx raddr 172.31…rport 19021
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<— Transmitting SIP request (360 bytes) to UDP:94.252.20.200:61835 —>
BYE sip:6005@94.252.20.200:61835;ob SIP/2.0
Via: SIP/2.0/UDP 50.25…:5061;rport;branch=z9hG4bKPj660d3ccc-668b-4735-bf1c-a1ca0816c531
From: sip:6002@52.25.....;tag=1196d68b-8fdb-47d2-9c78-6bbfbd68bfb9
To: sip:6005@52.25......;tag=cb79bd3abb98401ba1108104859dd840
Call-ID: f3dd132983a744eca856ccef5a880f28
CSeq: 27661 BYE
Content-Length: 0