[OpenSIPS-Users] Opensips 1.11.3-latest 1:1 NAT Registration issue

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Feb 4 18:24:56 CET 2015


Yes, put you put the port too in there. What I'm saying is to put ONLY 
the IP !

IF you use a fqdn, you will also have to add it as alias.

Regards,

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

On 04.02.2015 16:13, Vasilios Tzanoudakis wrote:
> I have allready set the public ip (185.46.X.X) as an alias IP on 
> opensips.cfg.
>
> alias="185.46.X.X:5060"
>
> Will it change the behaviour if I use the a fqdn hostname?
>
> thank you in advance
>
> ---
> Vasilios Tzanoudakis
>
> On 04/02/2015 04:05 μμ, Bogdan-Andrei Iancu wrote:
>> Hi Vasilios,
>>
>> The alias is just a domain, so set it to "185.46.X.X". The alias is 
>> use in the "myself" test.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 04.02.2015 11:55, Vasilios Tzanoudakis wrote:
>>> Dear Andrei,
>>>
>>> Thank you for your reply. I have added the alias too but the problem 
>>> is still there.
>>> First of all I am using the default generated residential script. 
>>> What i have figured out is that the loop is
>>> starting here :
>>>
>>> if (!uri==myself) {
>>>
>>> and can't pass through to the registration method below at all:.
>>> So it seems that uri(185.46.x.x) is different from myself variable.
>>>
>>> is there any way to print myself variable to check what opensips 
>>> sees as myself?
>>>
>>> opensips.cfg is started with those variables set:
>>> -------------------------------------------------
>>> advertised_address="185.46.X.X"
>>> advertised_port=5060
>>> alias="185.46.X.X:5060"
>>> listen=udp:0.0.0.0:5060
>>> -------------------------------------------------
>>>
>>> first place on script I am printing some variables using the 
>>> following xlogs:
>>>
>>> route{
>>>         xlog("L_INFO","CVAPP: route($rm/$du/$fu/$tu)\n");
>>>         xlog("L_INFO", 
>>> "------------------------------------------------------------------------------------------------\n");
>>>         xlog("L_INFO", "$ci|start|recieved $oP request $rm $ou\n");
>>>         xlog("L_INFO", "$ci|log|source $si:$sp\n");
>>>         xlog("L_INFO", "$ci|log|from $fu\n");
>>>         xlog("L_INFO", "$ci|log|to $tu\n");
>>>         xlog("L_INFO", 
>>> "------------------------------------------------------------------------------------------------\n");
>>> .....
>>> ......
>>>
>>> And here is a print out while trying to register. This is just FYI:
>>>
>>> CVAPP: 
>>> route(REGISTER/<null>/sip:username at 185.46.X.X/sip:username at 185.46.X.X)
>>> ------------------------------------------------------------------------------------------------ 
>>>
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|start|recieved udp request REGISTER 
>>> sip:185.46.X.X
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|source 185.46.X.X:5060
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|from sip:username at 185.46.X.X
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|to sip:username at 185.46.X.X
>>> ------------------------------------------------------------------------------------------------ 
>>>
>>> CVAPP: 
>>> route(REGISTER/<null>/sip:username at 185.46.X.X/sip:username at 185.46.X.X)
>>> ------------------------------------------------------------------------------------------------ 
>>>
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|start|recieved udp request REGISTER 
>>> sip:185.46.X.X
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|source 213.249.X.X:19017
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|from sip:username at 185.46.X.X
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|to sip:username at 185.46.X.X
>>> ------------------------------------------------------------------------------------------------ 
>>>
>>> CVAPP: 
>>> route(REGISTER/<null>/sip:username at 185.46.X.X/sip:username at 185.46.X.X)
>>> ------------------------------------------------------------------------------------------------ 
>>>
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|start|recieved udp request REGISTER 
>>> sip:185.46.X.X
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|source 213.249.X.X:19017
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|from sip:username at 185.46.X.X
>>> H4D5WH9k0OMUcXZtWUYiqhAgcev9YzSk|log|to sip:username at 185.46.X.X
>>> ------------------------------------------------------------------------------------------------ 
>>>
>>>
>>> As you can see, the opensips logs has many Register requests that 
>>> come from its own IP (185.46.X.X) as $si and then after many many 
>>> register requests the xlog shows the correct customer IP as Source. 
>>> I don't
>>> know if this is a problem.
>>>
>>> thank you in advance
>>>
>>> ----
>>> Vasilios Tzanoudakis
>>>
>>> On 03/02/2015 07:50 μμ, Bogdan-Andrei Iancu wrote:
>>>> Hi Vasilios,
>>>>
>>>> The "too many hops" reply typically indicates a looping of the 
>>>> REGISTER through OpenSIPS - OpenSIPS is sending that REGISTER to 
>>>> itself via loopback interface. Why ? because of a configuration 
>>>> error - the SIP domain in REGISTER RURI is not recognized by 
>>>> OpenSIPS as a local domain, but it points to the OpenSIPS IP via DNS.
>>>>
>>>> Be sure the domain you have in RURI is set as local domain in 
>>>> OpenSIPS cfg . The 185.46.X.X IP you have there should be 
>>>> configured as "alias" in OpenSIPS.
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Founder and Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>> On 03.02.2015 15:14, Vasilios Tzanoudakis wrote:
>>>>> Dear all,
>>>>>
>>>>> I have installed Opensips 1.11-3 on 1:1 NAT Server but 
>>>>> registration fails with "too many hops".
>>>>>
>>>>> I am using the advertised_address feature with IP: 185.46.X.X but 
>>>>> its not working.
>>>>>
>>>>> The configuration file with registration procedure is working fine 
>>>>> on a host with public IP.
>>>>>
>>>>> I have tested the same setup with opensips 1.8.x version and the 
>>>>> problem is also there.
>>>>>
>>>>> also have tested with or without alias feature enabled.
>>>>>
>>>>> opensips config
>>>>> ==================================
>>>>> advertised_address="185.46.x.x" #public IP here
>>>>> advertised_port=5060
>>>>> listen=udp:192.168.70.109:5060
>>>>> ==================================
>>>>>
>>>>> I am sending you a pastebin url of debug: 5 - 
>>>>> http://pastebin.com/VWr68982
>>>>>
>>>>> Thank you for your support
>>>>>
>>>>> Vasilios Tzanoudakis
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>
>>>
>>
>




More information about the Users mailing list