[asterisk-users] sip.conf setvar option
Jared Smith
jsmith at digium.com
Fri Mar 28 07:42:12 CDT 2008
On Fri, 2008-03-28 at 12:30 +0100, Marcus Hunger wrote:
> does anybody know about the setvar option in asterisk's sip.conf.
Sure! This is one of my favorite features.
Let's say I have a definition for my phone in sip.conf, and it looks
something like this:
[myphone]
secret=verysecretpassword
type=friend ; a friend is both a user and a peer
host=dynamic ; phone will register to Asterisk
disallow=all
allow=gsm ; first, try to negotiate gsm
allow=ulaw ; the try ulaw
setvar=MYVAR=blah
Whenever a call comes into Asterisk from this particular phone, Asterisk
will automatically create a channel variable named MYVAR, and ${MYVAR}
will contain the value "blah". I can then use it for whatever purpose I
see fit within my dialplan.
--
Jared Smith
Community Relations Manager
Digium, Inc.
More information about the asterisk-users
mailing list