[SR-Users] [SIP Transaction] Handle Cancel message

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 9 14:27:12 CET 2017


Hello,

can you provide pcap (or full ngrep output) for all messages of such a
call, from initial invite, including all responses and the other
requests? The sip trace has to be taken on kamailio server.

Kamailio doesn't send 481 from the C code in the case of call, it either
receives it or it is something in config.

Cheers,
Daniel


On 09/03/2017 06:59, Hai Bui Duc Ha wrote:
> Hi all,
>
> I have problem when use module pusher on Kazoo.
> The user after receive call from pusher can not receive the Cancel
> message if have another people pick up this phone.
> I trace log and debug on Kamailio and see the Freeswitch sent Cancel
> message but Kamailio reply 481 - Call leg/transaction does not exist.
>
> The configure on Kamailio: default.cfg
> =======================================================
> /route[PREPARE_INITIAL_REQUESTS]/
> /{/
> /    if (is_method("CANCEL")) {/
> /        if(t_lookup_cancel()) xlog("L_INFO","$ci|log|========
> t_lookup_cancel()");/
> /        xlog("L_INFO","$rm from $fu (IP:$si:$sp) ---CAPTURED IN
> MAIN---\n");/
> /        if (t_check_trans()) {/
> /            xlog("L_INFO","$rm from $fu (IP:$si:$sp) ---CHECK TRANS
> TRUE---\n");/
> /            //xlog("L_INFO",
> "$ci|log|====================================");/
> /            route(RELAY);/
> /        } else {/
> /            xlog("L_INFO","$rm from $fu (IP:$si:$sp) ---CHECK TRANS
> FALSE---\n");/
> /            sl_send_reply("481", "Call leg/transaction does not exist");/
> /        }/
> /        exit();/
> /    } else if (is_method("ACK")) {/
> /        if (t_check_trans()) {/
> /            route(RELAY);/
> /        }/
> /        exit();/
> /    }/
> =======================================================
>
> As I read
> on http://kamailio.org/docs/modules/4.3.x/modules/tm.html#tm.f.t_check_trans
> Kamailio see the cancel message not same the transaction INVITE message.
>
> INVITE message:
> ------------------------------------------------------------------------
> INVITE sip:100 at quydang.htk.cvoice SIP/2.0
> Via: SIP/2.0/UDP 192.168.1.77:11000;rport;branch=z9hG4bKK9jyp8mXUZHgS
> Route: <sip:192.168.1.77:5060 <http://192.168.1.77:5060>>
> Max-Forwards: 49
> From: "02 quy" <sip:102 at quydang.htk.cvoice>;tag=04K2SappeyDtj
> To: <sip:100 at quydang.htk.cvoice>
> Call-ID: 19fa9228-ef95-11e6-b473-1f645951fd7b
> CSeq: 103030653 INVITE
> Contact: <sip:mod_sofia at 192.168.1.77:11000
> <http://sip:mod_sofia@192.168.1.77:11000>>
> User-Agent: Anttel
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
> Supported: path, replaces
> Allow-Events: talk, hold, conference, presence, as-feature-event,
> dialog, line-seize, call-info, sla, include-session-description,
> presence.winfo, message-summary, refer
> Content-Type: application/sdp
> Content-Disposition: session
> Content-Length: 247
> X-AUTH-IP: 192.168.1.141
> X-AUTH-PORT: 64799
> X-KAZOO-AOR: sip:100 at quydang.htk.cvoice
> X-KAZOO-PUSHER-Token-Proxy: sip:192.168.1.77:5060
> <http://192.168.1.77:5060>
> X-KAZOO-PUSHER-Token-ID:
> 803F0D6610AC5979C6F0513A3A4BE62E0BAF1530DC7A98C2C0DC13D784585FBE
> X-KAZOO-PUSHER-Token-Type: apple
> X-KAZOO-PUSHER-Token-App: com.htkinc
> X-FS-Support: update_display,send_info
> Remote-Party-ID: "02 quy"
> <sip:102 at quydang.htk.cvoice>;party=calling;screen=yes;privacy=off
>
> v=0
> o=FreeSWITCH 1486708670 1486708671 IN IP4 192.168.1.77
> s=FreeSWITCH
> c=IN IP4 192.168.1.77
> t=0 0
> m=audio 24764 RTP/AVP 0 8 101 13
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=ptime:20
> ------------------------------------------------------------------------
>
> CANCEL message:
> ------------------------------------------------------------------------
> CANCEL sip:100 at quydang.htk.cvoice SIP/2.0
> Via: SIP/2.0/UDP 192.168.1.77:11000;rport;branch=z9hG4bKK9jyp8mXUZHgS
> Route: <sip:192.168.1.77:5060 <http://192.168.1.77:5060>>
> Max-Forwards: 49
> From: "02 quy" <sip:102 at quydang.htk.cvoice>;tag=04K2SappeyDtj
> To: <sip:100 at quydang.htk.cvoice>
> Call-ID: 19fa9228-ef95-11e6-b473-1f645951fd7b
> CSeq: 103030653 CANCEL
> Reason: SIP;cause=200;text="Call completed elsewhere"
> Content-Length: 0
> ------------------------------------------------------------------------
>
> How can I know it same transaction ? We have any idea to solve this
> problem ?
> Thank for advice !
>
> Regards,
> Hai Bui
>
> -- 
> Hai Bui
> VoIP engineer, Cvoice team, HTK-HCM Office
> Mobile: +84-165-618-9876
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170309/fcf4b033/attachment.html>


More information about the sr-users mailing list