[OpenSIPS-Users] openSIPs behind NAT

Andrew Pogrebennyk andrew.pogrebennyk at portaone.com
Thu Sep 11 23:55:50 CEST 2008


Hi Andrijana,

Do you mean the server does not have a public IP and 145.18.29.67 is 
just a public IP mapping configured on the NAT/router? That explains why
advertised_address setting did not have effect on the Record-Route (it
must be an address OpenSIPS listens on). Or the server has two real 
network interfaces (public and private) and OpenSIPS is listening on both?

It's quite important to know whether 200 OK sent by Zoiper and ACK sent 
by X-Lite are shown as caught on the server's outgoing interface or on 
the your PC. I think that both have been captured on the PC since I'm 
not seeing the server's address anywhere in the Via headers. But that 
leads to a difficult question.

It's indeed strange that 200 OK doesn't go through the proxy server. 
ACKs for 2xx responses use the Route values learned from the 
Record-Route of the 2xx responses, so X-Lite must send ACK through the 
proxy. You say currently it sends it directly to the peer, right? The 
next step depends on the configuration, e.g. if your OpenSIPS is 
listening on private and public interfaces you should set the 
enable_double_rr param of the rr module to 1.

Andrijana Popovska wrote:
> 
> Hi Andrew,
> 
> Thank you for your replay and help.
> In general I would like to set up a server such that it can also proxy calls from and to the external network.
> 
> I set the advertised_address to the public IP address, but the Record-Route remained the same. 
> So in order to change the Record-Route to the public IP address I changed the following:
> 
>  if (!is_method("REGISTER|MESSAGE"))
>          record_route();
> to 
> 
> if (!is_method("REGISTER|MESSAGE"))
>           record_route_preset("145.18.29.67"); // the external IP address
> 
> but that did not help because now the "ACK" that is sent for "200 OK" does not go through the proxy server. 
> 
> Here is the received "200 OK" and the sent "ACK":
> 
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 145.18.3.32:25046;received=145.18.3.32;branch=z9hG4bK-d87543-1b618563fb1f2a08-1--d87543-;rport=25046
> Record-Route: <sip:145.18.29.67;lr>
> Contact: <sip:3000 at 145.18.3.32:5060;rinstance=4a3c8bfd9d545940>
> To: "3000"<sip:3000 at andrijana.com>;tag=ec34ae21
> From: "2000"<sip:2000 at andrijana.com>;tag=4663a44b
> Call-ID: ZGEzNGU2NTdkZTkxMjJjMjJmMDI2MWY1MmRlOGRlNDQ.
> CSeq: 1 INVITE
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO
> Content-Type: application/sdp
> User-Agent: Zoiper for Windows rev.1105
> Content-Length: 321 
> v=0
> o=Zoiper_user 0 0 IN IP4 127.0.0.1
> s=Zoiper_session
> c=IN IP4 127.0.0.1
> t=0 0
> m=audio 8000 RTP/AVP 0 3 8 110 98 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:110 speex/8000
> a=rtpmap:98 iLBC/8000
> a=fmtp:98 mode=30
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=sendrecv
> ~~~~~~~~~~~~~~~~~~~~~
>  
> ACK sip:3000 at 145.18.3.32:5060;rinstance=4a3c8bfd9d545940 SIP/2.0
> Via: SIP/2.0/UDP 145.18.3.32:25046;branch=z9hG4bK-d87543-46028b777a7ec148-1--d87543-;rport
> Max-Forwards: 70
> Route: <sip:145.18.29.67;lr>
> Contact: <sip:2000 at 145.18.3.32:25046>
> To: "3000"<sip:3000 at andrijana.com>;tag=ec34ae21
> From: "2000"<sip:2000 at andrijana.com>;tag=4663a44b
> Call-ID: ZGEzNGU2NTdkZTkxMjJjMjJmMDI2MWY1MmRlOGRlNDQ.
> CSeq: 1 ACK
> User-Agent: X-Lite release 1011s stamp 41150
> Content-Length: 0
> 
> ~~~~~~~~~~~~~~~~~~~~~
> 
> In my test set I have the two different clients (X-lite and Zoiper) on the same IP address: 145.18.3.32.
> 
> Best Regards,
> Andrijana
> 

-- 
Sincerely,
Andrew Pogrebennyk




More information about the Users mailing list