简体   繁体   English

JSIP(JAIN SIP)在发送时交换请求URI和Route标头。 为什么? 怎么预防呢?

[英]JSIP (JAIN SIP) exchanging request URI and Route header when sending. Why? How to prevent it?

I am using JSIP (JAIN-SIP) version 1.2 (implementation build 2384). 我正在使用JSIP(JAIN-SIP)1.2版(实现版本2384)。 I am trying to send the following SIP message (I removed actual IP addresses in the post): 我正在尝试发送以下SIP消息(我在帖子中删除了实际IP地址):

INVITE sip:bob@miniims.net SIP/2.0
Via: SIP/2.0/UDP xxx.yyy.zzz.www:5065;branch=z9hG4bKbranch1
Route: <sip:xxx.yyy.zzz.www>,<sip:xxx.yyy.zzz.www:5062>
Max-Forwards: 70
From: "Alice" <sip:alice@miniims.net>;tag=rawclientv1.0
To: "Bob" <sip:bob@miniims.net>
Call-ID: f2927406a96b0b3d3ef8213aa338d1c4@xxx.yyy.zzz.www
CSeq: 1 INVITE
Contact: "alice" <sip:alice@xxx.yyy.zzz.www:5065>
P-Preferred-Identity: <sip:alice@miniims.net>
Content-Length: 141

v=0
o=alice 2890844526 2890844526 IN IP4 xxx.yyy.zzz.www
s=
c=IN IP4 xxx.yyy.zzz.www
t=0 0
m=audio 12346 RTP/AVP 0 8 96
a=rtpmap:96 L16/8000

When I print it after parsing, it is correct. 当我在解析后打印它时,它是正确的。 However, when I send it, the request URI is put to the end of the list of Route headers, and the first Route header is moved into SIP URI. 但是,当我发送它时,请求URI放在Route标头列表的末尾,并且第一个Route标头移到SIP URI中。 No RFC or 3GPP standard prescribes such behavior. 没有RFC或3GPP标准规定这种行为。 WireShark already captures the wrong message: WireShark已经捕获了错误的消息:

INVITE sip:xxx.yyy.zzz.www SIP/2.0
Via: SIP/2.0/UDP xxx.yyy.zzz.www:5065;branch=z9hG4bKbranch1
Route: <sip:xxx.yyy.zzz.www:5062>,<sip:bob@miniims.net>
Max-Forwards: 70
From: "Alice" <sip:alice@miniims.net>;tag=rawclientv1.0
To: "Bob" <sip:bob@miniims.net>
Call-ID: f2927406a96b0b3d3ef8213aa338d1c4@xxx.yyy.zzz.www
CSeq: 1 INVITE
Contact: "alice" <sip:alice@xxx.yyy.zzz.www:5065>
P-Preferred-Identity: <sip:alice@miniims.net>
Content-Length: 141

v=0
o=alice 2890844526 2890844526 IN IP4 xxx.yyy.zzz.www
s=
c=IN IP4 xxx.yyy.zzz.www
t=0 0
m=audio 12346 RTP/AVP 0 8 96
a=rtpmap:96 L16/8000

Is it normal behavior in JSIP? 这是JSIP中的正常行为吗? Or a bug? 还是错误? Is there a way to prevent it, ie a workaround? 有没有办法防止它发生,即一种解决方法? Thanks in advance! 提前致谢!

Use lr; 使用lr; parameter in the Route Header. 路由标题中的参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM