[OpenSIPS-Users] $ai transformation

Ehrny y at jettel.ru
Sat Nov 19 12:06:03 CET 2016

Hi Răzvan,
I gues so.
I’ve got      t_on_reply("1");       in the route

and at the end of the script there is:

onreply_route[1] {

But it doesn’t seem to change send_socket back to priv IP addr ((

Kind regards,

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Friday, November 18, 2016 12:22 PM
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] $ai transformation

Hi, Ehrny!

Did you try setting the private socket on the reply?

Best regards,

Răzvan Crainea

OpenSIPS Solutions

On 11/17/2016 01:00 AM, Ehrny wrote:
Dear Răzvan,
Thanks again for the prompt help. I was able to change the headers as needed but I’m stuck with another problem(
I’ve got opensips with two Ethernet adapters, eth1 as a private and another one eth0 as public.  Opensips works fine when the call is coming on the public eth0 and leaves opensips through the same public adapter. (All the GWs are behind that public eth0 instead of one ). The problem happens when the call comes in through the private eth1, please see the drawing in attachment.

-          sip1.  After I’ve got invite from provider on the private eth1 , I send it through the public eth0.

-          sip2.  I use   force_send_socket(udp:PUBLIC_IP:PORT) for the call to be able to pass through the opensips and come back from external GW (x.x.82.139). I also change SIP Request's URI and use uac_replace_to () to change these fields as needed.

-          sip4.  Opensips has got 180 Ringing from external GW (x.x.82.139)

-          sip5.  Opensips tries to send it back to originator ( which is behind private NIC eth0 (
the call can not be set up because I send reply from my public eth1

2016-11-16 18:56:14      : x.x.80.43:5060 ->
SIP/2.0 180 Ringing Via: SIP/2.0/UDP;branch=z9hG4bKqci5ec Record-Route: <sip:x.x.80.43;r2=on;lr;ftag=2F81324631;did=3a2.4667b68<sip:x.x.80.43;r2=on;lr;ftag=2F81324631353641A405EA00;did=3a2.4667b68>> Record-Route: <sip:;r2=on;lr;ftag=2F81324631;did=3a2.4667b68<sip:;r2=on;lr;ftag=2F81324631353641A405EA00;did=3a2.4667b68>> From: sip:300940 at domain.com;tag=2F81324631<sip:300940 at domain.com;tag=2F81324631353641A405EA00> To: sip:300905 at domain.com:5060;tag=231469dIr894<sip:300905 at domain.com:5060;tag=231469dIr894p0D461D0t66> Call-ID: 020A3EA03A8 at SFESIP4-id1-ext CSeq: 1 INVITE Contact: <sip:54321 at x.x.82.139:5060>

I’m not sure if I do it right way because the packet (sip5) goes to with the source ip of public eth0 and not the one it should pass through to be able to come back.
What is the right way in my case to get the call through?
Thank you for all of your help,


Users mailing list

Users at lists.opensips.org<mailto:Users at lists.opensips.org>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161119/a3aa2611/attachment.htm>

More information about the Users mailing list