[Kamailio-Users] HOWTO rewrite to: header

Tim Donahue tdonahue at vonsystems.com
Thu Mar 5 00:18:16 CET 2009


Iñaki Baz Castillo wrote:
> El Miércoles, 4 de Marzo de 2009, alexander merkulov escribió:
>> thats work for invite nice, but not work fro cancel
>> even this (very simple form) not change cancel
>>
>>           if (method == "BYE" || method == "CANCEL") {
>> #                 xlog("bye\n");a
>>                    xlog("L_INFO", "CANCEL - M=$rm RURI=$ru F=$fu T=$tu
>> IP=$si ID=$ci\n");
>>                    if(t_check_trans()){
>>                         xlog("triing to rewrite");
>>                         if ( subst('/192/aaa/ig') ) {};
>>                         t_relay();
>>                         exit;
>>                    }else{
>>                      xlog("no trans");
>>                      exit;
>>                    }
> 
> CANCEL is hop-by-hop. This means that when a proxy receives a CANCEL it 
> *doesn't* forward it. Instead it "eats" that CANCEL and *generates* a new 
> one. This is how SIP defines the behaviour of a CANCEL.
> 
> But again I ask you, why do you need rewritting the To header? It shouldn't be 
> required, neither in a CANCEL. In fact when a UAS receives a CANCEL it just 
> should inspect the Via "branch" parameter to match it against a current 
> INVITE server transaction.
> 
> 

Looking at the change he is attempting to make, it appears that he is
trying to force Kamailio to act more like an SBC doing NAT transversal
through a B2BUA scenario, than a proxy.

Tim



More information about the Users mailing list