Hi All, I'm using kamailio 4.2.5 (compiled from source and aligned up to commit [00a36ae07c587992d6486277ce2e9ae6c009685f]). In order to enrich users data collected during registering phase, I would like to store them in USRLOC Additional Attributes through the use of 'xavp_contact' structure, but I'm having problems storing them. Below relevant chunks of config:
... # ----- usrloc params ----- modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", 0) modparam("usrloc", "xavp_contact", "ulvals") ...
route[REGISTRAR] { ... # Just an example $xavp(ulvals=>A) = "A"; $xavp(ulvals[0]=>B) = "B"; $xavp(ulvals[0]=>C) = "C"; $xavp(ulvals[0]=>D) = "D"; ... if (!save("location")) sl_reply_error(); exit; }
route[LOCATION] { ... if(!lookup("location") { # Handle Failure ... } # Print USRLOC Additional Attributes # Just an Example $var(i) = 0; $var(N) = $branch(count); while($var(i)<=$var(N)) { xlog("LOC - [$var(i)] - A [$xavp(ulvals[$var(i)]=>A)]\n"); xlog("LOC - [$var(i)] - B [$xavp(ulvals[$var(i)]=>B)]\n"); xlog("LOC - [$var(i)] - C [$xavp(ulvals[$var(i)]=>C)]\n"); xlog("LOC - [$var(i)] - D [$xavp(ulvals[$var(i)]=>D)]\n"); $var(i) = $var(i) + 1; } ... }
And this is the relevant chunk of syslog when a local subscriber is found in 'location' table: ... LOC - [0] - A [A] LOC - [0] - B [<null>] LOC - [0] - C [<null>] LOC - [0] - D [D] ...
Summing up, it seems that when xavp structure is stored in memory, just first and last elementsare inserted. In real config I'm using more than 4 attributes and behaviour is the same: just first and last are stored. I've tried also with modparam("usrloc", "db_mode", 0) but the problem remains.
Where I'm wrong in using this structure? Or it could be a bug?
Thank You in advance for your help
Luca Mularoni
Hello,
when you use db_mode 1 or 2, do you see the values in location_attrs database table?
Cheers, Daniel
On 02/07/15 12:45, Luca Mularoni wrote:
Hi All, I'm using kamailio 4.2.5 (compiled from source and aligned up to commit [00a36ae07c587992d6486277ce2e9ae6c009685f]). In order to enrich users data collected during registering phase, I would like to store them in USRLOC Additional Attributes through the use of 'xavp_contact' structure, but I'm having problems storing them. Below relevant chunks of config:
... # ----- usrloc params ----- modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", 0) modparam("usrloc", "xavp_contact", "ulvals") ...
route[REGISTRAR] { ... # Just an example $xavp(ulvals=>A) = "A"; $xavp(ulvals[0]=>B) = "B"; $xavp(ulvals[0]=>C) = "C"; $xavp(ulvals[0]=>D) = "D"; ... if (!save("location")) sl_reply_error(); exit; }
route[LOCATION] { ... if(!lookup("location") { # Handle Failure ... } # Print USRLOC Additional Attributes # Just an Example $var(i) = 0; $var(N) = $branch(count); while($var(i)<=$var(N)) { xlog("LOC - [$var(i)] - A [$xavp(ulvals[$var(i)]=>A)]\n"); xlog("LOC - [$var(i)] - B [$xavp(ulvals[$var(i)]=>B)]\n"); xlog("LOC - [$var(i)] - C [$xavp(ulvals[$var(i)]=>C)]\n"); xlog("LOC - [$var(i)] - D [$xavp(ulvals[$var(i)]=>D)]\n"); $var(i) = $var(i) + 1; } ... }
And this is the relevant chunk of syslog when a local subscriber is found in 'location' table: ... LOC - [0] - A [A] LOC - [0] - B [<null>] LOC - [0] - C [<null>] LOC - [0] - D [D] ...
Summing up, it seems that when xavp structure is stored in memory, just first and last elementsare inserted. In real config I'm using more than 4 attributes and behaviour is the same: just first and last are stored. I've tried also with modparam("usrloc", "db_mode", 0) but the problem remains.
Where I'm wrong in using this structure? Or it could be a bug?
Thank You in advance for your help
Luca Mularoni
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel, yes, when I use db_mode 2 [1 not tested], after 'timer_interval' seconds (30s in my case), data are passed to location_attrs table (through insert query for first registration and then delete/insert for refresh) but just first and last attribute are passed (i.e. in db table I can find just first and last attribure for each |ruid).
Regards
Luca
| Il 02/07/2015 18:12, Daniel-Constantin Mierla ha scritto:
Hello,
when you use db_mode 1 or 2, do you see the values in location_attrs database table?
Cheers, Daniel
On 02/07/15 12:45, Luca Mularoni wrote:
Hi All, I'm using kamailio 4.2.5 (compiled from source and aligned up to commit [00a36ae07c587992d6486277ce2e9ae6c009685f]). In order to enrich users data collected during registering phase, I would like to store them in USRLOC Additional Attributes through the use of 'xavp_contact' structure, but I'm having problems storing them. Below relevant chunks of config:
... # ----- usrloc params ----- modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", 0) modparam("usrloc", "xavp_contact", "ulvals") ...
route[REGISTRAR] { ... # Just an example $xavp(ulvals=>A) = "A"; $xavp(ulvals[0]=>B) = "B"; $xavp(ulvals[0]=>C) = "C"; $xavp(ulvals[0]=>D) = "D"; ... if (!save("location")) sl_reply_error(); exit; }
route[LOCATION] { ... if(!lookup("location") { # Handle Failure ... } # Print USRLOC Additional Attributes # Just an Example $var(i) = 0; $var(N) = $branch(count); while($var(i)<=$var(N)) { xlog("LOC - [$var(i)] - A [$xavp(ulvals[$var(i)]=>A)]\n"); xlog("LOC - [$var(i)] - B [$xavp(ulvals[$var(i)]=>B)]\n"); xlog("LOC - [$var(i)] - C [$xavp(ulvals[$var(i)]=>C)]\n"); xlog("LOC - [$var(i)] - D [$xavp(ulvals[$var(i)]=>D)]\n"); $var(i) = $var(i) + 1; } ... }
And this is the relevant chunk of syslog when a local subscriber is found in 'location' table: ... LOC - [0] - A [A] LOC - [0] - B [<null>] LOC - [0] - C [<null>] LOC - [0] - D [D] ...
Summing up, it seems that when xavp structure is stored in memory, just first and last elementsare inserted. In real config I'm using more than 4 attributes and behaviour is the same: just first and last are stored. I've tried also with modparam("usrloc", "db_mode", 0) but the problem remains.
Where I'm wrong in using this structure? Or it could be a bug?
Thank You in advance for your help
Luca Mularoni
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
hmm, can you print the xavps just after you added them before save(location)? Trying to spot where the issue is, in storing inside usrloc or outside in the xavp framework. There should be some function to dump all xavps, iirc.
Cheers, Daniel
On 02/07/15 23:09, Luca Mularoni wrote:
Hi Daniel, yes, when I use db_mode 2 [1 not tested], after 'timer_interval' seconds (30s in my case), data are passed to location_attrs table (through insert query for first registration and then delete/insert for refresh) but just first and last attribute are passed (i.e. in db table I can find just first and last attribure for each |ruid).
Regards
Luca
| Il 02/07/2015 18:12, Daniel-Constantin Mierla ha scritto:
Hello,
when you use db_mode 1 or 2, do you see the values in location_attrs database table?
Cheers, Daniel
On 02/07/15 12:45, Luca Mularoni wrote:
Hi All, I'm using kamailio 4.2.5 (compiled from source and aligned up to commit [00a36ae07c587992d6486277ce2e9ae6c009685f]). In order to enrich users data collected during registering phase, I would like to store them in USRLOC Additional Attributes through the use of 'xavp_contact' structure, but I'm having problems storing them. Below relevant chunks of config:
... # ----- usrloc params ----- modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", 0) modparam("usrloc", "xavp_contact", "ulvals") ...
route[REGISTRAR] { ... # Just an example $xavp(ulvals=>A) = "A"; $xavp(ulvals[0]=>B) = "B"; $xavp(ulvals[0]=>C) = "C"; $xavp(ulvals[0]=>D) = "D"; ... if (!save("location")) sl_reply_error(); exit; }
route[LOCATION] { ... if(!lookup("location") { # Handle Failure ... } # Print USRLOC Additional Attributes # Just an Example $var(i) = 0; $var(N) = $branch(count); while($var(i)<=$var(N)) { xlog("LOC - [$var(i)] - A [$xavp(ulvals[$var(i)]=>A)]\n"); xlog("LOC - [$var(i)] - B [$xavp(ulvals[$var(i)]=>B)]\n"); xlog("LOC - [$var(i)] - C [$xavp(ulvals[$var(i)]=>C)]\n"); xlog("LOC - [$var(i)] - D [$xavp(ulvals[$var(i)]=>D)]\n"); $var(i) = $var(i) + 1; } ... }
And this is the relevant chunk of syslog when a local subscriber is found in 'location' table: ... LOC - [0] - A [A] LOC - [0] - B [<null>] LOC - [0] - C [<null>] LOC - [0] - D [D] ...
Summing up, it seems that when xavp structure is stored in memory, just first and last elementsare inserted. In real config I'm using more than 4 attributes and behaviour is the same: just first and last are stored. I've tried also with modparam("usrloc", "db_mode", 0) but the problem remains.
Where I'm wrong in using this structure? Or it could be a bug?
Thank You in advance for your help
Luca Mularoni
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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.
Regards
Luca
Il 03/07/2015 13:32, Daniel-Constantin Mierla ha scritto:
Hello,
hmm, can you print the xavps just after you added them before save(location)? Trying to spot where the issue is, in storing inside usrloc or outside in the xavp framework. There should be some function to dump all xavps, iirc.
Cheers, Daniel
On 02/07/15 23:09, Luca Mularoni wrote:
Hi Daniel, yes, when I use db_mode 2 [1 not tested], after 'timer_interval' seconds (30s in my case), data are passed to location_attrs table (through insert query for first registration and then delete/insert for refresh) but just first and last attribute are passed (i.e. in db table I can find just first and last attribure for each |ruid).
Regards
Luca
| Il 02/07/2015 18:12, Daniel-Constantin Mierla ha scritto:
Hello,
when you use db_mode 1 or 2, do you see the values in location_attrs database table?
Cheers, Daniel
On 02/07/15 12:45, Luca Mularoni wrote:
Hi All, I'm using kamailio 4.2.5 (compiled from source and aligned up to commit [00a36ae07c587992d6486277ce2e9ae6c009685f]). In order to enrich users data collected during registering phase, I would like to store them in USRLOC Additional Attributes through the use of 'xavp_contact' structure, but I'm having problems storing them. Below relevant chunks of config:
... # ----- usrloc params ----- modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", 0) modparam("usrloc", "xavp_contact", "ulvals") ...
route[REGISTRAR] { ... # Just an example $xavp(ulvals=>A) = "A"; $xavp(ulvals[0]=>B) = "B"; $xavp(ulvals[0]=>C) = "C"; $xavp(ulvals[0]=>D) = "D"; ... if (!save("location")) sl_reply_error(); exit; }
route[LOCATION] { ... if(!lookup("location") { # Handle Failure ... } # Print USRLOC Additional Attributes # Just an Example $var(i) = 0; $var(N) = $branch(count); while($var(i)<=$var(N)) { xlog("LOC - [$var(i)] - A [$xavp(ulvals[$var(i)]=>A)]\n"); xlog("LOC - [$var(i)] - B [$xavp(ulvals[$var(i)]=>B)]\n"); xlog("LOC - [$var(i)] - C [$xavp(ulvals[$var(i)]=>C)]\n"); xlog("LOC - [$var(i)] - D [$xavp(ulvals[$var(i)]=>D)]\n"); $var(i) = $var(i) + 1; } ... }
And this is the relevant chunk of syslog when a local subscriber is found in 'location' table: ... LOC - [0] - A [A] LOC - [0] - B [<null>] LOC - [0] - C [<null>] LOC - [0] - D [D] ...
Summing up, it seems that when xavp structure is stored in memory, just first and last elementsare inserted. In real config I'm using more than 4 attributes and behaviour is the same: just first and last are stored. I've tried also with modparam("usrloc", "db_mode", 0) but the problem remains.
Where I'm wrong in using this structure? Or it could be a bug?
Thank You in advance for your help
Luca Mularoni
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio -http://www.asipto.com
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
Found! Thanks for the advice, pv_xavp_print() is a not documented function of pv module.
Below a printout of 'ulvals' struct before invoking save(): all stuff seems to be correclty filled...
Do You need any other test/data?
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
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
Il 07/07/2015 11:23, Daniel-Constantin Mierla ha scritto:
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.
Opened issue #235 on GitHub
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.
Thank you
Luca
Hi Daniel, I didn't get if I have to open an issue to GitHub for usrloc problem.
Regards
Luca
Il 07/07/2015 11:55, Luca Mularoni ha scritto:
Il 07/07/2015 11:23, Daniel-Constantin Mierla ha scritto:
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.
Opened issue #235 on GitHub
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.
Thank you
Luca
Hello,
it is better to open an issue, making sure it doesn't get lost, although it is in my short list to investigate, priorities can change unexpectedly.
Cheers, Daniel
On 13/07/15 10:59, Luca Mularoni wrote:
Hi Daniel, I didn't get if I have to open an issue to GitHub for usrloc problem.
Regards
Luca
Il 07/07/2015 11:55, Luca Mularoni ha scritto:
Il 07/07/2015 11:23, Daniel-Constantin Mierla ha scritto:
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.
Opened issue #235 on GitHub
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.
Thank you
Luca
Hello, I confirm that this issue has been: - patched to master (4efb386) branch - backported to 4.2 (2a5d17b) branch - backported to to 4.3 (f5d11d1) branch
Thanks to Daniel for providing the patch
Luca
Il 13/07/2015 11:32, Daniel-Constantin Mierla ha scritto:
Hello,
it is better to open an issue, making sure it doesn't get lost, although it is in my short list to investigate, priorities can change unexpectedly.
Cheers, Daniel
On 13/07/15 10:59, Luca Mularoni wrote:
Hi Daniel, I didn't get if I have to open an issue to GitHub for usrloc problem.
Regards
Luca
Il 07/07/2015 11:55, Luca Mularoni ha scritto:
Il 07/07/2015 11:23, Daniel-Constantin Mierla ha scritto:
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.
Opened issue #235 on GitHub
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.
Thank you
Luca
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio -http://www.asipto.com