<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Although I&#8217;m a huge fan of ex-girlfriend logic, it&#8217;s probably overkill for this application.&nbsp; Here is what I would suggest:<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'>exten =&gt; _702.n,Goto(context1,s,1)<br>exten =&gt; _614.,n,Goto(context2,s,1)<br>exten =&gt; _614555.,n,Goto(context3,s,1)<br>exten =&gt; _.,n,Dial(SIP/7777,25)<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>lists65@gmail.com<br><b>Sent:</b> Wednesday, April 11, 2012 4:11 PM<br><b>To:</b> 'Asterisk Users Mailing List - Non-Commercial Discussion'<br><b>Subject:</b> Re: [asterisk-users] Dial Plan - Routing via Caller ID<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Here is an example.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Let&#8217;s say that I want to send all calls to a context that would answer the call via voicemail.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Let&#8217;s say that I want to only right a SIP phone if calls cam from a particular Area Code (maybe the Area Codes in your state).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Let&#8217;s say that I would want to send calls from a particular A/C and certain NNX&#8217;s to a particular sales group.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Does that help define the purpose of directing calls *<b>from</b>* different Area Codes and NNX&#8217;s?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I wanted to come up with total control to do with an incoming call depended upon *<b>where</b>* that call came from whether it be a whole A/C, A/C with particular NNX&#8217;s or even down to a particular A/C/NNX/number.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hope that clarifies what I was looking help with.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a> <a href="mailto:[mailto:asterisk-users-bounces@lists.digium.com]">[mailto:asterisk-users-bounces@lists.digium.com]</a> <b>On Behalf Of </b>John Kiniston<br><b>Sent:</b> Thursday, April 05, 2012 1:53 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] Dial Plan - Routing via Caller ID<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>On Thu, Apr 5, 2012 at 10:35 AM, &lt;<a href="mailto:lists65@gmail.com">lists65@gmail.com</a>&gt; wrote:<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><br>If I wanted to route a call from a particular DID and the CALLERID from a<br>specific A/C this doesn'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)<o:p></o:p></p></div><p class=MsoNormal><br>You are pretty close, I&nbsp; think it'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>I have never used a wildcard match like you are attempting to do with the 702 prefix but according to <a href="http://voip-info.org">voip-info.org</a> it should work<br><br>-- <br>A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein<o:p></o:p></p></div></body></html>