<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:x="urn:schemas-microsoft-com:office:excel" 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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi guys,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sorry if this is a really basic question, but I’m fairly new to Asterisk and am self-teaching so please go easy on me
<span style="font-family:Wingdings">J</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Basically what I am trying to do is match 2 patterns in a conditional GotoIf.<o:p></o:p></p>
<p class="MsoNormal">The first condition is that the callerid(num) must end in ‘13’<o:p></o:p></p>
<p class="MsoNormal">The second condition is that the first two digits of callerid(num) must be one of 66,77,88 or 99<o:p></o:p></p>
<p class="MsoNormal">eg. 9913 would match, but 9013 would not. 6613 would match, but 6612 would not.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What I have written come up with is below, but I just wanted to see if I was going about this the right way, and that this expression would actually work...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">exten => B,n,GotoIf($["${CALLERID(num):-2}" = "13"] & $["${CALLERID(num):0:2}" = [5-9][5-9])?change_context)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any advice/suggestions/flames welcome <span style="font-family:Wingdings">
J</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers<o:p></o:p></p>
<p class="MsoNormal">Calum<o:p></o:p></p>
</div>
<P>___________________________________________________________________________</P>
<P> Australian Antarctic Division - Commonwealth of
Australia<BR>IMPORTANT: This transmission is intended for the addressee only. If
you are not the<BR>intended recipient, you are notified that use or
dissemination of this communication is<BR>strictly prohibited by Commonwealth
law. If you have received this transmission in error,<BR>please notify the
sender immediately by e-mail or by telephoning +61 3 6232 3209 and<BR>DELETE the
message.<BR> Visit our web site at <A
href="http://www.antarctica.gov.au/">http://www.antarctica.gov.au/</A><BR>___________________________________________________________________________</P>
</body>
</html>