So, wouldn't it be great to enable setvar for outgoing calls too? <br><br><div class="gmail_quote">On Fri, Mar 28, 2008 at 1:55 PM, Johansson Olle E <<a href="mailto:oej@edvina.net">oej@edvina.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
28 mar 2008 kl. 13.42 skrev Jared Smith:<br>
<div class="Ih2E3d">> On Fri, 2008-03-28 at 12:30 +0100, Marcus Hunger wrote:<br>
>> does anybody know about the setvar option in asterisk's sip.conf.<br>
><br>
> Sure! This is one of my favorite features.<br>
><br>
> Let's say I have a definition for my phone in sip.conf, and it looks<br>
> something like this:<br>
><br>
> [myphone]<br>
> secret=verysecretpassword<br>
> type=friend ; a friend is both a user and a peer<br>
> host=dynamic ; phone will register to Asterisk<br>
> disallow=all<br>
> allow=gsm ; first, try to negotiate gsm<br>
> allow=ulaw ; the try ulaw<br>
> setvar=MYVAR=blah<br>
><br>
> Whenever a call comes into Asterisk from this particular phone,<br>
> Asterisk<br>
> will automatically create a channel variable named MYVAR, and ${MYVAR}<br>
> will contain the value "blah". I can then use it for whatever<br>
> purpose I<br>
> see fit within my dialplan.<br>
<br>
</div>Well, Jared, but that's the reverse. You stripped out this important<br>
part:<br>
<div class="Ih2E3d">" am trying to define it for a peer that's used when making calls<br>
using the originate ami call, but it seems to not have any effect."<br>
<br>
</div>The important thing with your lesson was that SETVAR is only used on<br>
INCOMING calls from<br>
devices, not outbound calls TO devices. Using ORIGINATE to call a SIP<br>
peer, there's no variables<br>
set from sip.conf.<br>
<br>
/O<br>
<br>
---<br>
<font color="#888888">* Olle E. Johansson - <a href="mailto:oej@edvina.net">oej@edvina.net</a><br>
* Asterisk Training <a href="http://edvina.net/training/" target="_blank">http://edvina.net/training/</a> * SIP Masterclass<br>
Orlando FL * April 21-25 2008<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Marcus Hunger - <a href="mailto:hunger@sipgate.de">hunger@sipgate.de</a><br>Telefon: +49 (0)211-63 55 55-61<br>Telefax: +49 (0)211-63 55 55-22<br><br>indigo networks GmbH - Gladbacher Str. 74 - 40219 Düsseldorf<br>
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois<br>Steuernummer: 106/5713/2881, Umsatzsteuer-ID: DE219349391<br><br><a href="http://www.sipgate.de">www.sipgate.de</a> - <a href="http://www.sipgate.at">www.sipgate.at</a> - <a href="http://www.sipgate.co.uk">www.sipgate.co.uk</a>