Hello, you need to do a “remove_hf(“Contact”)” before.
Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com<https://gilawa.com/> From: Ankit Jayswal <ankit.jays...@engagely.ai> Sent: Monday, August 1, 2022 4:26 PM To: Henning Westerholt <h...@gilawa.com> Cc: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Amey Naik <amey.n...@engagely.ai>; Devanand Jalla <devanand.ja...@engagely.ai> Subject: Re: [SR-Users] Contact header modification - Kamailio Hello, Thanks for your reply, but I am looking to replace the value in the Contact header. Which function can help me to do this ? I tried, assign_hf_value("Contact", "<sip:00912269240xxx@10.52.26.98:5060<http://sip:00912269240xxx@10.52.26.98:5060>>"); But that is not working properly, it assigns value but previous value also remains in it. On Mon, Aug 1, 2022 at 6:11 PM Henning Westerholt <h...@gilawa.com<mailto:h...@gilawa.com>> wrote: Hello, the topos module can do that, among other things. Alternatively there is also the topoh module, which do not need any backend storage. Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com<https://gilawa.com/> From: sr-users <sr-users-boun...@lists.kamailio.org<mailto:sr-users-boun...@lists.kamailio.org>> On Behalf Of Ankit Jayswal Sent: Monday, August 1, 2022 2:37 PM To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org> Cc: Amey Naik <amey.n...@engagely.ai<mailto:amey.n...@engagely.ai>>; Devanand Jalla <devanand.ja...@engagely.ai<mailto:devanand.ja...@engagely.ai>> Subject: [SR-Users] Contact header modification - Kamailio Hello Team, I am in need to modify the contact header in Kamailio before sending an INVITE request to the SIP trunk provider. Basically the IP address I need to modify in the contact header. Please suggest a better way to do this. Below is an example. OLD (Existing): Contact: <sip:009169240xxx@45.118.162.x:5080;alias=10.52.26.102~5080~1> NEW (Needed): Contact: <sip:00912269240xxx@10.52.26.98:5060<http://10.52.26.98:5060>> I tried various functions from the textops module but no hope. I am looking for a function that can replace the contact header's value. Please help me with this. -- Thanks & Regards, Ankit Jayswal | Specialist - Software Development
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users