Hello,
I am trying to migrate one of my sip trunks to pjsip, with no success. Everything works, except incoming calls are dropped after 32 seconds. While everything points to NAT problem, I can not figure why this is happening and which pjsip configuration file has to be changed. I am using FreePBX 14 and asterisk 13.
When call comes on standard sip trunk, INVITE is sent from provider, and replied with 100 trying followed by 200 OK. Afterwards, ACK is sent from provider. In pjsip case, ACK is never received. pjsip trunk keeps sending 200 OK every 2 seconds until call ends after 32 seconds.
Below is debug for both sip and pjsip trunk, my IP is changed with 44.55.66.77 as well as phone numbers. Everything else is original. There is difference in Contact header, but I can not tell if this is a source of the problem.
Any help is highly appreciated.
SIP trunk:
INVITE sip:[email protected]:5060;transport=UDP SIP/2.0
Record-Route: sip:[email protected];lr=on
Via: SIP/2.0/UDP 162.213.111.22;branch=z9hG4bK4691.63020d51.0
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-524287-1—09f4250da1d5b522;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-d5is3ewwkdxnqxfi;rport=5061
Max-Forwards: 69
Record-Route: sip:208.65.240.165:5060;lr;transport=UDP
Contact: "Anonymous"sip:208.65.240.165:5061
To: sip:[email protected]
From: “JOHN DOE” sip:[email protected];tag=cngv2bh4sycxomak.o
Call-ID: [email protected]~o~o
CSeq: 695 INVITE
Expires: 300
Content-Disposition: session
Content-Type: application/sdp
User-Agent: Sippy
h323-conf-id: 887280958-3263631848-2616459291-559912524
Portasip-3264-action: offer 1
cisco-GUID: 887280958-3263631848-2616459291-559912524
Content-Length: 159
v=0
o=Sippy 2481384099842951197 0 IN IP4 208.65.240.165
s=-
t=0 0
m=audio 39574 RTP/AVP 0 101
c=IN IP4 208.65.240.142
a=rtpmap:101 telephone-event/8000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 162.213.111.22;branch=z9hG4bK4691.63020d51.0;received=162.213.111.22;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-524287-1—09f4250da1d5b522;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-d5is3ewwkdxnqxfi;rport=5061
Record-Route: sip:[email protected];lr=on
Record-Route: sip:208.65.240.165:5060;lr;transport=UDP
From: “JOHN DOE” sip:[email protected];tag=cngv2bh4sycxomak.o
To: sip:[email protected]
Call-ID: [email protected]~o~o
CSeq: 695 INVITE
Server: FreePBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:[email protected]:6666
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 162.213.111.22;branch=z9hG4bK4691.63020d51.0;received=162.213.111.22;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-524287-1—09f4250da1d5b522;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-d5is3ewwkdxnqxfi;rport=5061
Record-Route: sip:[email protected];lr=on
Record-Route: sip:208.65.240.165:5060;lr;transport=UDP
From: “JOHN DOE” sip:[email protected];tag=cngv2bh4sycxomak.o
To: sip:[email protected];tag=as2da2f9a0
Call-ID: [email protected]~o~o
CSeq: 695 INVITE
Server: FreePBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:[email protected]:6666
Content-Type: application/sdp
Content-Length: 256
v=0
o=root 1660948966 1660948966 IN IP4 44.55.66.77
s=Asterisk PBX 13.23.1
c=IN IP4 44.55.66.77
t=0 0
m=audio 11030 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
ACK sip:[email protected]:5060;transport=UDP SIP/2.0
Record-Route: sip:[email protected];lr=on
Via: SIP/2.0/UDP 162.213.111.22;branch=z9hG4bKcydzigwkX
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-524287-1—06e64e6d9643136b;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-p5jyi2uyej5zzowq;rport=5061
Max-Forwards: 69
Route: sip:[email protected];lr
Contact: "Anonymous"sip:208.65.240.165:5061
To: sip:[email protected];tag=as2da2f9a0
From: “JOHN DOE” sip:[email protected];tag=cngv2bh4sycxomak.o
Call-ID: [email protected]~o~o
CSeq: 695 ACK
User-Agent: Sippy
Content-Length: 0
PJSIP trunk:
INVITE sip:[email protected]:5060;transport=UDP SIP/2.0
Record-Route: sip:[email protected];lr=on
Via: SIP/2.0/UDP 162.213.111.22;branch=z9hG4bK7aae.37fded51.0
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-524287-1—85d7d14a4198ad39;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-ixtcopezy3n7ubni;rport=5061
Max-Forwards: 69
Record-Route: sip:208.65.240.165:5060;lr;transport=UDP
Contact: "Anonymous"sip:208.65.240.165:5061
To: sip:[email protected]
From: “JOHN DOE” sip:[email protected];tag=hurlbyw43k47mmqj.o
Call-ID: [email protected]~o~o
CSeq: 196 INVITE
Expires: 300
Content-Disposition: session
Content-Type: application/sdp
User-Agent: Sippy
h323-conf-id: 2000400052-3263697384-2616459291-559912524
Portasip-3264-action: offer 1
cisco-GUID: 2000400052-3263697384-2616459291-559912524
Content-Length: 159
v=0
o=Sippy 3928492864103473808 0 IN IP4 208.65.240.165
s=-
t=0 0
m=audio 50502 RTP/AVP 0 101
c=IN IP4 208.65.240.142
a=rtpmap:101 telephone-event/8000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 162.213.111.22;rport=5060;received=162.213.111.22;branch=z9hG4bK7aae.37fded51.0
Via: SIP/2.0/UDP 208.65.240.165:5060;rport=5060;branch=z9hG4bK-524287-1—85d7d14a4198ad39
Via: SIP/2.0/UDP 208.65.240.165:5061;rport=5061;branch=z9hG4bK-ixtcopezy3n7ubni
Record-Route: sip:[email protected]:5060;lr
Record-Route: sip:208.65.240.165:5060;transport=UDP;lr
Call-ID: [email protected]~o~o
From: “JOHN DOE” sip:[email protected];tag=hurlbyw43k47mmqj.o
To: sip:[email protected]
CSeq: 196 INVITE
Server: FreePBX
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 162.213.111.22;rport=5060;received=162.213.111.22;branch=z9hG4bK7aae.37fded51.0
Via: SIP/2.0/UDP 208.65.240.165:5060;rport=5060;branch=z9hG4bK-524287-1—85d7d14a4198ad39
Via: SIP/2.0/UDP 208.65.240.165:5061;rport=5061;branch=z9hG4bK-ixtcopezy3n7ubni
Record-Route: sip:[email protected]:5060;lr
Record-Route: sip:208.65.240.165:5060;transport=UDP;lr
Call-ID: [email protected]~o~o
From: “JOHN DOE” sip:[email protected];tag=hurlbyw43k47mmqj.o
To: sip:[email protected];tag=107d3074-54cf-45e7-b775-8f36f49468b0
CSeq: 196 INVITE
Server: FreePBX
Contact: sip:44.55.66.77:6667
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 231
v=0
o=- 596337296 2 IN IP4 44.55.66.77
s=Asterisk
c=IN IP4 44.55.66.77
t=0 0
m=audio 11476 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
After this point, OK 200 is repeated every 2 seconds until call drops