[SR-Users] DIALPLAN Module: how to get/use the Attributes value
Stefano Bertuola
stefano.bertuola at gmail.com
Fri Oct 12 10:31:27 CEST 2018
Hi experts.
I intended ATTRIBUTES is a value that is returned by dialplan's
dp_translate as the result as shown by kamcmd command:
kamcmd> dialplan.translate 2 s:+3912345
{
Output: 3912345
Attributes: test
}
Is my understanding correct?
I tried many ways, including using AVP and XAVP for the result, but no
success:
dp_translate("2", "$rU/$xavp(dp_result)");
pv_xavp_print();
DEBUG: dialplan [dialplan.c:222]: dp_get_ivalue(): dpid is 2 from constant
argument
DEBUG: dialplan [dialplan.c:243]: dp_get_svalue(): searching 7
DEBUG: dialplan [dialplan.c:331]: dp_translate_f(): input is +3912345
DEBUG: dialplan [dp_repl.c:592]: translate(): regex operator testing over
[+3912345]
DEBUG: dialplan [dp_repl.c:662]: translate(): found a matching rule
0x7f56aef690d8: pr 1, match_exp ^\+39.....
DEBUG: dialplan [dp_repl.c:481]: rule_translate(): copying match <3912345>
token size 2
DEBUG: dialplan [dialplan.c:340]: dp_translate_f(): input +3912345 with
dpid 2 => output 3912345
INFO: <core> [xavp.c:494]: xavp_print_list_content(): +++++ start XAVP
list: 0x7f56aeffaaa8 (level=0)
INFO: <core> [xavp.c:498]: xavp_print_list_content(): *** XAVP name:
dp_result
INFO: <core> [xavp.c:499]: xavp_print_list_content(): XAVP id:
3539756229
INFO: <core> [xavp.c:500]: xavp_print_list_content(): XAVP value type:
2
INFO: <core> [xavp.c:509]: xavp_print_list_content(): XAVP value:
3912345
INFO: <core> [xavp.c:531]: xavp_print_list_content(): ----- end XAVP list:
0x7f56aeffaaa8 (level=0)
If possible, how can I get both OUTPUT and ATTRIBUTES as result?
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181012/be732f33/attachment.html>
More information about the sr-users
mailing list