[Kamailio-Users] TextOps - Removal of To

Iñaki Baz Castillo ibc at aliax.net
Thu Apr 2 11:52:47 CEST 2009


2009/4/2 sasirekha jaganathan <sasi_kool at yahoo.com>:
> Hi,
>   I need only the To value omitting the tag parameter in the To header.
>
> $avp(s:toadd)=$tu;
> if(remove_hf("To")){
>               xlog("Removed To tag \n");
> }
> insert_hf("To: $avp(s:toadd)\r\n");
>
> The log "Removed To tag" gets printed but after inserting if I try to print
> the header value with $hdr(To) it shows the value with tag-param too.
>
> Is there anything wrong?

No, it's the expected behaviour. Header operations (remove, insert)
are performed when the request *leaves* Kamailio, not during the
script processing.

This is, if you delete a header you can't check it with $hdr(header)
since the modification is not done yet.

-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the Users mailing list