[asterisk-users] Variable setting in AMI Originate

Anthony Messina amessina at messinet.com
Fri Feb 15 14:45:42 CST 2008


On Friday 15 February 2008 01:49:46 pm Richard Lyman wrote:
> 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.

that does work like a charm--it sets the accountcode, except that, for some 
reason, i can't access the CDR(accountcode) value during call time.

i CAN see it in channel variables, etc.  but ${CDR(accountcode)} evaluates to 
nothing--it's blank. it even show up in the CDR after the call is over.

my dialplan basically says, set the callerid to the accountcode (which is my 
real pstn number).  since i have some users for which i need to block 
outbound callerid on the pstn line, this was a convenient way to distinguish 
between my devices with my accountcode and those without.

now that i'm trying to originate calls from a secured webpage using the 
manager, it seems like my method isn't working well :(

i'd like to keep the callerid="Name" <internal exten> settings in my devices 
so internally, we see the extensions instead of a full pstn number.

how else would i be able to set the outbound/external callerid per device?

-- 
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/7e0fcf3a/attachment.pgp 


More information about the asterisk-users mailing list