Comma in app parameter - how to escape

I am using unimrcp client (and a unimrcp server). It requires two parameters, a grammar and option. I cant seem to find how to escape a comma in the grammar string - as soon as asterisk finds a comma, it thinks its the second param.

The best I got is:

<PJSIP/test-00000055>AGI Rx << EXEC MRCPRecog 'builtin:speech/spelling/digits?regex=[0-9]{5,8}',spl="fr-FR&f=beep&p=uni2&t=10000&sit=false&sct=1000"
    -- AGI Script Executing Application: (MRCPRecog) Options: ('builtin:speech/spelling/digits?regex=[0-9]{5,8}',spl=fr-FR&f=beep&p=uni2&t=10000&sit=false&sct=1000)
[Dec 15 10:28:57] NOTICE[16157][C-00000056]: app_mrcprecog.c:1070 app_recog_exec: MRCPRecog() grammar: 'builtin:speech/spelling/digits?regex=[0-9]{5
[Dec 15 10:28:57] NOTICE[16157][C-00000056]: app_mrcprecog.c:1085 app_recog_exec: MRCPRecog() options: 8}',spl=fr-FR&f=beep&p=uni2&t=10000&sit=false&sct=1000
[Dec 15 10:28:57] WARNING[16157][C-00000056]: app_mrcprecog.c:931 mrcprecog_option_apply: Unknown option: 8}',spl

We see that the first string is passed correctly, but the parsing fails. I’ve tried adding quotes, backslashes, but as soon as the first comma is found, parsing stops

Any ideas on how to escape the string ?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.