<div dir="ltr">I would like to check if the called number contains a country code, if not then one should be added.<div>I've got a variable in my user's XML file called country_code containing +44.</div><div><br></div><div>This is my code so far, however, I think the last to conditions overlap:</div><div><br></div><div>
<p class=""><span class=""> </span><span class=""><condition</span><span class=""> field="destination_number" expression="^(\+\d{3,20})$"</span><span class="">></span></p>
<p class=""><span class=""> </span><span class=""><action</span><span class=""> application="export" data="dialed_extension=$1"/</span><span class="">></span></p>
<p class=""><span class=""> </span><span class=""></condition></span></p>
<p class=""><span class=""> </span><span class=""><condition</span><span class=""> field="destination_number" expression="^00(\d{3,20})$"</span><span class="">></span></p>
<p class=""><span class=""> </span><span class=""><action</span><span class=""> application="export" data="dialed_extension=+$1"/</span><span class="">></span></p>
<p class=""><span class=""> </span><span class=""></condition></span></p>
<p class=""><span class=""> </span><span class=""><condition</span><span class=""> field="destination_number" expression="^(\d{3,20})$"</span><span class="">></span></p>
<p class=""><span class=""> </span><span class=""><action</span><span class=""> application="export" data="dialed_extension=${country_code}$1"/</span><span class="">></span></p>
<p class=""><span class=""> </span><span class=""></condition></span></p><p class=""><span class=""><br></span></p><p class=""><span class="">I would like to change 00 to +, and if no + is on the number then use country_code from the user. If it does contain a +, then just use the dialled number.</span></p></div></div>