[OpenSIPS-Users] Registrar not saving received from Path header

Bogdan-Andrei Iancu bogdan at opensips.org
Thu May 9 12:34:19 CEST 2013


Hi Nathaniel,

Could you please apply the attached patch to the registrar opensips - it
contains some more debugs in regards to saving the path array.

Check if during the save("location","p1") you get ant logs with "xXx"
and post them here.

What db_mode are you using for usrloc ?

Regards,

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


On 05/05/2013 07:49 PM, Nathaniel L Keeling III wrote:
> Hello,
>
> On P1, I am using the add_path_received() function which is adding the
> Path header. Actually, it adds 2 Path headers since the request comes
> in using TCP but is forwarded using UDP. On the REGISTER, I use the
> save("location","p0") function but the path header is not saved in the
> PATH column of the location table. I have attached a snippet from the
> REGISTER's log and it looks like the insert into the table in placing
> NULL even though the PATH headers were successfully parsed earlier.
> Also, will the lookup() function use this column to locate the
> subscriber for an INVITE request?
>
> Thanks
>
> Nathaniel
>
>
> On 5/5/13 5:55 AM, Bogdan-Andrei Iancu wrote:
>> The registrar server will store the PATH hdr in the PATH column of
>> the "location" table.
>>
>> If P1 adds a PATH hdr to a REGISTER that is saved on REGISTRAR via
>> save(location, p0) .
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>>
>> On 05/04/2013 08:11 PM, Nathaniel L Keeling III wrote:
>>> I am currently using version 1.8.2 of opensips. I am using this code
>>> on the registrar server, save("location","p0v"), when the user is
>>> authenticated. The user is behind a firewall. The register request
>>> is first sent to the sip proxy which forwards it to the registrar
>>> server. The sip proxy adds the Path header with the source IP/Port
>>> of the Register request. From the documentation it sounds like the
>>> save() function should take the "received" parameter from the Path
>>> header and store it in the "received" column of the location table.
>>> When I look at the location table it contains the IP address and
>>> port of the SIP proxy so when I try to locate the user, they are
>>> being sent to the SIP proxy and the call fails. Is my understanding
>>> correct? What is the best approach for this, UAC --> firewall -->
>>> P1  --> REG.
>>>
>>> Thanks
>>>
>>> Nathaniel
>>>
>>> On 5/4/13 4:26 AM, Bogdan-Andrei Iancu wrote:
>>>> Hello Nathaniel,
>>>>
>>>> See
>>>> http://www.opensips.org/html/docs/modules/1.9.x/registrar.html#id248705
>>>> - this controls the PATH support in REGISTRAR module.
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Founder and Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>>
>>>> On 05/04/2013 01:31 AM, Nathaniel L Keeling III wrote:
>>>>> Hello,
>>>>>
>>>>> I sent an earlier post concerning NATed registrations not being
>>>>> able to locate from the lookup() function when the registration
>>>>> request is sent from a opensips proxy server to an opensips
>>>>> registration server and from my research it looks like I should be
>>>>> using the Path header with the received parameter set. Doing this,
>>>>> the Register request is sent to the registrar proxy server with a
>>>>> Path header, the user is successfully authorized and saved in the
>>>>> location table but when I look at the location table entry, the
>>>>> received column either does not contain a value or it contains the
>>>>> wrong value. Here is the Register request sent from the proxy to
>>>>> the registrar server and the output from the location table.
>>>>>
>>>>> REGISTER sip:my-sip-domain.com;transport=tcp SIP/2.0.
>>>>> Call-ID: 541d070a84f74ca6f61f68732d063d35 at 0:0:0:0:0:0:0:0.
>>>>> CSeq: 2 REGISTER.
>>>>> From: "Nathaniel L Keeling III"
>>>>> <sip:nkeeling3 at mydomain2.com>;tag=cbe17bd3.
>>>>> To: "Nathaniel L Keeling III" <sip:nkeeling3 at mydomain2.com>.
>>>>> Max-Forwards: 68.
>>>>> User-Agent: Jitsi2.0.4506.10553Mac OS X.
>>>>> Expires: 600.
>>>>> Contact: "Nathaniel L Keeling III"
>>>>> <sip:nkeeling3 at 192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com>;expires=600.
>>>>> Via: SIP/2.0/UDP
>>>>> xxx.xxx.110.38:5060;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1;i=04.
>>>>> Via: SIP/2.0/TCP
>>>>> 192.168.43.237:65457;received=208.54.44.148;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1.
>>>>> Authorization: Digest
>>>>> username="nkeeling3",realm="mydomain2.com",nonce="5184345b0000003b08c40d29a091fb53e6cb83c3961c1dbb",uri="sip:my-sip-domain.com;transport=tcp",response="987edb51f504ff56c7ba840d594c4bb1".
>>>>> Content-Length: 0.
>>>>> Path:
>>>>> <sip:xxx.xxx.110.38;r2=on;lr;received=sip:208.54.44.148:43932;transport=tcp>.
>>>>> Path: <sip:xxx.xxx.110.38;transport=tcp;r2=on;lr>.
>>>>>
>>>>>
>>>>>   id  | username  |    domain |
>>>>> contact                                     | received         |
>>>>> path |       expires       | q | callid                      |
>>>>> cseq | last_modified    | flags | cflags |         user_agent |
>>>>> socket          | methods | sip_instance
>>>>> ------+-----------+---------------+--------------------------------------------------------------------------------+-------------------------+------+---------------------+----+--------------------------------------------------+------+---------------------+-------+--------+-----------------------------+-------------------------+---------+--------------
>>>>>
>>>>>  1555 | nkeeling3 | mydomain2.com |
>>>>> sip:nkeeling3 at 192.168.43.237:65420;transport=tcp;registering_acc=mydomain2_com
>>>>> | sip:xxx.xxx.110.38:5060 |      | 2013-05-03 17:08:03 | -1 |
>>>>> 869321ee55e10970ff139673909ab626 at 0:0:0:0:0:0:0:0 | 10 | 2013-05-03
>>>>> 16:58:03 |     0 |   1024 | Jitsi2.0.4506.10553Mac OS X |
>>>>> udp:xxx.xxx.110.48:5060 |         |
>>>>>  1556 | nkeeling3 | mydomain2.com |
>>>>> sip:nkeeling3 at 192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com
>>>>> | sip:xxx.xxx.110.38:5060 |      | 2013-05-03 17:13:42 | -1 |
>>>>> 541d070a84f74ca6f61f68732d063d35 at 0:0:0:0:0:0:0:0 | 2 | 2013-05-03
>>>>> 17:03:42 |     0 |   1024 | Jitsi2.0.4506.10553Mac OS X |
>>>>> udp:xxx.xxx.110.48:5060 |         |
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> Nathaniel
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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/20130509/60d45d58/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: registrar_path.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20130509/60d45d58/attachment.bin>


More information about the Users mailing list