2

使用resiprocate开发 NAT 遍历解决方案,它工作正常,但通常 SIP INVITE 获取失败,特别是在 cisco 路由器上

1. 1024端口发出SIP REGISTER

来源:107.108.188.26

目的地:107.108.188.52

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

在此处输入图像描述

2. SIP 状态 200 OK

来源:107.108.188.52

目的地:107.108.188.26

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

3. SIP/SDP 邀请

Source: 107.108.188.52 Destination:107.108.188.26 User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)

在此处输入图像描述

理想情况下,第 1 步和第 3 步中的发送端口应该是 1024。请指出我背后的任何可能原因

4

2 回答 2

0

REGISTER 请求中的ToContact字段都指定端口 5060:sip:192.168.5.2@107.108.188.26:5060

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

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

于 2013-04-01T21:38:19.367 回答
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
于 2013-04-02T03:57:45.637 回答