Advertisement

09.05.2008 at 06:43AM PDT, ID: 23706157 | Points: 500
[x]
Attachment Details

Storing and Exectuing comannd from variable.

Asked by pazzaTim in Asterisk Open Source Telephony

Tags: ,

What I'm trying to do is the following:

exten => _X.,1,Set(DialCommand=${CURL(http://private.somesite.com/Engines/Dial.cfc?method=DialCall&IncomingNumber=${CALLERID(dnid)})})
exten => _X.,n,${DialCommand}


The CURL command returns Dial(SIP/11.1.111.1/15551212|300)

And the second line doesnt execute&.

If I make the second line

exten => _X.,n,Dial(${DialCommand})

and have the CURL return SIP/11.1.111.1/15551212|300

it works just fine.

I had thought that eval or something might work to have it execute the returned command, but I cant seem to get it to work.

The ultimate goal would be to have the CURL return multiple commands and split them up and execute them in order.

Thanks!
Start Free Trial
 
Loading Advertisement...
 
[+][-]09.05.2008 at 08:52AM PDT, ID: 22400320

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628