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 (10.250.242.74) 
which is behind private NIC eth0 (10.197.26.170)
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 -> 10.250.242.74:5060
SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.250.242.74:5060;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:10.197.26.170;r2=on;lr;ftag=2F81324631;did=3a2.4667b68<sip:10.197.26.170;r2=on;lr;ftag=2F81324631353641A405EA00;did=3a2.4667b68>>
 From: 
sip:[email protected];tag=2F81324631<sip:[email protected];tag=2F81324631353641A405EA00>
 To: sip:[email protected]:5060;tag=231469dIr894p0D461D0t66 Call-ID: 
020A3EA03A8@SFESIP4-id1-ext CSeq: 1 INVITE Contact: <sip:[email protected]:5060>

I’m not sure if I do it right way because the packet (sip5) goes to 
10.250.242.74 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,
Regards,
Ehrny


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to