[SR-Users] Problem Storing USRLOC Additional Attributes

Daniel-Constantin Mierla miconda at gmail.com
Tue Jul 7 11:23:07 CEST 2015



On 07/07/15 11:19, Luca Mularoni wrote:
> Found! Thanks for the advice, pv_xavp_print() is a not documented
> function of pv module.

Oh, interesting. A bug should be filled on github not to forget about it
and document in near future.
>
> Below a printout of 'ulvals' struct before invoking save():
> all stuff seems to be correclty filled...
>
> Do You need any other test/data?

It is enough for now, usrloc code needs to be reviewed.


Cheers,
Daniel

>
> INFO: <core> [xavp.c:496]: xavp_print_list_content(): +++++ start XAVP
> list: 0xa707348c (level=0)
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: ulvals
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 2077602302
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 6
> INFO: <core> [xavp.c:524]: xavp_print_list_content():      XAVP value:
> <xavp:0xa7072218>
> INFO: <core> [xavp.c:496]: xavp_print_list_content(): +++++ start XAVP
> list: 0xa7072218 (level=1)
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubSocPort
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3173584891
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 1
> INFO: <core> [xavp.c:508]: xavp_print_list_content():      XAVP value:
> 5062
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubSocIP
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3173546433
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 2
> INFO: <core> [xavp.c:511]: xavp_print_list_content():      XAVP value:
> 194.183.68.254
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubViaProt
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3202841649
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 2
> INFO: <core> [xavp.c:511]: xavp_print_list_content():      XAVP value: UDP
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubViaPort
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3202848187
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 1
> INFO: <core> [xavp.c:508]: xavp_print_list_content():      XAVP value:
> 5060
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubViaIP
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3202809729
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 2
> INFO: <core> [xavp.c:511]: xavp_print_list_content():      XAVP value:
> 192.168.99.66
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubNetPort
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3296056264
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 1
> INFO: <core> [xavp.c:508]: xavp_print_list_content():      XAVP value:
> 50172
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: PubNetIP
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 3296017806
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 2
> INFO: <core> [xavp.c:511]: xavp_print_list_content():      XAVP value:
> 1.2.3.4
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: FromDomain
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 2612484511
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 2
> INFO: <core> [xavp.c:511]: xavp_print_list_content():      XAVP value:
> test.com
> INFO: <core> [xavp.c:500]: xavp_print_list_content():      *** XAVP
> name: FromUser
> INFO: <core> [xavp.c:501]: xavp_print_list_content():      XAVP id:
> 2931062183
> INFO: <core> [xavp.c:502]: xavp_print_list_content():      XAVP value
> type: 2
> INFO: <core> [xavp.c:511]: xavp_print_list_content():      XAVP value:
> luca
> INFO: <core> [xavp.c:533]: xavp_print_list_content(): ----- end XAVP
> list: 0xa7072218 (level=1)
> INFO: <core> [xavp.c:533]: xavp_print_list_content(): ----- end XAVP
> list: 0xa707348c (level=0)
>
>
> Il 07/07/2015 10:23, Daniel-Constantin Mierla ha scritto:
>>
>>
>> On 03/07/15 16:47, Luca Mularoni wrote:
>>> Hi Daniel,
>>> I would propend for a usrloc issue, because if I print just created
>>> xavp (below chunk of real code I'm using for debugging) before
>>> invoke save() func:
>>>
>>>     xlog("REGDATAGET - FromUser   [$xavp(ulvals[0]=>FromUser)]\n");
>>>     xlog("REGDATAGET - FromDomain [$xavp(ulvals[0]=>FromDomain)]\n");
>>>     xlog("REGDATAGET - PubNetIP   [$xavp(ulvals[0]=>PubNetIP)]\n");
>>>     xlog("REGDATAGET - PubNetPort [$xavp(ulvals[0]=>PubNetPort)]\n");
>>>     xlog("REGDATAGET - PubViaIP   [$xavp(ulvals[0]=>PubViaIP)]\n");
>>>     xlog("REGDATAGET - PubViaPort [$xavp(ulvals[0]=>PubViaPort)]\n");
>>>     xlog("REGDATAGET - PubViaProt [$xavp(ulvals[0]=>PubViaProt)]\n");
>>>     xlog("REGDATAGET - PubSocIP   [$xavp(ulvals[0]=>PubSocIP)]\n");
>>>     xlog("REGDATAGET - PubSocPort [$xavp(ulvals[0]=>PubSocPort)]\n");
>>>
>>> in syslog I can find all atttributes filled with their real values.
>>>
>>> Note: in doc I didn't find a function to print data of all xavps.
>>> 'avp_print()' exported by avpops module work just with avp vars.
>>>
>> iirc, there should be a function pv_xavp_print().
>>
>> Cheers,
>> Daniel
>> -- 
>> Daniel-Constantin Mierla
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>> Book: SIP Routing With Kamailio - http://www.asipto.com
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150707/9b149d68/attachment.html>


More information about the sr-users mailing list