Sip 客户端回复 481 事务不存在错误 ON INFO 消息
Sip client reply with 481 transaction does not exist error ON INFO Message
我正在尝试创建一个 Sip 代理 server.I 已经实现了呼叫设置的基本呼叫流程,但是在那之后当我想发送一些消息时,例如 INFO 更新或 Bye the sio UA reply with 481 错误。我正在使用 Linphone 作为我的 UA.Also 我想知道是否有任何其他方式告诉 Sip UA 发送帧内帧。以下是 wireShark 的转储,请帮我解决这个问题....
INVITE sip:1259@192.168.0.50:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.106:5060;branch=z9hG4bK.BCislbG05;rport
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
To: sip:1259@192.168.0.50
CSeq: 20 INVITE
Call-ID: BSEs~ww7v8
Max-Forwards: 70
Supported: replaces, outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length: 212
Contact: <sip:clary@192.168.0.106:5062>;+sip.instance="<urn:uuid:2cc4cd7f-6bc9-436c-a83e-cd5fd1ab7647>"
User-Agent: Linphone/3.7.0 (belle-sip/1.3.0)
v=0
o=clary 68 1084 IN IP4 192.168.0.106
s=Talk
c=IN IP4 192.168.0.106
t=0 0
m=audio 7690 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=video 4790 RTP/AVP 103
a=rtpmap:103 VP8/90000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
From: <sip:1259@192.168.0.50:5062>;tag=ib-gWexLD
To: <sip:clary@192.168.0.106>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
Contact: <sip:1259@192.168.0.50:5062;transport=UDP>;+sip.instance="<urn:uuid:9e176788-7cef-408f-bae9-8733ffa2451b>";expires=3600
User-Agent: Test Sip Server
Allow: INVITE, ACK, BYE, CANCEL, INFO,OPTIONS, MESSAGE,UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
To: <sip:clary@192.168.0.106>;tag=122vaclar
From: <sip:1259@192.168.0.50:5062>;tag=ib-gWexLD
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
User-Agent: Test Sip Server
Content-Length: 0
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
From: <sip:1259@192.168.0.50:5062>;tag=ib-gWexLD
To: <sip:clary@192.168.0.106>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
User-Agent: Test Sip Server
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,UPDATE
Contact: <sip:1259@192.168.0.50:5062;transport=UDP>;+sip.instance="<urn:uuid:9e176788-7cef-408f-bae9-8733ffa2451b>"
Content-Type: application/sdp
Content-Length: 282
v=0
o=claryicon 1983 678901 IN IP4 192.168.0.50
s=-
i=Test sip Server
c=IN IP4 192.168.0.50
t=0 0
m=audio 21483 RTP/AVP 0
a=sendrecv
a=rtcp:21483
a=rtpmap:0 PCMU/8000
m=video 21483 RTP/AVP 96
a=sendrecv
a=rtcp:21483
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
ACK sip:1259@192.168.0.50:5062;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.106:5060;rport;branch=z9hG4bK.MpKbnK6Bm
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
To: <sip:clary@192.168.0.106>;tag=122vaclar
CSeq: 20 ACK
Call-ID: BSEs~ww7v8
Max-Forwards: 70
INFO sip:clary@192.168.0.106;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5062;branch=z9hG4bK.BCislbG05;rport
To: <sip:1259@192.168.0.50>;tag=122vaclar
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
CSeq: 22 INFO
Call-ID: BSEs~ww7v8
Max-Forwards: 70
Content-Type: application/media_control+xml
Content-Length: 185
User-Agent: Test Sip Server
Allow: INVITE, ACK, BYE, CANCEL, INFO,OPTIONS, MESSAGE,UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
<?xml version="1.0" encoding="utf-8" ?><media_control> <vc_primitive> <to_encoder> <picture_fast_update></picture_fast_update> </to_encoder> </vc_primitive></media_control>
SIP/2.0 481 Call/transaction does not exist
Via: SIP/2.0/UDP 192.168.0.50:5062;branch=z9hG4bK.BCislbG05;rport
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
To: <sip:1259@192.168.0.50>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 22 INFO
提前致谢 一切都会好的....
您真的应该阅读有关 SIP 事务和对话的主题。
为了识别对话,SIP UA 使用 Callid 值、本地标签和远程标签。发送请求时,本地标签在 from header 中,远程标签在 to header 中(在初始消息中为空)。
对于接收请求的UA,local标签在Toheader,remote标签在Fromheader.
因此,在您的情况下,Linphone 正在尝试将 INFO 请求与本地标记“122vaclar”和远程标记 'ib-gWexLD' 匹配,但该对话框不存在,因为对话框最初创建的本地标签为 'ib-gWexLD'.
在您的回复中,您也与 from 和 to 标签中的 URI 不一致。
此外,您是re-using INFO 请求中的分支值。这是一个交易 ID,它永远不应该是 re-used.
请检查初始INVITE和INFO中的Via头内容:地址和端口的组合不同(Via:SIP/2.0/UDP 192.168.0.106:5060和Via:SIP/2 .0/UDP 192.168.0.50:5062 分别)。
当 SIP 服务器在内部创建对话时,它使用实际值。鉴于这一事实,您的 SIP 代理将从不同地址和端口收到的后续 INFO 请求视为对话外内容并拒绝它。
我正在尝试创建一个 Sip 代理 server.I 已经实现了呼叫设置的基本呼叫流程,但是在那之后当我想发送一些消息时,例如 INFO 更新或 Bye the sio UA reply with 481 错误。我正在使用 Linphone 作为我的 UA.Also 我想知道是否有任何其他方式告诉 Sip UA 发送帧内帧。以下是 wireShark 的转储,请帮我解决这个问题....
INVITE sip:1259@192.168.0.50:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.106:5060;branch=z9hG4bK.BCislbG05;rport
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
To: sip:1259@192.168.0.50
CSeq: 20 INVITE
Call-ID: BSEs~ww7v8
Max-Forwards: 70
Supported: replaces, outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length: 212
Contact: <sip:clary@192.168.0.106:5062>;+sip.instance="<urn:uuid:2cc4cd7f-6bc9-436c-a83e-cd5fd1ab7647>"
User-Agent: Linphone/3.7.0 (belle-sip/1.3.0)
v=0
o=clary 68 1084 IN IP4 192.168.0.106
s=Talk
c=IN IP4 192.168.0.106
t=0 0
m=audio 7690 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=video 4790 RTP/AVP 103
a=rtpmap:103 VP8/90000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
From: <sip:1259@192.168.0.50:5062>;tag=ib-gWexLD
To: <sip:clary@192.168.0.106>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
Contact: <sip:1259@192.168.0.50:5062;transport=UDP>;+sip.instance="<urn:uuid:9e176788-7cef-408f-bae9-8733ffa2451b>";expires=3600
User-Agent: Test Sip Server
Allow: INVITE, ACK, BYE, CANCEL, INFO,OPTIONS, MESSAGE,UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
To: <sip:clary@192.168.0.106>;tag=122vaclar
From: <sip:1259@192.168.0.50:5062>;tag=ib-gWexLD
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
User-Agent: Test Sip Server
Content-Length: 0
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
From: <sip:1259@192.168.0.50:5062>;tag=ib-gWexLD
To: <sip:clary@192.168.0.106>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
User-Agent: Test Sip Server
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,UPDATE
Contact: <sip:1259@192.168.0.50:5062;transport=UDP>;+sip.instance="<urn:uuid:9e176788-7cef-408f-bae9-8733ffa2451b>"
Content-Type: application/sdp
Content-Length: 282
v=0
o=claryicon 1983 678901 IN IP4 192.168.0.50
s=-
i=Test sip Server
c=IN IP4 192.168.0.50
t=0 0
m=audio 21483 RTP/AVP 0
a=sendrecv
a=rtcp:21483
a=rtpmap:0 PCMU/8000
m=video 21483 RTP/AVP 96
a=sendrecv
a=rtcp:21483
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
ACK sip:1259@192.168.0.50:5062;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.106:5060;rport;branch=z9hG4bK.MpKbnK6Bm
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
To: <sip:clary@192.168.0.106>;tag=122vaclar
CSeq: 20 ACK
Call-ID: BSEs~ww7v8
Max-Forwards: 70
INFO sip:clary@192.168.0.106;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5062;branch=z9hG4bK.BCislbG05;rport
To: <sip:1259@192.168.0.50>;tag=122vaclar
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
CSeq: 22 INFO
Call-ID: BSEs~ww7v8
Max-Forwards: 70
Content-Type: application/media_control+xml
Content-Length: 185
User-Agent: Test Sip Server
Allow: INVITE, ACK, BYE, CANCEL, INFO,OPTIONS, MESSAGE,UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
<?xml version="1.0" encoding="utf-8" ?><media_control> <vc_primitive> <to_encoder> <picture_fast_update></picture_fast_update> </to_encoder> </vc_primitive></media_control>
SIP/2.0 481 Call/transaction does not exist
Via: SIP/2.0/UDP 192.168.0.50:5062;branch=z9hG4bK.BCislbG05;rport
From: <sip:clary@192.168.0.106>;tag=ib-gWexLD
To: <sip:1259@192.168.0.50>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 22 INFO
提前致谢 一切都会好的....
您真的应该阅读有关 SIP 事务和对话的主题。
为了识别对话,SIP UA 使用 Callid 值、本地标签和远程标签。发送请求时,本地标签在 from header 中,远程标签在 to header 中(在初始消息中为空)。
对于接收请求的UA,local标签在Toheader,remote标签在Fromheader.
因此,在您的情况下,Linphone 正在尝试将 INFO 请求与本地标记“122vaclar”和远程标记 'ib-gWexLD' 匹配,但该对话框不存在,因为对话框最初创建的本地标签为 'ib-gWexLD'.
在您的回复中,您也与 from 和 to 标签中的 URI 不一致。
此外,您是re-using INFO 请求中的分支值。这是一个交易 ID,它永远不应该是 re-used.
请检查初始INVITE和INFO中的Via头内容:地址和端口的组合不同(Via:SIP/2.0/UDP 192.168.0.106:5060和Via:SIP/2 .0/UDP 192.168.0.50:5062 分别)。
当 SIP 服务器在内部创建对话时,它使用实际值。鉴于这一事实,您的 SIP 代理将从不同地址和端口收到的后续 INFO 请求视为对话外内容并拒绝它。