[asterisk-users] Passing literals with commas to subroutine

A J Stiles asterisk_list at earthshod.co.uk
Tue Dec 9 09:37:42 CST 2014

On Tuesday 09 Dec 2014, Daniel Gonzalez wrote:
> Hi,
> Let's say I do:
> Set(data=xxx,yyy)
> Gosub(my-sub,s,1(${data}))
> My subroutine will only receive "xxx" for ARG1. How can I pass a literal
> with a comma to a single argument in a subroutine?
> (The point is: when calling the subroutine I do not know if the variable
> has a comma or not.)

What happens if you use speech marks around the variable, like so: "${data}" ?


Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

More information about the asterisk-users mailing list