[asterisk-users] AMI Commands - not working as Expected, Maybe???

john Millican john at millican.us
Mon Aug 15 18:12:04 CDT 2011


On 8/15/2011 5:48 PM, john Millican wrote:
> Hello,
> Asterisk 1.4.38
> Linux version 2.6.9-89.31.1.EL   CentOS
>
> Trying to get variables into a dial plan from AMI.  I have tried all 
> sorts of combinations,entering them after making a connection to ami 
> through telnet, of the many available examples on voip-info.org such as:
> Action: Originate
> Channel: sip/xxxxxxxxxx at xxxxxxx
> MaxRetries: 2
> RetryTime: 60
> WaitTime: 30
> Context: test1
> Exten: acs1
> Priority: 1
> CallerID: xxxxxxxxxx
> Account: MyTest
> Command: Set(var1=123456)
> Command: Set(var2=54321)
>
> also tried:
> Var:
> Variable:
> SetVar:
>
> Each individually for the two variables I need and both on the same 
> line separated by a | or a ,
> Always when I hit return twice to give the \r\n\r\n  The call is 
> successful but where I have
> exten => acs1,n,NoOp(Vars = ${var1}, ${var2});
> in my dialplan what I get is:
> [2011-08-15 17:20:28]     -- Executing [acs1 at test1:2] 
> NoOp("SIP/xxxxxxx-00000451", "Vars = | ") in new stack
> Obviously not what I was hoping for.
>
> Any help would be greatly appreciated.
>
> TIA,
> JohnM
>
>
Ok so I figured it out, It was me being dumb!
Proper format is indeed:
Variable: var1=23456|var2=246810
which I would have sworn I tried and it failed but, I started at the 
beginning again and voila!

JohnM




More information about the asterisk-users mailing list