代码之家  ›  专栏  ›  技术社区  ›  TacB0sS

SIP被叫方未收到呼叫结束的通知

  •  2
  • TacB0sS  · 技术社区  · 15 年前

    我已经删除了以前的问题并发布了更新:

    我的SIP UAC有问题,一旦我收到来自B2BUA的呼叫方和被呼叫方的电话,并且呼叫方在呼叫时挂断呼叫(我发送取消请求并在呼叫方接收“请求已终止”),被呼叫方不会收到呼叫方已终止的任何通知。

    但是当被呼叫者拒绝呼叫时,呼叫者在这里会很忙。

    这里是 被叫者 侧面:

    /-----------------------   MEDIA SESSION   ------------------------/
       --- Multimedia-Session: Composed Audio ---
    1. Media Session:  "Audio"      enabled=true
         States:
            [Disconnected] 
     Capturers: (1 in total)
       Stream 1: audio device - DirectSoundCapture
         Formats: 
           [PCMU/8000]
    
      Connection Details:
        My address: 10.0.0.2:52044
        Participants: (1 in total)
          Address 1: HostAddress:17364
    
    /--------------------   END OF MEDIA SESSION   --------------------/
    
    
    /-------------------------   BEGINNING   --------------------------/
    
    --------------------------------  Request: Test 2-->Me: INVITE#102  --------------------------------
    INVITE sip:430@Host SIP/2.0
    Via: SIP/2.0/UDP HostAddress:5060;branch=z9hG4bK1fd06834;rport=5060;received=HostAddress
    From: "Test 2" <sip:410@HostAddress>;tag=as2b22eddf
    To: <sip:430@Host>
    Contact: <sip:410@HostAddress>
    Call-ID: 35e0e8655b20ad886f137a0c0e563809@HostAddress
    CSeq: 102 INVITE
    User-Agent: Freeswitch 1.2.3
    Max-Forwards: 70
    Date: Sun, 11 Jul 2010 02:44:43 GMT
    Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
    Supported: replaces
    Content-Type: application/sdp
    Content-Length: 264
    
    v=0
    o=root 27669 27669 IN IP4 HostAddress
    s=session
    c=IN IP4 HostAddress
    t=0 0
    m=audio 17364 RTP/AVP 0 8 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=silenceSupp:off - - - -
    a=ptime:20
    a=sendrecv
    
    ------------------------  Response: Me ==> Test 2: INVITE#102: 180 Ringing  ------------------------
    SIP/2.0 180 Ringing
    Via: SIP/2.0/UDP HostAddress:5060;branch=z9hG4bK1fd06834;rport=5060;received=HostAddress
    From: "Test 2" <sip:410@HostAddress>;tag=as2b22eddf
    To: <sip:430@Host>;tag=e125be76
    Call-ID: 35e0e8655b20ad886f137a0c0e563809@HostAddress
    CSeq: 102 INVITE
    Content-Length: 0
    
    ------------------------  Response: Me ==> Test 2: INVITE#102: 603 Decline  ------------------------
    SIP/2.0 603 Decline
    Via: SIP/2.0/UDP HostAddress:5060;branch=z9hG4bK1fd06834;rport=5060;received=HostAddress
    From: "Test 2" <sip:410@HostAddress>;tag=as2b22eddf
    To: <sip:430@Host>;tag=e125be76
    Call-ID: 35e0e8655b20ad886f137a0c0e563809@HostAddress
    CSeq: 102 INVITE
    Content-Length: 0
    
    /----------------------------   END   -----------------------------/
    

    我必须在被呼叫者端拒绝,因为如果我不响应请求,被呼叫者帐户将陷入一个循环,然后客户端将永远返回忙碌状态,并且请求不会到达该客户端,或者至少直到帐户被删除。

    还有一件事,B2BUA不会向拒绝响应发送任何消息,我应该从服务器获取ACK吗?

    这里是 呼叫者 侧面:

    /-----------------------   MEDIA SESSION   ------------------------/
       --- Multimedia-Session: Audio ---
    1. Media Session:  "Audio"      enabled=true
         States:
            [Disconnected] 
     Capturers: (1 in total)
       Stream 1: audio device - DirectSoundCapture
         Formats: 
           [PCMU/8000]
           [GSM/8000]
           [G723/8000]
           [DVI4/8000]
           [MPA/-1]
           [DVI4/11025]
           [DVI4/22050]
    
      Connection Details:
        My address: 
        Participants: (0 in total)
    
    /--------------------   END OF MEDIA SESSION   --------------------/
    
    
    /-------------------------   BEGINNING   --------------------------/
    
    --------------------------  Request: Client 410-->Client 430: INVITE#81  --------------------------
    INVITE sip:430@host SIP/2.0
    Subject: Session Name: Nu-Art Software
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK4dd6bdf707a85fb5a73faec9ff648f703236
    Contact: "Client 410" <sip:410@host>
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>
    Organization: Future Earth
    Max-Forwards: 32
    CSeq: 81 INVITE
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    Allow: INVITE,ACK,CANCEL,BYE,OPTIONS
    Expires: 60
    Content-Type: application/sdp
    Content-Length: 324
    
    v=0
    o=Client 410 699719 699719 IN IP4 MyAddress
    s=Audio
    i=Made by: Nu-Art Software 07-2010
    c=IN IP4 MyAddress
    t=0 0
    m=audio 2871 RTP/AVP 0 3 4 5 14 16 17
    a=rtpmap:0 PCMU/8000
    a=rtpmap:3 GSM/8000
    a=rtpmap:4 G723/8000
    a=rtpmap:5 DVI4/8000
    a=rtpmap:14 MPA/-1
    a=rtpmap:16 DVI4/11025
    a=rtpmap:17 DVI4/22050
    
    -------  Response: Client 430 ==> Client 410: INVITE#81: 407 Proxy Authentication Required  -------
    SIP/2.0 407 Proxy Authentication Required
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK4dd6bdf707a85fb5a73faec9ff648f703236;received=MyAddress
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    CSeq: 81 INVITE
    User-Agent: Freeswitch 1.2.3
    Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
    Supported: replaces
    Proxy-Authenticate: Digest algorithm=MD5,realm="asterisk",nonce="574b3d49"
    Content-Length: 0
    
    ----------------------------  Request: Client 410-->Client 430: ACK#81  ----------------------------
    ACK sip:430@host SIP/2.0
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK4dd6bdf707a85fb5a73faec9ff648f703236
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>
    Max-Forwards: 32
    CSeq: 81 ACK
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    Content-Length: 0
    
    --------------------------  Request: Client 410-->Client 430: INVITE#82  --------------------------
    INVITE sip:430@host SIP/2.0
    Subject: Session Name: Nu-Art Software
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236
    Contact: "Client 410" <sip:410@host>
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    Organization: Future Earth
    Max-Forwards: 32
    CSeq: 82 INVITE
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    Allow: INVITE,ACK,CANCEL,BYE,OPTIONS
    Expires: 60
    Content-Type: application/sdp
    Proxy-Authorization: Digest username="410",nonce="574b3d49",realm="asterisk",uri="sip:410@host",algorithm=MD5,response="e674e15de7b6dd05c7fe6da6c155befd"
    Content-Length: 324
    
    v=0
    o=Client 410 699719 699719 IN IP4 MyAddress
    s=Audio
    i=Made by: Nu-Art Software 07-2010
    c=IN IP4 MyAddress
    t=0 0
    m=audio 2871 RTP/AVP 0 3 4 5 14 16 17
    a=rtpmap:0 PCMU/8000
    a=rtpmap:3 GSM/8000
    a=rtpmap:4 G723/8000
    a=rtpmap:5 DVI4/8000
    a=rtpmap:14 MPA/-1
    a=rtpmap:16 DVI4/11025
    a=rtpmap:17 DVI4/22050
    
    -------------------  Response: Client 430 ==> Client 410: INVITE#82: 100 Trying  -------------------
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    CSeq: 82 INVITE
    User-Agent: Freeswitch 1.2.3
    Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
    Supported: replaces
    Contact: <sip:430@HostAddress>
    Content-Length: 0
    
    ------------------  Response: Client 430 ==> Client 410: INVITE#82: 180 Ringing  ------------------
    SIP/2.0 180 Ringing
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    CSeq: 82 INVITE
    User-Agent: Freeswitch 1.2.3
    Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
    Supported: replaces
    Contact: <sip:430@HostAddress>
    Content-Length: 0
    
    --------------------------  Request: Client 410-->Client 430: CANCEL#82  --------------------------
    CANCEL sip:430@host SIP/2.0
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    CSeq: 82 CANCEL
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236
    Max-Forwards: 32
    Content-Length: 0
    
    ---------------------  Response: Client 430 ==> Client 410: CANCEL#82: 200 OK  ---------------------
    SIP/2.0 200 OK
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    CSeq: 82 CANCEL
    User-Agent: Freeswitch 1.2.3
    Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
    Supported: replaces
    Content-Length: 0
    
    -------------  Response: Client 430 ==> Client 410: INVITE#82: 487 Request Terminated  -------------
    SIP/2.0 487 Request Terminated
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>;tag=as78e28f4d
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    CSeq: 82 INVITE
    User-Agent: Freeswitch 1.2.3
    Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
    Supported: replaces
    Content-Length: 0
    
    ----------------------------  Request: Client 410-->Client 430: ACK#82  ----------------------------
    ACK sip:430@host SIP/2.0
    Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236
    From: "Client 410" <sip:410@host>;tag=8f7b94cb
    To: "Client 430" <sip:430@host>
    Max-Forwards: 32
    CSeq: 82 ACK
    Call-ID: 97ee019923d6a6d11a9476d71880e289@10.0.0.1
    Content-Length: 0
    
    /----------------------------   END   -----------------------------/
    

    弗兰克,我尽量注意你的细节,也许我错过了什么,因为对方还没有接到提前挂机的通知。

    你知道为什么吗?

    事先谢谢,

    亚当。

    1 回复  |  直到 14 年前
        1
  •  1
  •   jesup    14 年前

    1)6xx是不常见的;通常拒绝呼叫是用4xx完成的(通常“这里很忙”)。

    2)缺少对目标的取消是SIP服务器中的一个错误。(好吧,他们不是 必修的 如果取消,则发送取消,但他们确实应该发送。)

    推荐文章