[OpenSIPS-Users] CANCEL packet modification.

Igor Olhovskiy igorolhovskiy at gmail.com
Mon Aug 4 14:40:05 CEST 2014


Hi!

I've tried some modification of in-transaction CANCEL packets.
Idea A call B, than A cancels call.
Initial CANCEL:

*CANCEL* sip:0919082171 at XXXXXXX SIP/2.0
Via: SIP/2.0/UDP 31.172.143.70;rport;branch=*z9hG4bKHg59atZ9pDDHg*
Route: <sip:31.172.143.67:5060>
Max-Forwards: 68
From: "2063259" <sip:2063259 at 31.172.143.70>;tag=*N1D0tceygg3tN*
To: <sip:0919082171 at XXXXXXXX>
Call-ID: *ed5d0207-9675-1232-e38f-000c29eaa3c3*
CSeq: 63241643 *CANCEL*
Reason: SIP;cause=487;text="ORIGINATOR_*CANCEL*"
Content-Length: 0

I've simply add

if (is_method("CANCEL")) {
...
    xlog("L_INFO", "CANCEL!");
    append_hf("X-Hint: CANCEL!\r\n");
    if (t_check_trans()) {
        xlog("L_INFO", "CANCEL is in transaction!");
        t_relay();
    }
}

In logs I see:

CANCEL!
CANCEL is in transaction!

but I can't see appended header to outgoing CANCEL packet.

Outgoing CANCEL is


*CANCEL* sip:0919082171 at XXXXXXX SIP/2.0
Via: SIP/2.0/UDP 31.172.143.67:5060;branch=*z9hG4bKed78.b56ef11.1*
From: "2063259" <sip:2063259 at 31.172.143.70>;tag=*N1D0tceygg3tN*
Call-ID: *ed5d0207-9675-1232-e38f-000c29eaa3c3*
To: <sip:0919082171 at XXXXXXX>
CSeq: 63241643 *CANCEL*
Max-Forwards: 70
Reason: SIP;cause=487;text="ORIGINATOR_*CANCEL*"
User-Agent: OpenSIPS (1.11.2-notls (x86_64/linux))
Content-Length: 0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140804/bd3095e0/attachment-0001.htm>


More information about the Users mailing list