[SR-Users] Rewrite contact header

R, Rajkumar (Raj) rajkumaradass at avaya.com
Tue May 21 08:41:43 CEST 2019


Thanks, I was able to achieve it with below steps.

            $var(contact) = $sel(contact.uri);
            $var(alias) = $(var(contact){uri.param,alias});
            $var(alias) = ";alias=" + $var(alias);
            replace_all($var(alias), "");


thanks,
raj

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Federico Cabiddu
Sent: Friday, May 17, 2019 4:27 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Rewrite contact header

Hi,
you can try
https://kamailio.org/docs/modules/5.2.x/modules/textopsx.html#textopsx.f.remove_hf_value<https://urldefense.proofpoint.com/v2/url?u=https-3A__kamailio.org_docs_modules_5.2.x_modules_textopsx.html-23textopsx.f.remove-5Fhf-5Fvalue&d=DwMFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=LDE-f1bLxMPmcrsp8ONITcznNqEIlhe9ffKEZPeB7EI&m=FsNqZ27hgivuKM97kxh8WYtbqBokksTtSUyiYH-KcCU&s=wbMkMnlt6a7oJ6eYdYKvqQA19D-YMI7eLxkSbeGg1jA&e=>

Cheers,

Federico

On Fri, May 17, 2019 at 12:45 PM R, Rajkumar (Raj) <rajkumaradass at avaya.com<mailto:rajkumaradass at avaya.com>> wrote:
Hello,

We are using alias routing from NATHelper module and I’ve a case where the alias part ’alias=ip~port~transport’ needs to be removed from the contact header in 2xx message.  There’s contact header reference “$ct” pseudo variable but it is read only.  Is there any approach available to achieve this as I haven’t found anything in the forum archive search so far.

thanks,
raj

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.kamailio.org_cgi-2Dbin_mailman_listinfo_sr-2Dusers&d=DwMFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=LDE-f1bLxMPmcrsp8ONITcznNqEIlhe9ffKEZPeB7EI&m=FsNqZ27hgivuKM97kxh8WYtbqBokksTtSUyiYH-KcCU&s=Ze_k98W_AfJk8Zb2nFIfbkhGNr2vp_cG9FDhILUssIk&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190521/8a0a4e23/attachment.html>


More information about the sr-users mailing list