[OpenSIPS-Users] Replace IP in To Field
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Sep 2 10:36:09 CEST 2014
Hi John,
Actually you should use the uac_replace_to() function from the uac module:
http://www.opensips.org/html/docs/modules/1.11.x/uac.html#id293710
This wil do a SIP-wise change over the TO header (a dialog persistent
change).
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.08.2014 16:50, John Komara wrote:
> I am able to accomplish this through the use of the textops module
> though it is nowhere near as clean as what it appears the uac module
> would do.
>
> From everything that I have read the “To:” field is the IP of the
> logical recipient. The Record-Route and Via headers are used to get
> the traffic to where it needs to go, correct? If I am sending a
> message through this path:
>
> SwitchA -> ProxyA -> ProxyB -> SwitchB
>
> Does the “To:” field have to contain the IP address of ProxyB? Before
> I was able to modify the header with substr it contained the IP
> address of ProxyA (my side).
>
> Thank you,
>
> John Komara
>
> From: Johnathan Komara <john.komara at mongoosemetrics.com
> <mailto:john.komara at mongoosemetrics.com>>
> Reply-To: OpenSIPS users mailling list <users at lists.opensips.org
> <mailto:users at lists.opensips.org>>
> Date: Wednesday, August 27, 2014 at 6:08 PM
> To: "users at lists.opensips.org <mailto:users at lists.opensips.org>"
> <users at lists.opensips.org <mailto:users at lists.opensips.org>>
> Subject: [OpenSIPS-Users] Replace IP in To Field
>
> I need to replace the IP in the To field. It is a requirement for a
> customer. I am trying to do this with uac_replace_to. It replaces the
> To field in the INVITE. However it does not replace it ACK to the
> 200OK. Looking at the logs I see that a dialog is created for the
> INVITE. Immediately after the INVITE is sent the dialog is destroyed.
> I am assuming that this is why the To field is not being modified in
> the ACK.
>
> It looks as though the dialog is never stored. I have tried to do this
> in memory and in mysql. I am never able to retrieve a dialog with the
> “opensipsctl fifo dlg_list” command. I have attached links to my debug
> logs and config.
>
> Is there a better way to accomplish this than what I am trying to do?
>
> Debug Logs: http://pastebin.com/mvKx5AQp
> Config: http://pastebin.com/n9vwncpU
>
> Thank you,
>
> John
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140902/23169843/attachment.htm>
More information about the Users
mailing list