[SR-Users] Contact header modification - Kamailio

Ankit Jayswal ankit.jayswal at engagely.ai
Tue Aug 2 07:09:26 CEST 2022


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 <abalashov at evaristesys.com>
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 <ankit.jayswal at engagely.ai>
> 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: <sip:009169240xxx at 45.118.162.x:5080;alias=10.52.26.102~5080~1>
> >
> > NEW (Needed):
> > Contact: <sip:00912269240xxx at 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 at 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 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220802/5dc785db/attachment.htm>


More information about the sr-users mailing list