[OpenSIPS-Users] PROXY behind a NAT

Ali Pey alipey at gmail.com
Tue Jul 10 22:35:44 CEST 2012


Yes, this way you fix the contact header. Do set the advertised_address but
it's not related to this problem.

Regards,
Ali Pey

On Tue, Jul 10, 2012 at 3:59 PM, Ignacio Gonzalez <mylaneza at gmail.com>wrote:

> So adding this to my configuration file, do I fix the problem?
>
> Do I need to set advertised_address or not?
>
>
>
>
> 2012/7/10 Ali Pey <alipey at gmail.com>
>
>> On the reply route try something like this:
>>
>> onreply_route[1] {
>> xlog("reply route 1: sequential requests ($rs $rr)\n");
>>  if ( src_ip != onebox_asterisk1_ip && src_ip != onebox_asterisk2_ip ){
>> if ( nat_uac_test( "31") ) {
>>  fix_nated_contact();
>> force_rport();
>> if( has_body( "application/sdp" ) ) {
>>  fix_nated_sdp( "3" );
>> }
>> }
>>  }
>> }
>>
>>
>> Regards,
>> Ali Pey
>>
>>
>> On Tue, Jul 10, 2012 at 2:00 PM, Ignacio Gonzalez <mylaneza at gmail.com>wrote:
>>
>>> Hello everybody, I installed and configured opensips with a residential
>>> configuration setting NAT Traversal and Multidomain options with the
>>> opensips configuration tool. When I try to make a call with two users, the
>>> ACK method of the caller party never reaches the called party.
>>>
>>> This are the messages received in the called party:
>>>
>>>
>>> INVITE sip:ralvarez at domain;transport=udp SIP/2.0
>>> Via: SIP/2.0/UDP 10.151.199.52:45084
>>> ;branch=z9hG4bK-d8754z-06f2fafe119979f6-1---d8754z-;rport
>>> Max-Forwards: 70
>>> Contact: <sip:2427001 at 201.255.1.30:45084;transport=udp>
>>> To: <sip:ralvarez at domain>
>>> From: <sip:2427001 at domain>;tag=2627e587
>>> Call-ID: ZTg3YjI0ZGNiYjVjZjZlMDRlNjU1Mzg1ZGJkMWQ0NmQ.
>>> CSeq: 2 INVITE
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>> SUBSCRIBE, INFO
>>> Content-Type: application/sdp
>>> Proxy-Authorization: Digest
>>> username="2427001",realm=:"domain",nonce="4ffbbd42000000478de4c68512245fee27f7dadd4549c048",uri="sip:ralvarez at domain
>>> ;transport=udp",response="8fe20af4d2a381cc6a4ebd3ac1162f69",algorithm=MD5
>>> Supported: replaces
>>> User-Agent: X-Lite 4 release 4.1 stamp 63214
>>> Content-Length: 410
>>>
>>> v=0
>>> o=- 12986371568156250 1 IN IP4 10.151.199.52
>>> s=CounterPath X-Lite 4.1
>>> c=IN IP4 10.151.166.52
>>> t=0 0
>>> a=ice-ufrag:6079ef
>>> a=ice-pwd:8febe129544f5ec86474270bef1a9214
>>> m=audio 53146 RTP/AVP 107 0 8 101
>>> a=rtpmap:107 BV32/16000
>>> a=rtpmap:101 telephone-event/8000
>>> a=fmtp:101 0-15
>>> a=sendrecv
>>> a=candidate:1 1 UDP 659136 10.151.199.52 53146 typ host
>>> a=candidate:1 2 UDP 659134 10.151.199.52 53147 typ host
>>>
>>> SIP/2.0 100 Giving a try
>>> Via: SIP/2.0/UDP 10.151.199.52:45084
>>> ;received=201.255.1.30;branch=z9hG4bK-d8754z-06f2fafe119979f6-1---d8754z-;rport=45084
>>> To: <sip:ralvarez at domain>
>>> From: <sip:2427001 at domain>;tag=2627e587
>>> Call-ID: ZTg3YjI0ZGNiYjVjZjZlMDRlNjU1Mzg1ZGJkMWQ0NmQ.
>>> CSeq: 2 INVITE
>>> Server: OpenSIPS (1.8.0-notls (i386/linux))
>>> Content-Length: 0
>>>
>>> SIP/2.0 180 Ringing
>>> Via: SIP/2.0/UDP 10.151.199.52:45084
>>> ;received=201.255.1.30;branch=z9hG4bK-d8754z-06f2fafe119979f6-1---d8754z-;rport=45084
>>> Record-Route: <sip:192.100.1.220;lr;did=af5.ad45d1c6;nat=yes>
>>> *Contact: <sip:ralvarez at 192.100.1.1:30612;rinstance=e0b11e2eb514ba1c>*
>>> To: <sip:ralvarez at domain>;tag=e637fa0f
>>> From: <sip:2427001 at domain>;tag=2627e587
>>> Call-ID: ZTg3YjI0ZGNiYjVjZjZlMDRlNjU1Mzg1ZGJkMWQ0NmQ.
>>> CSeq: 2 INVITE
>>> User-Agent: X-Lite release 1002tx stamp 29712
>>> Content-Length: 0
>>>
>>> SIP/2.0 200 OK
>>> Via: SIP/2.0/UDP 10.151.199.52:45084
>>> ;received=201.255.1.30;branch=z9hG4bK-d8754z-06f2fafe119979f6-1---d8754z-;rport=45084
>>> Record-Route: <sip:192.100.1.220;lr;did=af5.ad45d1c6;nat=yes>
>>> *Contact: <sip:ralvarez at 192.100.1.1:30612;rinstance=e0b11e2eb514ba1c>*
>>> To: <sip:ralvarez at domain>;tag=e637fa0f
>>> From: <sip:2427001 at domain>;tag=2627e587
>>> Call-ID: ZTg3YjI0ZGNiYjVjZjZlMDRlNjU1Mzg1ZGJkMWQ0NmQ.
>>> CSeq: 2 INVITE
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>> SUBSCRIBE, INFO
>>> Content-Type: application/sdp
>>>
>>> .... More OK responses ( retries )
>>>
>>> BYE sip:2427001 at 201.255.1.30:45084;transport=udp SIP/2.0
>>> Via: SIP/2.0/UDP 192.100.1.220;branch=z9hG4bKe265.bd09554.0
>>> Via: SIP/2.0/UDP 192.100.1.200:30612
>>> ;received=192.168.1.200;branch=z9hG4bK-d87543-4677b2285a79346c-1--d87543-;rport=30612
>>> Max-Forwards: 69
>>> Contact: <sip:ralvarez at 192.100.1.200:30612;rinstance=e0b11e2eb514ba1c>
>>> To: <sip:2427001 at domain>;tag=2627e587
>>> From: <sip:ralvarez at domain>;tag=e637fa0f
>>> Call-ID: ZTg3YjI0ZGNiYjVjZjZlMDRlNjU1Mzg1ZGJkMWQ0NmQ.
>>> CSeq: 2 BYE
>>> User-Agent: X-Lite release 1002tx stamp 29712
>>> Reason: SIP;description="ACK not received"
>>> Content-Length: 0
>>>
>>> SIP/2.0 200 OK
>>> Via: SIP/2.0/UDP
>>> 192.100.1.220;branch=z9hG4bKe265.bd09554.0;received=24.94.9.135
>>> Via: SIP/2.0/UDP 192.100.1.200:30612
>>> ;received=192.100.1.200;branch=z9hG4bK-d87543-4677b2285a79346c-1--d87543-;rport=30612
>>> Contact: <sip:2427001 at 201.255.1.30:45084;transport=udp>
>>> To: <sip:2427001 at domain>;tag=2627e587
>>> From: <sip:ralvarez at domain>;tag=e637fa0f
>>> Call-ID: ZTg3YjI0ZGNiYjVjZjZlMDRlNjU1Mzg1ZGJkMWQ0NmQ.
>>> CSeq: 2 BYE
>>> User-Agent: X-Lite 4 release 4.1 stamp 63214
>>> Content-Length: 0
>>>
>>> -----------------------------------------------
>>> I need to fix the contact header value because the IP address is behind
>>> the NAT and is not reachable from the caller party location. I don't know
>>> how to do this, reading some answers in the users mail list i found that
>>> setting the global parameter "advertised_address" in the configuration file
>>> it will solved it but I'm not sure, can anybody tell me if this is correct?
>>>
>>> Thanks for all.
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> 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/20120710/02d139a2/attachment.htm>


More information about the Users mailing list