asterisk_list at earth... Guest
|
Posted: Thu Mar 10, 2016 10:29 am Post subject: [asterisk-users] *SOLVED* Re: Dialplan question: Variables i |
|
|
On Thursday 10 Mar 2016, Joshua Colp wrote:
Quote: | I wrote:
Quote: | I can't seem to find a definitive answer on this, and I really don't want
to risk breaking a production server to find out; so I am going to try
asking this here, and maybe anyone else in the same situation searching
the archives sometime in future will find the answer I get.
Can you use variables in the target of a GoTo() statement?
What I am specifically thinking of is this;
[from_some_source]
exten => s,1,AGI(look_up_stuff.agi,${CALLERID(num)},${EXTEN})
; this AGI script sets variables: next_context, next_ext, next_step
exten => s,n,GoTo(${next_context},${next_ext},${next_step})
Will this work? Does Asterisk evaluate expressions like this, or does it
expect literals?
|
It most certainly will work. It evaluates on use.
|
Thanks very much. I tried it, and it worked beautifully. Exactly as I
expected.
There is something a little bit "ZX Spectrum BASIC" about an evaluated GOTO,
but sometimes it's the least messy way of accomplishing something.
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|