Re: [SR-Users] Contact header modification - Kamailio
How did you conclude that it doesn’t work? > On Aug 3, 2022, at 8:06 AM, Ankit Jayswal wrote: > > Hello, > > Can you suggest directly replacing the value of the Contact header ? As > remove_hf("Contact") does not work for me. > > I need just Contact: instead of, > Contact: > > > On Tue, Aug 2, 2022 at 12:56 PM Alex Balashov > wrote: > The suggestion given by Henning was to remove the existing Contact header, > and replace it with whatever value you like. > > > On Aug 2, 2022, at 1:12 AM, Ankit Jayswal wrote: > > > > Hello, > > Whenever I try the remove_hf("Contact") function the call leg is divided > > into the two parts and the call is not getting set up properly and not > > progressing. > > I am just looking for a function that can modify the Contact header value > > of an existing Contact header. > > > > On Mon, Aug 1, 2022 at 8:31 PM Henning Westerholt wrote: > > Hello, > > > > > > > > you need to do a “remove_hf(“Contact”)” before. > > > > > > > > Cheers, > > > > > > > > Henning > > > > > > > > -- > > > > Henning Westerholt – https://skalatan.de/blog/ > > > > Kamailio services – https://gilawa.com > > > > > > > > From: Ankit Jayswal > > Sent: Monday, August 1, 2022 4:26 PM > > To: Henning Westerholt > > Cc: Kamailio (SER) - Users Mailing List ; Amey > > Naik ; Devanand Jalla > > 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", ""); > > > > > > 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 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 > > > > > > > > From: sr-users On Behalf Of Ankit > > Jayswal > > Sent: Monday, August 1, 2022 2:37 PM > > To: sr-users@lists.kamailio.org > > Cc: Amey Naik ; Devanand Jalla > > > > 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: > > > > > > > > NEW (Needed): > > > > Contact: > > > > 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 > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ > > > __ > 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 > __ > 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 -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ __ 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
Re: [SR-Users] Contact header modification - Kamailio
Hello, Can you suggest directly replacing the value of the Contact header ? As remove_hf("Contact") does not work for me. I need just *Contact: http://sip:009122692405xx@10.52.26.98:5060>> *instead of, *Contact: * On Tue, Aug 2, 2022 at 12:56 PM Alex Balashov wrote: > The suggestion given by Henning was to remove the existing Contact header, > and replace it with whatever value you like. > > > On Aug 2, 2022, at 1:12 AM, Ankit Jayswal > wrote: > > > > Hello, > > Whenever I try the remove_hf("Contact") function the call leg is divided > into the two parts and the call is not getting set up properly and not > progressing. > > I am just looking for a function that can modify the Contact header > value of an existing Contact header. > > > > On Mon, Aug 1, 2022 at 8:31 PM Henning Westerholt wrote: > > Hello, > > > > > > > > you need to do a “remove_hf(“Contact”)” before. > > > > > > > > Cheers, > > > > > > > > Henning > > > > > > > > -- > > > > Henning Westerholt – https://skalatan.de/blog/ > > > > Kamailio services – https://gilawa.com > > > > > > > > From: Ankit Jayswal > > Sent: Monday, August 1, 2022 4:26 PM > > To: Henning Westerholt > > Cc: Kamailio (SER) - Users Mailing List ; > Amey Naik ; 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", ""); > > > > > > 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 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 > > > > > > > > From: sr-users On Behalf Of Ankit > Jayswal > > Sent: Monday, August 1, 2022 2:37 PM > > To: sr-users@lists.kamailio.org > > Cc: Amey Naik ; Devanand Jalla < > 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: > > > > > > > > NEW (Needed): > > > > Contact: > > > > 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 > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ > > > __ > 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 > __ 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
Re: [SR-Users] Contact header modification - Kamailio
The suggestion given by Henning was to remove the existing Contact header, and replace it with whatever value you like. > On Aug 2, 2022, at 1:12 AM, Ankit Jayswal wrote: > > Hello, > Whenever I try the remove_hf("Contact") function the call leg is divided into > the two parts and the call is not getting set up properly and not progressing. > I am just looking for a function that can modify the Contact header value of > an existing Contact header. > > On Mon, Aug 1, 2022 at 8:31 PM Henning Westerholt wrote: > Hello, > > > > you need to do a “remove_hf(“Contact”)” before. > > > > Cheers, > > > > Henning > > > > -- > > Henning Westerholt – https://skalatan.de/blog/ > > Kamailio services – https://gilawa.com > > > > From: Ankit Jayswal > Sent: Monday, August 1, 2022 4:26 PM > To: Henning Westerholt > Cc: Kamailio (SER) - Users Mailing List ; Amey > Naik ; Devanand Jalla > 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", ""); > > > 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 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 > > > > From: sr-users On Behalf Of Ankit > Jayswal > Sent: Monday, August 1, 2022 2:37 PM > To: sr-users@lists.kamailio.org > Cc: Amey Naik ; Devanand Jalla > > 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: > > > > NEW (Needed): > > Contact: > > 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 -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ __ 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
Re: [SR-Users] Contact header modification - Kamailio
Hello, Whenever I try the *remove_hf("Contact")* function the call leg is divided into the two parts and the call is not getting set up properly and not progressing. I am just looking for a function that can modify the Contact header value of an existing Contact header. On Mon, Aug 1, 2022 at 8:31 PM Henning Westerholt wrote: > Hello, > > > > you need to do a “remove_hf(“Contact”)” before. > > > > Cheers, > > > > Henning > > > > -- > > Henning Westerholt – https://skalatan.de/blog/ > > Kamailio services – https://gilawa.com > > > > *From:* Ankit Jayswal > *Sent:* Monday, August 1, 2022 4:26 PM > *To:* Henning Westerholt > *Cc:* Kamailio (SER) - Users Mailing List ; > Amey Naik ; 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", " <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 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 > > > > *From:* sr-users *On Behalf Of *Ankit > Jayswal > *Sent:* Monday, August 1, 2022 2:37 PM > *To:* sr-users@lists.kamailio.org > *Cc:* Amey Naik ; Devanand Jalla < > 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: > > > > *NEW (Needed):* > > Contact: 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
Re: [SR-Users] Contact header modification - Kamailio
Hello, Yes, actually my call flow for outbound calls is, Kamailio => Asterisk => Kamailio (route(PSTN)). SIP trunk is available at Kamailio server. So, when final outbound INVITE goes to the SIP trunk provider it expects a particular Contact header IP, instead of Asterisk server IP. On Mon, Aug 1, 2022 at 10:20 PM Alex Balashov wrote: > Before you do this, I would ask yourself why you’re doing this, and > whether it’s a good idea from a technical point of view. > > > On Aug 1, 2022, at 8:36 AM, Ankit Jayswal > wrote: > > > > 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: > > > > NEW (Needed): > > Contact: > > > > 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 > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ > > > __ > 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 > __ 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
Re: [SR-Users] Contact header modification - Kamailio
Before you do this, I would ask yourself why you’re doing this, and whether it’s a good idea from a technical point of view. > On Aug 1, 2022, at 8:36 AM, Ankit Jayswal wrote: > > 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: > > NEW (Needed): > Contact: > > 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 -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ __ 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
Re: [SR-Users] Contact header modification - Kamailio
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 Sent: Monday, August 1, 2022 4:26 PM To: Henning Westerholt Cc: Kamailio (SER) - Users Mailing List ; Amey Naik ; Devanand Jalla 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", "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 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 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 mailto:amey.n...@engagely.ai>>; Devanand Jalla 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: NEW (Needed): Contact: 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
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", "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 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 > > > > *From:* sr-users *On Behalf Of *Ankit > Jayswal > *Sent:* Monday, August 1, 2022 2:37 PM > *To:* sr-users@lists.kamailio.org > *Cc:* Amey Naik ; Devanand Jalla < > 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: > > > > *NEW (Needed):* > > Contact: 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
Re: [SR-Users] Contact header modification - Kamailio
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 On Behalf Of Ankit Jayswal Sent: Monday, August 1, 2022 2:37 PM To: sr-users@lists.kamailio.org Cc: Amey Naik ; Devanand Jalla 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: NEW (Needed): Contact: 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
[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: *NEW (Needed):* Contact: 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