[asterisk-users] Variable setting in AMI Originate

Richard Lyman pchammer at dynx.net
Fri Feb 15 13:49:46 CST 2008


Anthony Messina wrote:
> On Friday 15 February 2008 10:21:33 am Lee Jenkins wrote:
>   
*snipped
>> Priority: 1
>> Variable: CALLERID(num)=${DEV_NAME}|CALLERID(name)=Conference Waiting
>> Async: true
>>     
>
> That was exactly my question (even though I forgot the "="sign). However, I am 
> not able to get that to work for reason. I'm trying to set the 
> CDR(accountcode) on the first leg of the call and am using Channel: Local/...
>
> I am able to get it to work if I use "Variable: var1=12345" then, use 
> CDR(accountcode)=${var1} in the dialplan, but I was hoping to avoid this 
> hack.
>   

why not just add

Account: 12345

to the originate?

(side note: you can also have multiple Variable: lines (some versions of 
asterisk have issue with the | from what i hear)

so the above would look like

...

Variable: CALLERID(num)=${DEV_NAME}
Variable: CALLERID(name)=Conference Waiting

those are bad examples as you should just use CallerID:

Callerid: Conference Waiting <DEVNUMBER>

i hope this helps.







More information about the asterisk-users mailing list