I want to put tone_stream in dialstring but don't know how to escape the comma. originate {some_var='tone_stream://%(2000,4000,440.0,480.0);loops=1'}portaudio/auto_answer &echo 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 0 = [some_var=tone_stream://%(2000] 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 1 = [4000] 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 2 = [440.0] 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 3 = [480.0);loops=1] There's a work around but it's not elegant. http://lists.freeswitch.org/pipermail/freeswitch-users/2010-September/062753... Actually we may not need to escape the comma, the parser should keep reading until found the second quote. Would this need a patch? Thanks. -- About: http://about.me/dujinfang Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
This is indeed the case. I'm looking switch_utils.c and it surely looks like there is no means for escaping the commas. If you use a backslash then both the backslash and the comma get passed through as-is. Any suggestions on how to send through strings that contain commas? -MC On Sun, Feb 20, 2011 at 3:20 AM, Seven Du <dujinfang@gmail.com> wrote:
I want to put tone_stream in dialstring but don't know how to escape the comma.
originate {some_var='tone_stream://%(2000,4000,440.0,480.0);loops=1'}portaudio/auto_answer &echo 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 0 = [some_var=tone_stream://%(2000] 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 1 = [4000] 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 2 = [440.0] 2011-02-20 19:13:09.516139 [DEBUG] switch_ivr_originate.c:1971 variable string 3 = [480.0);loops=1]
There's a work around but it's not elegant.
http://lists.freeswitch.org/pipermail/freeswitch-users/2010-September/062753...
Actually we may not need to escape the comma, the parser should keep reading until found the second quote. Would this need a patch?
Thanks.
participants (2)
-
Michael Collins
-
Seven Du