2009/4/2 sasirekha jaganathan <sasi_kool(a)yahoo.com>om>:
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(a)aliax.net>