[SR-Users] subst_hf does unexpected append instead of a replace (WAS: How do I make subst_hf() use variables in search (not replacement)?)

Daniel-Constantin Mierla miconda at gmail.com
Wed Aug 13 16:51:43 CEST 2014


On 13/08/14 16:41, Alex Villací­s Lasso wrote:
> El 13/08/14 03:12, Daniel-Constantin Mierla escribió:
>> Would be nicer not to forward all headers inline, that results in a 
>> message easy to read (especially on mobile devices) and therefore 
>> faster to answer.
>>
>> You use subst over contact and set contact allias, which both append 
>> values there, deleting same old content. Note that any change to sip 
>> message is not applied immediately, but kept as a diff operation. You 
>> need to use msg_apply_changes() after each change that you need to be 
>> visible immediately -- read the readme of textopsx for proper usage 
>> of this function.
>>
>> Cheers,
>> Daniel
> Thanks, I will try this immediately. However, the call to 
> add_contact_alias only runs if a websocket is detected, and I am 
> having this issue over ordinary SIP through UDP.
Well, the alias parameter in contact is there, so one of the functions 
adding it is executed.

Maybe you can load debugger and enable cfgtrace to see what actions from 
kamailio.cfg are executed.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140813/9aed8d49/attachment.html>


More information about the sr-users mailing list