SIP INVITE请求端口搞砸了

时间:2013-03-21 11:24:45

标签: port sip nat sdp nat-traversal

使用resiprocate开发NAT遍历解决方案,它运行正常,但SIP INVITE通常在cisco路由器上失败

1。 SIP REGISTER由端口1024

发送出去

资料来源:107.108.188.26

目的地:107.108.188.52

用户数据报协议,Src端口:1024(1024),Dst端口:sip(5060)

enter image description here

2。 SIP状态200确定

资料来源:107.108.188.52

目的地:107.108.188.26

用户数据报协议,Src端口:sip(5060),Dst端口:1024(1024)

第3。 SIP / SDP邀请

资料来源:107.108.188.52 目的地:107.108.188.26 用户数据报协议,Src端口:sip(5060),Dst端口:sip(5060)

enter image description here

理想情况下,在步骤1和步骤3中,sent-by端口应为1024。 请指出我背后的任何可能原因

2 个答案:

答案 0 :(得分:0)

REGISTER请求中的联系字段均指定端口5060: sip:192.168.5.2@107.108.188.26:5060

这表示您希望在此端口上接收呼叫(即INVITE)。 See the rfc

如果您希望在端口1024上接收INVITE,请将uri的主机部分更改为 107.108.188.26:1024

答案 1 :(得分:0)

讨论相同并得出以下结论

If RFC5626 (Outbound) is not used on the client side, then resip will route INVITEs to the user based on the information in their Path or Contact headers of the registration request.  You want to try out a repro setting that forces RFC5626 behaviour in the proxy even if the clients to no support it:
# Enable use of flow-tokens in non-outbound cases
# WARNING: Before enabling this, ensure you have a RecordRouteUri setup, or are using
# the alternate transport specification mechanism and defining a RecordRouteUri per
# transport: TransportXRecordRouteUri
EnableFlowTokens = true