SIP BYE 消息问题
我正在编写一个SIP服务器,我让它接听电话,然后将它们连接到VoIP电话,问题是当你挂断VoIP电话时,BYE消息的转发出现问题,而我的手机却没有结束通话。
这是SIP消息日志(我将服务器的电话号码替换为1234,将手机的电话号码替换为5678,我的服务器的IP已替换为x,我的voip电话的IP已替换为y) -
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"
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"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能想检查警告标头的值表示什么。
有一些自定义消息“嘈杂的反馈告诉我们”...这是非常特定于应用程序的。
当事务超时到期时,请求超时消息通常由堆栈模拟。这可能意味着您对 174.37.45.134:5060 的 BYE 请求无法到达目的地。
当原始 BYE 请求格式错误且其他方忽略它时,也可能出现这种情况。
您是否尝试过使用 SIPp 在本地调试服务器?
您还可以运行 Ethereal (Wireshark) 来检查您的流量。
You might want to check what does the value of warning header says.
There is some custom message "Noisy feedback tells"... this is very application specific.
Request Timeout messages are usually emulated by stack when transaction timeout is expired. That might mean your BYE request to 174.37.45.134:5060 could not reach destination.
This can also be the case when original BYE request is malformed and other party ignores it.
Have you tried debugging your server locally with SIPp?
You can also run Ethereal (Wireshark) to check your traffic.
“via_cnt==1092”也很可疑。
顺便说一句,您似乎正在构建一个 B2BUA,因为您甚至在向本地电话 (1234) 发送邀请之前就接受了来自外部的呼叫。如果本地电话接受不同的参数,接受不同的编解码器等,那么您就会被搞砸,因为您告诉本地电话将媒体直接发送给原始呼叫者。他们确实应该将媒体发送到您的服务器,服务器将进行中继(或者如果需要转码)。
如果您不想这样做(即您不想充当媒体中继和可能的转码器),则需要将 INVITE 转发到本地电话,然后转发任何响应等。基本上更多地充当 SIP代理服务器而不是 SIP B2BUA。
"via_cnt==1092" is also very suspicious.
BTW, you appear to building a B2BUA, in that you accept the call from the outside before even sending an invite to local phone (1234). If the local phone were to accept with different parameters, accept a different codec, etc you'd be screwed since you told the local phone to send media directly to the original caller. They really should both be sending their media to your server, which would relay (or if needed transcode).
If you don't want to do that (i.e. you don't want to act as media relay and possible transcoder), you need to forward the INVITE to the local phone, then forward any response, etc. Basically act more as a SIP proxy server and not a SIP B2BUA.
我建议检查呼叫腿是否接受 BYE 请求(看起来它接受但是......)以及它如何处理此请求。您真正需要的是来自 174.37.45.134 的类似日志。问题似乎出在 .134 后面(超时是由 .134 生成的)。
顺便说一句,乍一看,我发现您违反了几个基本的呼叫处理规则,这可能会给您带来麻烦:
- 您缺少对始发呼叫线路的尝试响应。如果发起者的 SIP 堆栈确实等待此操作,则可能会导致呼叫 ID 未被真正记录。是的,这是错误的行为,但我们生活在现实世界中。标准规定要以“尽快尝试”进行响应(甚至在进行路由之前、在呼叫身份验证之后)
- 在向被叫方发起传出 INVITE 之前,您已与主叫方完全建立呼叫会话。这是错误的逻辑。至少因为如果传出呼叫失败,发起者将被计费。
如果您可以快速完成此操作,我建议您首先修复呼叫设置顺序。
无论如何,您都需要这个,并且有可能解决呼叫终止问题:
I'd recommend to check if calling leg accepts BYE request (looks it accepts but...) and how it handles this request. What you really need is similar log from 174.37.45.134. It seems problem is behind .134 (timeout was generated by .134).
BTW as for first look I see you are breaking several basic call processing rules which could get you in such trouble:
- You are missing Trying response for originating call leg. If originator's SIP stack really waits for this it could lead to call ID not really recorded. Yes, this is buggy behavior but we are living in real world. Standards say to respond with Trying ASAP (even before you are doing routing, just after call authentication
- You are fully establishing call session with calling party before even initiating outgoing INVITE to called party. This is wrong logics. At least because in case of failed outgoing call originator will be billed.
If you can do this quick I'd recommend to fix call setup sequence first.
You anyway will need this and there is possibility this will fix call termination:
如果您希望符合 RFC 3261,则强制您发送的“Via”标头包含可选的(!)“branch”参数。
参见 RFC3261 ss 20.42:
If you wish to be compliant with RFC 3261, it is mandated that the "Via" headers you send include the optional(!) "branch" parameter.
See RFC3261 ss 20.42:
RFC 3261 规定“收件人”字段和“发件人”字段中关联的号码 (URI) 保持不变。如果涉及 NAT,IP 可能会发生变化,但数量必须保持不变。如果您注意到,BYE 标头中的“To”和“From”字段被交换,使其成为格式错误的数据包。
RFC 3261 dictates that the numbers (URI) associated in To and From Fields remain the same. If NAT’ing is involved, the IPs can change, however the numbers must remain constant. If you notice, the ‘To’ and ‘From’ fields in the BYE header are swapped making it a malformed packet.