[SR-Users] Basic question

Marius Zbihlei mariuszbi at gmail.com
Sun Apr 21 16:31:48 CEST 2013


Hello,

The function is
http://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.msg_apply_changes,
but note that  unexpected results might happen.

Marius


On Sun, Apr 21, 2013 at 2:09 PM, אורן אברהם <oren.av.jnk at gmail.com> wrote:

> thank you for the explanation.
>
> can  you please tell me the name of the function that copy the changes to
> the inbound buffer ?
>
>
>
>
> 2013/4/21 Olle E. Johansson <oej at edvina.net>
>
>>
>> 21 apr 2013 kl. 01:50 skrev אורן אברהם <oren.av.jnk at gmail.com>:
>>
>> > Dear List.
>> >
>> > I'm trying to change the contact header of a message. ( by calliing
>> add_contact_alias - that shuld add the ;alias= parameter to the contact
>> header)
>> > but, when i print the contact header (with xlog), it shows no change.
>> >
>> > I know the function works, and that it added the parameter as expected
>> by using debug mode. (it sais that it was added)
>> >
>> > Can anyone explain me why i don't see that change in the xlog ? (i've
>> printer both $ct and $hdr(Contact))
>> >
>>
>> Kamailio keeps two buffers of the incoming message, one is a copy of the
>> incoming and the other one
>> is the one where changes happen, a template for any outbound message used
>> when forwarding
>> to the next hop.
>>
>> If you change headers, they are changed in the outbound buffer, not the
>> incoming. When you use
>> functions to check headers, you check the incoming buffer.
>>
>> There is a function to apply changes to the inbound buffer that is needed
>> sometimes, but very
>> few times. It can be quite confusing if you are not aware of how changes
>> to messages are applied.
>>
>> /O
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130421/4bf1bc8b/attachment.htm>


More information about the sr-users mailing list