sip.conf:
[2944093]
type = friend
context = one_start
username = 2944093
accountcode = 2944093
subscribecontext = one_blf
qualify = no
canreinvite = no
host = dynamic
callgroup = 1
pickupgroup = 1
dtmfmode = rfc2833
nat = no
mailbox = 2944093@voicemail
callerid = Doug <2944093>
setvar = cid_agent = 80014054 ; <---- This should set variable cid_agent to
80014054
extensions.conf:
exten => 4001,1,Answer
exten => 4001,2,NoOp(${cid_agent})
When I dial 4001, the console displays:
-- Executing Answer("SIP/2944093-956b", "") in new stack
-- Executing NoOp("SIP/2944093-956b", "") in new stack
It seems that setvar= in sip.conf is not working. I've used it before. What
am I missing?
Doug.
On Mon, 2006-07-17 at 11:10 -0600, Douglas Garstang wrote: [snip]> setvar = cid_agent = 80014054 ; <---- This should set variable cid_agent to 80014054Did you check the samples? All the lines in the samples use: <foo>=<bar> You have everywhere: <foo> = <bar> Did you try removing all those spaces and use: setvar=cid_agent=80014054 Don't want to be picky but if the samples say "setvar" I would use "setvar" and not "Setvar" as in the subject. No idea if it makes a difference but this is Asterisk so you never know (unless you are fluent in Asterisk code I guess). Regards, Patrick
> -----Original Message----- > From: Patrick [mailto:asterisk-list@puzzled.xs4all.nl] > Sent: Monday, July 17, 2006 12:13 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Setvar=var=val in sip.conf > > > On Mon, 2006-07-17 at 11:10 -0600, Douglas Garstang wrote: > [snip] > > setvar = cid_agent = 80014054 ; <---- This should set > variable cid_agent to 80014054 > > Did you check the samples? All the lines in the samples use: > <foo>=<bar> > > You have everywhere: > <foo> = <bar> > > Did you try removing all those spaces and use: > setvar=cid_agent=80014054 > > Don't want to be picky but if the samples say "setvar" I would use > "setvar" and not "Setvar" as in the subject. No idea if it makes a > difference but this is Asterisk so you never know (unless you > are fluent > in Asterisk code I guess).Turns out you can't have spaces between setvar and the '='. I'm going to open a bug on this, because all other sip.conf settings are ok with a space. Doug.