[OpenSIPS-Users] Is fix_nated_contact() useful when proxy and callee is behind NAT?

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Jan 8 17:18:28 CET 2016


Hi Rodrigo,

I feel there might be a confusion somewhere here. what is behind the NAT 
? your opensips ? or the end point ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 08.01.2016 13:20, Rodrigo Pimenta Carvalho wrote:
>
> Hi Bogdan.
>
>
> Thank you very much for the hint! I got more another explanations here 
> too and I was able to conclude the following:
>
>
> To be sure the traffic sent out by opensips has the public IP and not 
> the local private one, I will set a stun server in the softphone 
> behind the NAT. In this case, such softphone will send SIP messages 
> (that has Contact header field) already considering the public IP. I 
> guess this solution will be enough for my case.
>
>
> I can't set advertise_address and advertise_port, because my project 
> will have lots of copies, to be installed in lots of homes. In every 
> home, there will be a different public IP (and another private too).
>
>
> Today I will configure a NAT device, put it in my network, bind the 
> proxy and sofphone to behind it and execute some tests.
>
>
> Best regards.
>
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
>
> ------------------------------------------------------------------------
> *De:* Bogdan-Andrei Iancu <bogdan at opensips.org>
> *Enviado:* quinta-feira, 7 de janeiro de 2016 12:43
> *Para:* OpenSIPS users mailling list; Rodrigo Pimenta Carvalho
> *Assunto:* Re: [OpenSIPS-Users] Is fix_nated_contact() useful when 
> proxy and callee is behind NAT?
> Hi Rodrigo,
>
> If opensips is behind NAT, you should not use the nat related modules 
> (as the incoming traffic is correct from nat perspective, as 
> originating from public network). What you need to do is to be sure 
> the traffic sent out by opensips has the public IP and not the local 
> private one. For this, look at :
>     advertise_address
>     advertise_port
> (http://www.opensips.org/Documentation/Script-CoreParameters-2-1#toc25)
> <http://www.opensips.org/Documentation/Script-CoreParameters-2-1#toc25>
> 	
> openSIPS | Documentation / Core Parameters - 2.1 
> <http://www.opensips.org/Documentation/Script-CoreParameters-2-1#toc25>
> www.opensips.org
> This section lists the all the parameters exported by OpenSIPS core 
> for script usage (to be used in opensips.cfg) This document is for 
> OpenSIPS 1.12.x
>
>
>
> And be sure you have do port fwd of the SIP port from the public 
> address of the NAT to the private IP of your opensips.
>
> Regards,
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 07.01.2016 13:30, Rodrigo Pimenta Carvalho wrote:
>>
>> Hi.
>>
>>
>> I have read the entire OpenSIPS' documentation about how to deal with 
>> NATs.
>>
>> I found ways of dealing with messages from client that is behind NAT. 
>> OpenSIPS can fix Contact headers fields and registers, when SIP 
>> messages comes from clients and cross NATs before reaching this proxy.
>>
>>
>> However, my OpenSIPS and callee is behind NAT, not the client. That 
>> is, if a client (caller) calls the callee, how could OpenSIPS with 
>> its functions fixes Contact header fields in responses that go from 
>> callee to caller, so that the client will be able to send ACKs? It is 
>> still obscure to me.
>>
>>
>> Any idea?
>>
>>
>> Best regards.
>>
>>
>> RODRIGO PIMENTA CARVALHO
>> Inatel Competence Center
>> Software
>> Ph: +55 35 3471 9200 RAMAL 979
>>
>>
>> _______________________________________________
>> 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/20160108/59c9e36b/attachment-0001.htm>


More information about the Users mailing list