<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" 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 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        font-size:10.0pt;
        font-family:Verdana;}
h1
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        text-align:justify;
        page-break-after:avoid;
        font-size:18.0pt;
        font-family:Verdana;}
h2
        {margin-top:3.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        text-align:justify;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:Verdana;}
h3
        {margin-top:3.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        text-align:justify;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:Verdana;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:51.05pt 51.05pt 51.05pt 51.05pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt'>Hi
All,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt'>I
have a quick query which I&#8217;m sure someone will have done before.&nbsp;
Essentially, I have a 3<sup>rd</sup> party desktop app which does number lookup
in Outook via the manager interface.&nbsp;&nbsp; Works wonderfully. &nbsp;&nbsp;However,
it&#8217;s not very clever in the number matching.&nbsp; I have all my contacts
stored in +country code &lt;number&gt; format.&nbsp; My service provider passes
all numbers, apart from <st1:country-region w:st="on"><st1:place w:st="on">UK</st1:place></st1:country-region>
numbers, to me in this format. &nbsp;Hence, <st1:country-region w:st="on"><st1:place
 w:st="on">UK</st1:place></st1:country-region> number lookups don&#8217;t work
correctly.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt'>So
onto the problem&#8230; I&#8217;m trying to write a quick on-liner which will
fix up incoming <st1:country-region w:st="on"><st1:place w:st="on">UK</st1:place></st1:country-region>
format numbers (0 + 10digits) into (44 + 9 digits).&nbsp; I got as far as this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'>exten =&gt; &lt;incoming
extension&gt;,1,Set(foo=${IF(REGEX(&quot;^0[1-9][0-9]\{9\}$&quot;
{CALLERID(number)})?Set(CALLERID(number)=44${CALLERID(number):1})})<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'>The regex is correctly triggered,
and the Set(CALLERID(number)= xxx ) method is called, but I am struggling to concatenate
the two strings.<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'>I&#8217;m trying to set the new
callerid to be 44 concatenated with the original callerid without the leading
0. <o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'>Any wisdom would be greatly
appreciated.<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'>Cheers,<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face=Verdana><span style='font-size:10.0pt'><br>
Dave<o:p></o:p></span></font></p>

</div>

</body>

</html>