[asterisk-users] Variable setting in AMI Originate

Anthony Messina amessina at messinet.com
Fri Feb 15 13:17:32 CST 2008


On Friday 15 February 2008 10:21:33 am Lee Jenkins wrote:
> Anthony Messina wrote:
> > Working with asterisk 1.4; using the AMI Originate command, it is
> > possible to do something like:
> >
> > Variable: CDR(accountcode)123456
> >
> > Or must the variable names be "var[n]" where n is a number?
> >
> > I'd like to set the accountcode for a Local channel that originates a
> > call.
> >
> > Thanks.  -A
>
> Anthony,
>
> I may not understand your question, but setting variables from the AMI is
> easy enough:
>
> Action: Originate
> Channel: local/${DEV_NAME}@Management
> Context: to_meetme
> Exten: s
> 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.

-- 
Anthony -  http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080215/cbbae15e/attachment.pgp 


More information about the asterisk-users mailing list