[asterisk-users] sip.conf setvar option
Marcus Hunger
hunger at sipgate.de
Fri Mar 28 08:00:50 CDT 2008
So, wouldn't it be great to enable setvar for outgoing calls too?
On Fri, Mar 28, 2008 at 1:55 PM, Johansson Olle E <oej at edvina.net> wrote:
>
> 28 mar 2008 kl. 13.42 skrev Jared Smith:
> > 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.
>
> Well, Jared, but that's the reverse. You stripped out this important
> part:
> " am trying to define it for a peer that's used when making calls
> using the originate ami call, but it seems to not have any effect."
>
> The important thing with your lesson was that SETVAR is only used on
> INCOMING calls from
> devices, not outbound calls TO devices. Using ORIGINATE to call a SIP
> peer, there's no variables
> set from sip.conf.
>
> /O
>
> ---
> * Olle E. Johansson - oej at edvina.net
> * Asterisk Training http://edvina.net/training/ * SIP Masterclass
> Orlando FL * April 21-25 2008
>
>
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Marcus Hunger - hunger at sipgate.de
Telefon: +49 (0)211-63 55 55-61
Telefax: +49 (0)211-63 55 55-22
indigo networks GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5713/2881, Umsatzsteuer-ID: DE219349391
www.sipgate.de - www.sipgate.at - www.sipgate.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080328/12837e8b/attachment.htm
More information about the asterisk-users
mailing list