thanks<br><br><br><div class="gmail_quote">On Sat, Nov 21, 2009 at 12:26 PM, Steve Edwards <span dir="ltr"><<a href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>></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">> Thomas Perron wrote:<br>
><br>
>> I have two DID numbers. I want to configurate my IVR to initiate a<br>
>> 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>
> Assuming that the DID originator sends you the number in the Request<br>
> URI, you can just treat them like "extensions" in Asterisk. Example: if<br>
> you have DID 6789540670 and 6789540671:<br>
><br>
> exten => 6789540670,1,Goto(context_1,${EXTEN},1)<br>
> exten => 6789540671,1,Goto(context_2,${EXTEN},1)<br>
<br>
</div>I prefer to save EXTEN (after any pattern matching nonsense) in a more<br>
"meaningful" variable like DNIS and then use the "s" extension from then<br>
on. I find it "cleaner" 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>