<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 28/11/2016, at 12:29 pm, Calum Power <<a href="mailto:Calum.Power@aad.gov.au" class="">Calum.Power@aad.gov.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Menlo-Regular; font-size: 10px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><snip></div></div></div></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><div class="WordSection1" style="page: WordSection1; font-family: Menlo-Regular; font-size: 10px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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 class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">exten => B,n,GotoIf($["${CALLERID(num):-2}" = "13"] & $["${CALLERID(num):0:2}" = [5-9][5-9])?change_context)<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Any advice/suggestions/flames welcome<span class="Apple-converted-space"> </span><span style="font-family: Wingdings;" class="">J</span></div></div></blockquote><div><br class=""></div>Hi Calum</div><div><br class=""></div><div>I think you'll need another closing square-bracket at the end of the second conditional test in your example, ie:  5-9]<b class="">])</b>?cha</div><div><br class=""></div><div>I also think you may need to wrap that second conditional up in the REGEX function, although there are much smarter people on-list who will likely come back with a better suggestion!</div><div><br class=""></div><div>Also, checking the second character of CID is the same as the first character (otherwise you'd match 56, 69, 97 etc).</div><div><br class=""></div><div>I'm thinking something like:</div><div><br class=""></div><div>$[${REGEX("[5-9]" ${CALLERID(num):0:1})}] & $[${CALLERID(num):0:1} = ${CALLERID(num):1:1}]</div><div><br class=""></div><div>Hope this helps anyway :)</div><div><br class=""></div><div>Pete</div><div><br class=""></div><div><br class=""><br class=""></div><div><br class=""></div><div><br class=""></div></body></html>