服务器是 Opensips 服务器 1.10.0-tls (linux)。它可以处理与本地电台之间的对话,最近它已更新为允许来自外部系统的电台。如果站点在本地不存在($tu 不变),它通过更改 $ru 中的用户名、ip 和端口来实现这一点。这适用于邀请、呼叫和所有类似的消息。
我遇到的问题是来自外部服务器的再见,正在传递到本地客户端站,被 481 拒绝(呼叫腿/交易不存在)我可以确认来自客户端软件,但它可以毫不费力地接受来自同一服务器上本地站点的再见。从本地到本地端的调用正常,从本地到外部的调用都关闭正常,只是从外部调用者到本地被调用者的调用不会关闭(它是被调用者说 481)。
我了解这是由于 to/from 和 call-id 中的标签不同而导致交易匹配未发生所致;我知道更改部分 $ru 的某些内容(例如我的 $ru 脚本)可能会影响确定交易的哈希值,但我不会更改标签或 callid,只需更改 $ru 名称即可转到正确的 IP 和站名。
我的问题是如何在不更改客户端应用程序的情况下在服务器上解决这个问题?我在下面包含了一些从客户端工作站上的wireshark捕获中发送的消息的示例,所以我不确定我做错了什么..我在服务器上尝试了不同的东西,但没有运气。有没有办法通过 sip 消息标记或告诉客户端关闭对话,而不管事务匹配如何?
我将非常感谢任何帮助,因为我已经为此烦恼了一段时间。
外部调用者(服务器 5.44 上的 103)到本地被调用者(本地名称是 wks2,外部引用名称是 155,服务器 3.3 上,客户端是 3.0)的消息示例。第一次再见是问题,第二次再见是我关闭客户端上的挂起连接。
----------
INVITE sip:895eedf7-4256-44d0-9edf-39785b6ceef0@172.16.3.0:5050 SIP/2.0
Record-Route: <sip:172.16.3.3;lr;ftag=as678f227c>
Via: SIP/2.0/UDP 172.16.3.3:5060;branch=z9hG4bKd066.93df6e05.0
Via: SIP/2.0/UDP 172.16.5.44:5060;received=172.16.5.44;branch=z9hG4bK50029c58;rport=5060
Max-Forwards: 69
From: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
To: <sip:155@172.16.3.3:5060>
Contact: <sip:103@172.16.5.44:5060>
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Date: Thu, 25 Jun 2015 14:27:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 296
Redirect-to: sip:wks2@172.16.3.3:5060
----------
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.16.3.3:5060;branch=z9hG4bKd066.93df6e05.0;received=172.16.3.3;rport=5060
Via: SIP/2.0/UDP 172.16.5.44:5060;received=172.16.5.44;branch=z9hG4bK50029c58;rport=5060
To: <sip:155@172.16.3.3:5060>;tag=1262186908
From: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 102 INVITE
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, SUBSCRIBE
Content-Length: 0
----------
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 172.16.3.3:5060;branch=z9hG4bKd066.93df6e05.0;received=172.16.3.3;rport=5060
Via: SIP/2.0/UDP 172.16.5.44:5060;received=172.16.5.44;branch=z9hG4bK50029c58;rport=5060
To: <sip:155@172.16.3.3:5060>;tag=1262186908
From: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 102 INVITE
Contact: <sip:172.16.3.0:5050>
Record-Route: <sip:172.16.3.3;lr;ftag=as678f227c>
Server: www.sipsorcery.com
Content-Length: 161
Content-Type: application/sdp
----------
ACK sip:172.16.3.0:5050 SIP/2.0
Via: SIP/2.0/UDP 172.16.3.3:5060;branch=z9hG4bKd066.93df6e05.2
Via: SIP/2.0/UDP 172.16.5.44:5060;received=172.16.5.44;branch=z9hG4bK49d179f0;rport=5060
Max-Forwards: 69
From: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
To: <sip:155@172.16.3.3:5060>;tag=1262186908
Contact: <sip:103@172.16.5.44:5060>
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Content-Length: 0
----------
BYE sip:172.16.3.0:5050 SIP/2.0
Via: SIP/2.0/UDP 172.16.3.3:5060;branch=z9hG4bKe066.64948323.0
Via: SIP/2.0/UDP 172.16.5.44:5060;received=172.16.5.44;branch=z9hG4bK1e381a63;rport=5060
Max-Forwards: 69
From: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
To: <sip:155@172.16.3.3:5060>;tag=1262186908
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 103 BYE
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
----------
SIP/2.0 481 CallLegTransactionDoesNotExist
Via: SIP/2.0/UDP 172.16.3.3:5060;branch=z9hG4bKe066.64948323.0;received=172.16.3.3;rport=5060
Via: SIP/2.0/UDP 172.16.5.44:5060;received=172.16.5.44;branch=z9hG4bK1e381a63;rport=5060
To: <sip:155@172.16.3.3:5060>;tag=1262186908
From: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 103 BYE
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, SUBSCRIBE
Content-Length: 0
----------
BYE sip:103@172.16.5.44:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.3.0:5050;branch=z9hG4bKfe13e63d99524b06846bde0fedbd8a69;rport
To: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
From: <sip:155@172.16.3.3:5060>;tag=1262186908
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 103 BYE
Max-Forwards: 70
Route: <sip:172.16.3.3;lr;ftag=as678f227c>
Content-Length: 0
----------
SIP/2.0 481 Call leg/transaction does not exist
Via: SIP/2.0/UDP 172.16.3.0:5050;received=172.16.3.0;branch=z9hG4bKfe13e63d99524b06846bde0fedbd8a69;rport=5050
From: <sip:155@172.16.3.3:5060>;tag=1262186908
To: "Station 103 " <sip:103@172.16.5.44>;tag=as678f227c
Call-ID: 2697521655d00bab6de06a5941ddf8b4@172.16.5.44:5060
CSeq: 103 BYE
Server: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
----------
谢谢 :-)