<br><div class="gmail_quote">On Thu, Apr 5, 2012 at 10:52 AM, John Kiniston <span dir="ltr">&lt;<a href="mailto:johnkiniston@gmail.com">johnkiniston@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 10:35 AM,  <span dir="ltr">&lt;<a href="mailto:lists65@gmail.com" target="_blank">lists65@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
If I wanted to route a call from a particular DID and the CALLERID from a<br>
specific A/C this doesn&#39;t seem to work for me:<br>
<br>
exten =&gt; 6140000000/_702XXXXXXX,n,Goto(context1,s,1)<br>
exten =&gt; 6140000000/6149999999,n,Goto(context2,s,1)<br>
exten =&gt; 6140000000/6149999998,n,Goto(context3,s,1)<br>
exten =&gt; 6140000000/6149999997,n,Dial(SIP/7777,25)<br>
<br></blockquote></div><br></div>You are pretty close, I  think it&#39;s your priorities that are the problem. When I use &quot;Ex Girl Friend Logic&quot; I write my extensions this way:<br><br>exten =&gt; 6140000000/6149999999,1,Goto(context2,s,1)<br>

exten =&gt; 6140000000/6149999998,1,Goto(context3,s,1)<br>exten =&gt; 6140000000,1,Dial(SIP/7777,25)<br clear="all"><br></blockquote></div><div><br></div><div>I agree, priorities are very tricky in this case, and I&#39;ve spent a lot of time figuring out similar scenarios.  Also you may need to use an &#39;s&#39; priority in some cases, where there are two potential matches that are the same priority.  I&#39;m sorry I can&#39;t think of where I have a useful code snippet for your exact case.  I&#39;d recommend starting with a fully working explicit statement then work back from there to less explicit:</div>
<div><br></div><div>exten =&gt; 16027170050/8774613644,1,Goto(monkeys,s,1)</div><div><br></div><div>Then:</div><div><br></div><div>exten =&gt; 1602717005X/8774613644,1,Goto(monkeys,s,1)</div><div><br></div><div>Etc.</div>
<div><br></div>-- <br><div>Carlos Alvarez</div><div>TelEvolve</div><div>602-889-3003</div><div><br></div><br>