[SR-Users] q-value on unsupported clients

Olle E. Johansson oej at edvina.net
Thu Nov 5 10:22:58 CET 2015


> On 05 Nov 2015, at 10:15, Daniel Tryba <d.tryba at pocos.nl> wrote:
> 
>> Based on the xlog output, the following doesn't appear to be working -
>> remove_hf("Contact");
>> append_hf("Contact: $var(newct)\r\n");
>> 
>> I've actually had a similar issue before replacing a hdr so I'm wondering if
>> I'm doing something wrong?
> 
> Header manipulation is doesn't update the already parsed message that is being 
> used for $hdr etc.
This is an important fact for all routing scripts. You have one message in memory that you
read from and one copy that you apply changes on. The changes are applied when you send
the message or when you run the function below.

> You have to apply the changes with
> http://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.msg_apply_changes

Not that if you run this function you owerwrite the incoming message and have no way of going
back to the original incoming message. 

/O


More information about the sr-users mailing list