Lợi Đặng
2017-May-03 07:36 UTC
[asterisk-users] AGICommand_exec remove my double quotation
Good day, guys As the subject, I'm sending this command for executing CELGenUserEvent via AGI *EXEC CELGenUserEvent DIAL_DATA,abc"xyz* in asterisk cli with agi debug mode, I see that I successfully sent my param *abc"xyz *to asterisk, but it removes my double quotation in collecting the options to execute cli: *<SIP/192.168.1.231-000000f7>AGI Rx << EXEC CELGenUserEvent DIAL_DATA,abc"xyz -- AGI Script Executing Application: (CELGenUserEvent) Options: (DIAL_DATA,abcxyz)* It leads to wrong data generated. I tried other commands like *SET VARIABLE, *but my quotations don't get removed. Single quotations are not removed in AGICommand_exec as well. I'm not sure what I missed, helps are appreciated. rgds, Loi Dang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170503/f64a608b/attachment.html>
Lợi Đặng
2017-May-03 09:26 UTC
[asterisk-users] AGICommand_exec remove my double quotation
sr guys, but I found it out, commands like SET VARIABLE also have the same problem, strip off my quotations. solution is to escape the quotation with double slash \\. *EXEC CELGenUserEvent DIAL_DATA,abc\\"xyz.* It has been noted in res_agi.c rgds, Loi Dang On Wed, May 3, 2017 at 2:36 PM L?i ??ng <loi.dangthanh at gmail.com> wrote:> Good day, guys > As the subject, I'm sending this command for executing CELGenUserEvent via > AGI > *EXEC CELGenUserEvent DIAL_DATA,abc"xyz* > in asterisk cli with agi debug mode, I see that I successfully sent my > param *abc"xyz *to asterisk, but it removes my double quotation in > collecting the options to execute > cli: > > *<SIP/192.168.1.231-000000f7>AGI Rx << EXEC CELGenUserEvent > DIAL_DATA,abc"xyz -- AGI Script Executing Application: (CELGenUserEvent) > Options: (DIAL_DATA,abcxyz)* > > It leads to wrong data generated. > I tried other commands like *SET VARIABLE, *but my quotations don't get > removed. Single quotations are not removed in AGICommand_exec as well. > > I'm not sure what I missed, helps are appreciated. > rgds, > Loi Dang > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170503/595ba0be/attachment.html>