[SR-Users] DIALPLAN Module: how to get/use the Attributes value
Joel Serrano
joel at textplus.com
Sun Oct 14 15:48:30 CEST 2018
Hello Stefano,
Can you share your modparam settings for the dialplan module?
Check this:
https://kamailio.org/docs/modules/5.1.x/modules/dialplan.html#dialplan.p.attrs_pvar
Joel.
On Fri, Oct 12, 2018 at 1:32 AM Stefano Bertuola <stefano.bertuola at gmail.com>
wrote:
> 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
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181014/3b4d570f/attachment.html>
More information about the sr-users
mailing list