<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello Andrew,<br></div><div><br data-mce-bogus="1"></div><div>some preliminary tests show that it works. I have to rebuild the docker image to get the mod to be built however, so I can't do this in production right away but it looks like I can consolidate a few rules with that.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>thanks for your help<br data-mce-bogus="1"></div><div>Joern<br data-mce-bogus="1"></div><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>Von: </b>"Andrew Cassidy" <andrew@cassidywebservices.co.uk><br><b>An: </b>"FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org><br><b>Gesendet: </b>Freitag, 11. September 2015 10:37:04<br><b>Betreff: </b>Re: [Freeswitch-users] Replacing leading "+" in outgoing numbers<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr">I use mod_translate for that sort of thing but that's personal preference.</div><div class="gmail_extra"><br><div class="gmail_quote">On 11 September 2015 at 09:28, Jörn Ott <span dir="ltr"><<a href="mailto:joern.ott@ext.chefkoch.de" target="_blank">joern.ott@ext.chefkoch.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div>Hello guys,<br></div><br><div>its not the digits causing problems but the \+ at the beginning.<br></div><br><div>My routes for national calls ^0(\d\d\d\d\d*)$ and international calls ^00(\d\d\d\d\d*)$ work fine that way (targetting all numbers which are longer than internal numbers and have a leading 0 or 00). The problem happens, if add a similar rule starting with a literal + (\+), then I am getting switch parse errors.<br></div><br><div>Kind regards<br></div><div>Joern<br></div><br><hr><div><b>Von: </b>"Ken Rice" <<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>><br><b>An: </b>"FreeSWITCH Users Help" <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br><b>Gesendet: </b>Freitag, 11. September 2015 04:13:59<br><b>Betreff: </b>Re: [Freeswitch-users] Replacing leading "+" in outgoing numbers<br></div><br><div><div><div class="h5"><div><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.*</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </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"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <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 <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br><b>Subject:</b> [Freeswitch-users] Replacing leading "+" in outgoing numbers</span></p></div></div><p class="MsoNormal"> </p><div><div><div><div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">Hello all,</span></p></div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"> </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:</span></p></div><div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"><extension name="ext.ddddd" ><br> <condition field="destination_number" expression="^\+(\d\d\d\d\d*)$" ><br> <action application="set" data="sip_h_X-accountcode=${accountcode}" /><br> <action application="set" data="sip_h_X-Tag=" /><br> <action application="set" data="call_direction=outbound" /><br> <action application="set" data="hangup_after_bridge=true" /><br> <action application="set" data="inherit_codec=true" /><br> <action application="set" data="ignore_display_updates=true" /><br> <action application="set" data="callee_id_number=$1" /><br> <action application="set" data="continue_on_fail=true" /><br> <action application="set" data="outbound_prefix=+" /><br> <action application="bridge" data="sofia/gateway/781c8f7f-5d96-4e9e-8939-423b883cb675/$1" /><br> </condition><br></extension></span></p></div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"> </span></p><div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">Sadly, the condition field already generates compile error.</span></p></div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"> </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?</span></p></div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"> </span></p><div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">Kind regards</span></p></div><div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">Joern</span></p></div><div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">-- </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 <a href="tel:%2B49%20228%2028669-50" target="_blank">+49 228 28669-50</a><br>Telefax <a href="tel:%2B49%20228%2028669-511" target="_blank">+49 228 28669-511</a><br><a href="mailto:joern.ott@ext.chefkoch.de" target="_blank">joern.ott@ext.chefkoch.de</a> | <a href="http://www.chefkoch.de" target="_blank">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.</span></p></div></div><p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"> </span></p></div></div></div><br></div></div>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services: <br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><b>Andrew Cassidy BSc (Hons) MBCS SSCA</b><div>Managing Director<div><div><img src="http://www.cassidywebservices.co.uk/static/emailsig.png"><br></div><div><br><div><b style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">T</a> </b>03300 100 960
<b style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">F</a> </b>03300 100 961</div><div><b style="text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">E</a> </b><a href="mailto:andrew@cassidywebservices.co.uk" target="_blank">andrew@cassidywebservices.co.uk</a><br data-mce-bogus="1"></div><div><b style="text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">W</a> </b><a href="http://www.cassidywebservices.co.uk" target="_blank">www.cassidywebservices.co.uk</a><br data-mce-bogus="1"></div></div></div></div></div></div>
</div>
<br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services: <br>consulting@freeswitch.org<br>http://www.freeswitchsolutions.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://confluence.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></div></div></body></html>