[asterisk-bugs] [JIRA] (ASTERISK-25136) gosub issue
Schneur Rosenberg (JIRA)
noreply at issues.asterisk.org
Wed May 27 05:13:32 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226353#comment-226353 ]
Schneur Rosenberg commented on ASTERISK-25136:
----------------------------------------------
My workaround was to use use < and > instead of ( and ) and use the REPLACE function , and there the escape character works, but I still think is a bug
exten => s,n,set(_options=${REPLACE(options,<,\(}))
exten => s,n,set(_options=${REPLACE(options,>,\)}))
> gosub issue
> ------------
>
> Key: ASTERISK-25136
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25136
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Reporter: Schneur Rosenberg
> Severity: Minor
>
> I'm having a issue with gosubs, in this example I'm using a sub to dial out, first argument is destination, second is options, third is timeout, in ARG2 I have a macro which requires ( and ) when the gosub sees the ) character it thinks that the gosub is done and therefore anything afterwards does not get processed, in my case the m (for music on hold) and the 30 (for timeout), I tried using quotes or the "\" as a escape character but nothing works, in my opinion this is a bug even though I can use a different symbol and use the replace function in my gosub to convert it to the ) symbol, as there should be a way at least to escape the ) character
> [testtest]
> exten => s,1,gosub(sub_dialing_smart,s,1(sip/test,M(screen)m,30)
> [sub_dialing_smart]
> exten => s,1,set(__destination1=${ARG1})
> exten => s,n,set(__options=${ARG2})
> exten => s,n,set(__timeout=${ARG3})
> -- Executing [s at testtest:1] Gosub("Console/dsp", "sub_dialing_smart,s,1(sip/test,M(screen)m,30") in new stack
> -- Executing [s at sub_dialing_smart:1] Set("Console/dsp", "__destination1=test") in new stack
> -- Executing [s at sub_dialing_smart:3] Set("Console/dsp", "__options=M(screen") in new stack
> -- Executing [s at sub_dialing_smart:4] Set("Console/dsp", "__timeout=") in new stack
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list