<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
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-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="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>\d* is wrong… should be \d+ or maybe \d.*<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><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Jörn Ott<br><b>Sent:</b> Thursday, September 10, 2015 7:16 AM<br><b>To:</b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt;<br><b>Subject:</b> [Freeswitch-users] Replacing leading &quot;+&quot; in outgoing numbers<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>Hello all,<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>I am using FusionPBX and freeswitch. Incoming calls are signalled with a leading + and also stored in the snom phones call lists. If someone tries to call back an external caller, I tried to strip off the leading + on the outgoing call with the following condition:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>&lt;extension name=&quot;ext.ddddd&quot; &gt;<br>&nbsp;&nbsp; &lt;condition field=&quot;destination_number&quot; expression=&quot;^\+(\d\d\d\d\d*)$&quot; &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;sip_h_X-accountcode=${accountcode}&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;sip_h_X-Tag=&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;call_direction=outbound&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;inherit_codec=true&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;ignore_display_updates=true&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;callee_id_number=$1&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;outbound_prefix=+&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/781c8f7f-5d96-4e9e-8939-423b883cb675/$1&quot; /&gt;<br>&nbsp;&nbsp; &lt;/condition&gt;<br>&lt;/extension&gt;<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>Sadly, the condition field already generates compile error.<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>Can you give me a hint, how I can strip the + from the dialled number?<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>Kind regards<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>Joern<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>-- <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'>--<br>Jörn Ott<br>Systemadministrator<br><br>Chefkoch GmbH<br>Joseph-Schumpeter-Allee 33<br>53227 Bonn<br><br>Telefon +49 228 28669-50<br>Telefax +49 228 28669-511<br><a href="mailto:joern.ott@ext.chefkoch.de">joern.ott@ext.chefkoch.de</a> | <a href="http://www.chefkoch.de">http://www.chefkoch.de</a><br><br>HRB 18761, Amtsgericht Bonn<br>Geschäftsführer: Martin Meister, Sven Giebler, Arne Wolter<br>Ein Unternehmen von Gruner+Jahr.<o:p></o:p></span></p></div></div><p class=MsoNormal><span style='font-family:"Arial",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div></div></div></body></html>