Hello all,

 

I want to log the incoming and outgoing CANCEL on my Kamailio. I tried with a call of sip_trace in the default route

 

setflag(22);

if (method == “CANCEL”) {

                sip_trace();

                if (t_check_trans()) {

                               t_relay();

                               exit;

                }

}

 

This works great, I get the incoming CANCEL in the Database. But the outgoing CANCEL is not logged with flag set. So I tried to use onsend_route with the following lines:

 

onsend_route {

                xlog(“L_NOTICE”, “ SENDING  from $si \n $mb \n “);

                if ( method == “CANCEL” )

                               sip_trace();

}

 

I am using Kamailio Version 3.1.0 (with Patch for Siptrace in onsend_route by Daniel ).

 

But the CANCEL is not processed in the onsend_route at all. I do not even see the xlog-line. But tcpdump gives me the CANCEL outgoing.

 

Following callflow:

 

INVITE >

100         <

                               > INVITE

                               < 100

                               < 180

180         <

CANCEL>

                                > CANCEL

 

I am missing the last CANCEL.

 

Why is the CANCEL not logged with flag 22 set?

Why is the CANCEL not processed in the onsend_route?

 

 

Greetings

Timo