thanks<br><br><br><div class="gmail_quote">On Sat, Nov 21, 2009 at 12:26 PM, Steve Edwards <span dir="ltr">&lt;<a href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">&gt; Thomas Perron wrote:<br>
&gt;<br>
&gt;&gt; I have two DID numbers.  I want to configurate my IVR to initiate a<br>
&gt;&gt; context 1 if I dial DID 1. If DID2 is dialed then start with context 2.<br>
<br>
</div>If the DIDs are from different providers, you can specify different<br>
contexts in [iax|sip].conf.<br>
<div class="im"><br>
On Sat, 21 Nov 2009, Alex Balashov wrote:<br>
<br>
&gt; Assuming that the DID originator sends you the number in the Request<br>
&gt; URI, you can just treat them like &quot;extensions&quot; in Asterisk.  Example: if<br>
&gt; you have DID 6789540670 and 6789540671:<br>
&gt;<br>
&gt;    exten =&gt; 6789540670,1,Goto(context_1,${EXTEN},1)<br>
&gt;    exten =&gt; 6789540671,1,Goto(context_2,${EXTEN},1)<br>
<br>
</div>I prefer to save EXTEN (after any pattern matching nonsense) in a more<br>
&quot;meaningful&quot; variable like DNIS and then use the &quot;s&quot; extension from then<br>
on. I find it &quot;cleaner&quot; and more maintainable. For example (typing off the<br>
top of my head):<br>
<br>
[incoming-from-xyz]<br>
        exten = _678954067x,1,          set(DNIS=${EXTEN})<br>
        exten = 6789540670,2,           goto(home,s,1)<br>
        exten = 6789540671,2,           goto(work,s,1)<br>
<br>
[home]<br>
        exten = s,1,                    dial(sip/home-phone)<br>
<br>
[work]<br>
        exten = s,1,                    dial(sip/work-phone)<br>
<br>
If I get another work number, I just add another line to<br>
incoming-from-xyz. If I change a number, I just change that single line.<br>
<font color="#888888"><br>
--<br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards       <a href="mailto:sedwards@sedwards.com">sedwards@sedwards.com</a>      Voice: +1-760-468-3867 PST<br>
Newline                                              Fax: +1-760-731-3000<br>
</font><div><div></div><div class="h5"><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>