客户端481在重定向期间拒绝了Opensips byes

时间:2015-06-25 14:43:07

标签: sip sip-server opensips

Server是Opensips服务器1.10.0-tls(linux)。它可以处理与本地站的对话,最近它已经更新,允许来自外部系统的站。它通过更改$ ru中的用户名,IP和端口来实现此目的,如果该站本地不存在($ tu未触及)。这适用于邀请,通话和所有类似的消息。

我遇到的问题是来自外部服务器的那些被传递到本地客户端站点的脚本被481拒绝(呼叫支路/交易不存在),我可以确认是来自客户端软件,但它接受来自同一服务器上的本地站点的麻烦,没有任何麻烦。从本地到本地的呼叫结束,从本地到外部的呼叫全部关闭确定,它只是从外部呼叫者到不能关闭的本地被叫者的呼叫(这是被叫481的被叫者)。

据我所知,这是由于to / from和call-id中的标签不同而没有发生事务匹配引起的;我明白改变部分$ ru的某些内容(比如我的$ ru脚本)可能会对哈希产生影响以确定交易,但我不会更改标签或callid,只需更改$ ru名称即可使它转到正确的IP和站名。

我的问题是如何在不更改客户端应用程序的情况下在服务器上解决此问题?我已经在客户端工作站上的wirehark捕获中提供了以下发送的消息的一些示例,所以我不确定我做错了什么..我尝试了不同的事情没有运气的服务器。有没有办法通过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  
----------

谢谢: - )

1 个答案:

答案 0 :(得分:1)

请参阅上面的评论,问题是客户端应用程序遵循非标准行为来检查再见消息(它检查到,而不是to-tag)。通过客户端应用程序更改解决问题。