I am writing a SIP server, and I have it taking calls and then connecting them to a voip phone, the problem is when you hang up the voip phone, there's something wrong with the forwarding of the BYE message where my cell phone doesn't end the call.
Here is the SIP message log (I replaced my server's phone number with 1234 and my cell phone's phone number with 5678, my server's IP has been replaced with x's and my voip phone's IP has been replaced with y's) -
Incoming from 174.37.45.134:5060 -
INVITE sip:[email protected]:5060;rinstance=f10c56ae7fb62958 SIP/2.0
Record-Route: <sip:174.37.45.134;lr=on;ftag=VPSF506071629460>
Record-Route: <sip:67.228.177.9;lr=on;ftag=VPSF506071629460>
Record-Route: <sip:216.82.224.202;lr;ftag=VPSF506071629460>
Record-Route: <sip:4.79.212.229;lr;ftag=VPSF506071629460>
Via: SIP/2.0/UDP 174.37.45.134;branch=z9hG4bK9767.ad406992.0
Via: SIP/2.0/UDP 67.228.177.9;rport=5060;branch=z9hG4bK9767.760c9624.0
Via: SIP/2.0/UDP 216.82.224.202;rport=5060;received=216.82.224.202;branch=z9hG4bK9767.823f8e12.0
Via: SIP/2.0/UDP 216.82.224.202;branch=z9hG4bK9767.723f8e12.0
Via: SIP/2.0/UDP 4.79.212.229;branch=z9hG4bK9767.e30c5303.0
Via: SIP/2.0/UDP 4.68.250.148:5060;branch=z9hG4bK506071629460-1256581032616
f: "Carro Ramon" <sip:[email protected]>;tag=VPSF506071629460
t: <sip:[email protected]:5060>
i: [email protected]
CSeq: 1 INVITE
m: <sip:[email protected]:5060;transport=udp;nat=yes>
Max-Forwards: 64
c: application/sdp
Content-Length: 192
v=0
o=- 1256664139 1256664140 IN IP4 209.247.22.135
s=-
c=IN IP4 174.37.45.134
t=0 0
m=audio 55540 RTP/AVP 0 18 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=nortpproxy:yes
Outgoing to 174.37.45.134:5060 -
SIP/2.0 180 Ringing
CSeq: 1 INVITE
Call-ID: [email protected]
Contact: <sip:[email protected]:5060;transport=udp;nat=yes>
From: "Carro Ramon" <sip:[email protected]>;tag=VPSF506071629460
Max-Forwards: 70
Record-Route: <sip:174.37.45.134;lr=on;ftag=VPSF506071629460>, <sip:67.228.177.9;lr=on;ftag=VPSF506071629460>, <sip:216.82.224.202;lr;ftag=VPSF506071629460>, <sip:4.79.212.229;lr;ftag=VPSF506071629460>
To: <sip:[email protected]:5060>;tag=dAmXcBGL
Via: SIP/2.0/UDP 174.37.45.134;branch=z9hG4bK9767.ad406992.0, SIP/2.0/UDP 67.228.177.9;rport=5060;branch=z9hG4bK9767.760c9624.0, SIP/2.0/UDP 216.82.224.202;rport=5060;received=216.82.224.202;branch=z9hG4bK9767.823f8e12.0, SIP/2.0/UDP 216.82.224.202;branch=z9hG4bK9767.723f8e12.0, SIP/2.0/UDP 4.79.212.229;branch=z9hG4bK9767.e30c5303.0, SIP/2.0/UDP 4.68.250.148:5060;branch=z9hG4bK506071629460-1256581032616
Content-Length: 0
Outgoing to 174.37.45.134:5060 -
SIP/2.0 200 OK
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO
CSeq: 1 INVITE
Call-ID: [email protected]
Contact: <sip:[email protected]:5060;transport=udp;nat=yes>
Content-Type: application/sdp
From: "Carro Ramon" <sip:[email protected]>;tag=VPSF506071629460
Max-Forwards: 70
Record-Route: <sip:174.37.45.134;lr=on;ftag=VPSF506071629460>, <sip:67.228.177.9;lr=on;ftag=VPSF506071629460>, <sip:216.82.224.202;lr;ftag=VPSF506071629460>, <sip:4.79.212.229;lr;ftag=VPSF506071629460>
To: <sip:[email protected]:5060>;tag=BYFeP7T1
Via: SIP/2.0/UDP 174.37.45.134;branch=z9hG4bK9767.ad406992.0, SIP/2.0/UDP 67.228.177.9;rport=5060;branch=z9hG4bK9767.760c9624.0, SIP/2.0/UDP 216.82.224.202;rport=5060;received=216.82.224.202;branch=z9hG4bK9767.823f8e12.0, SIP/2.0/UDP 216.82.224.202;branch=z9hG4bK9767.723f8e12.0, SIP/2.0/UDP 4.79.212.229;branch=z9hG4bK9767.e30c5303.0, SIP/2.0/UDP 4.68.250.148:5060;branch=z9hG4bK506071629460-1256581032616
Content-Length: 206
v=0
o=Zoiper_user 0 0 IN IP4 xx.xx.xxx.xx
s=Zoiper_session
c=IN IP4 xx.xx.xxx.xx
t=0 0
m=audio 8000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
Incoming from 174.37.45.134:5060 -
ACK sip:[email protected]:5060;transport=udp SIP/2.0
Record-Route: <sip:174.37.45.134;lr=on;ftag=VPSF506071629460>
Record-Route: <sip:67.228.177.9;lr=on;ftag=VPSF506071629460>
Record-Route: <sip:216.82.224.202;lr;ftag=VPSF506071629460>
Via: SIP/2.0/UDP 174.37.45.134;branch=z9hG4bK9767.ad406992.2
Via: SIP/2.0/UDP 67.228.177.9;rport=5060;branch=z9hG4bK9767.760c9624.2
Via: SIP/2.0/UDP 216.82.224.202;rport=5060;received=216.82.224.202;branch=z9hG4bK9767.723f8e12.2
Via: SIP/2.0/UDP 4.79.212.229;branch=z9hG4bK9767.e30c5303.2
Via: SIP/2.0/UDP 4.68.250.148:5060;branch=z9hG4bK506071629460-1256581032653
From: "CARRO RAMON " <sip:[email protected];isup-oli=0>;tag=VPSF506071629460
To: <sip:[email protected]:5060>;tag=BYFeP7T1
Call-ID: [email protected]
CSeq: 1 ACK
Contact: <sip:4.68.250.148:5060;transport=udp>
Max-Forwards: 66
Content-Length: 0
Outgoing to yyy.yyy.yy.yyy:1024 -
INVITE sip:[email protected] SIP/2.0
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO
CSeq: 1 INVITE
Call-ID: [email protected]
Contact: <sip:[email protected]>;transport=UDP
Content-Type: application/sdp
From: "(null)" <sip:[email protected]>;transport=UDP;tag=7b2add35
Max-Forwards: 70
To: <sip:[email protected]>
User-Agent: Zoiper rev.4186
Via: SIP/2.0/UDP xx.xx.xxx.xx:5060
Content-Length: 206
v=0
o=Zoiper_user 0 0 IN IP4 xx.xx.xxx.xx
s=Zoiper_session
c=IN IP4 xx.xx.xxx.xx
t=0 0
m=audio 8000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
Incoming from yyy.yyy.yy.yyy:1024 -
SIP/2.0 100 Trying
To: <sip:[email protected]>
From: "(null)" <sip:[email protected]>;transport=UDP;tag=7b2add35
Call-ID: [email protected]
CSeq: 1 INVITE
Via: SIP/2.0/UDP xx.xx.xxx.xx:5060
Server: Linksys/SPA941-5.1.8
Content-Length: 0
Incoming from yyy.yyy.yy.yyy:1024 -
SIP/2.0 180 Ringing
To: <sip:[email protected]>;tag=53cca4372c533924i0
From: "(null)" <sip:[email protected]>;transport=UDP;tag=7b2add35
Call-ID: [email protected]
CSeq: 1 INVITE
Via: SIP/2.0/UDP xx.xx.xxx.xx:5060
Server: Linksys/SPA941-5.1.8
Content-Length: 0
Incoming from yyy.yyy.yy.yyy:1024 -
SIP/2.0 200 OK
To: <sip:[email protected]>;tag=53cca4372c533924i0
From: "(null)" <sip:[email protected]>;transport=UDP;tag=7b2add35
Call-ID: [email protected]
CSeq: 1 INVITE
Via: SIP/2.0/UDP xx.xx.xxx.xx:5060
Contact: "3998" <sip:[email protected]:5060>
Server: Linksys/SPA941-5.1.8
Content-Length: 212
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
v=0
o=- 49591664 49591664 IN IP4 192.168.1.121
s=-
c=IN IP4 192.168.1.121
t=0 0
m=audio 16432 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
Outgoing to yyy.yyy.yy.yyy:1024 -
ACK sip:[email protected] SIP/2.0
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO
CSeq: 1 ACK
Call-ID: [email protected]
Contact: <sip:[email protected]>;transport=UDP
From: "(null)" <sip:[email protected]>;transport=UDP;tag=7b2add35
Max-Forwards: 70
To: <sip:[email protected]>;tag=53cca4372c533924i0
User-Agent: Zoiper rev.4186
Via: SIP/2.0/UDP xx.xx.xxx.xx:5060
Content-Length: 0
Incoming from yyy.yyy.yy.yyy:1024 -
BYE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.121:5060;branch=z9hG4bK-598f1319
From: <sip:[email protected]>;tag=53cca4372c533924i0
To: "(null)" <sip:[email protected]>;tag=7b2add35
Call-ID: [email protected]
CSeq: 101 BYE
Max-Forwards: 70
User-Agent: Linksys/SPA941-5.1.8
Content-Length: 0
Outgoing to 174.37.45.134:5060 -
BYE sip:[email protected] SIP/2.0
CSeq: 2 BYE
Call-ID: [email protected]
Contact: <sip:[email protected]>
From: <sip:[email protected]:5060>;tag=BYFeP7T1
Max-Forwards: 70
Route: <sip:174.37.45.134;lr=on;ftag=VPSF506071629460>, <sip:67.228.177.9;lr=on;ftag=VPSF506071629460>, <sip:216.82.224.202;lr;ftag=VPSF506071629460>
To: "CARRO RAMON " <sip:[email protected];isup-oli=0>;tag=VPSF506071629460
Via: SIP/2.0/UDP 174.37.45.134:5060
Content-Length: 0
Outgoing to yyy.yyy.yy.yyy:1024 -
SIP/2.0 200 OK
CSeq: 101 BYE
Call-ID: [email protected]
From: <sip:[email protected]>;tag=53cca4372c533924i0;tag=D1EASwOG
Max-Forwards: 70
To: "(null)" <sip:[email protected]>;tag=7b2add35
Via: SIP/2.0/UDP 192.168.1.121:5060;branch=z9hG4bK-598f1319
Incoming from 174.37.45.134:5060 -
SIP/2.0 408 Request Timeout
CSeq: 2 BYE
Call-ID: [email protected]
From: <sip:[email protected]:5060>;tag=BYFeP7T1
To: "CARRO RAMON " <sip:[email protected];isup-oli=0>;tag=VPSF506071629460
Via: SIP/2.0/UDP 174.37.45.134:5060;rport=5060;received=xx.xx.xxx.xx
Server: Kamailio (1.5.2-notls (x86_64/linux))
Content-Length: 0
Warning: 392 67.228.177.9:5060 "Noisy feedback tells: pid=15004 req_src_ip=174.37.45.134 req_src_port=5060 in_uri=sip:[email protected] out_uri=sip:[email protected] via_cnt==1092"