Hi, Can I just confirm that the following: <extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension> Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0 Thanks Richard
Yes it would indeed. Le 7 mars 2015 09:46, "Richard Mace" <richard.mace@gmail.com> a écrit :
Hi, Can I just confirm that the following:
<extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension>
Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0
Thanks
Richard
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks Florent, There must be another reason for my calls not going through the gateway then :) Richard On 7 Mar 2015 09:05, "Florent Krieg" <flokrrr@gmail.com> wrote:
Yes it would indeed. Le 7 mars 2015 09:46, "Richard Mace" <richard.mace@gmail.com> a écrit :
Hi, Can I just confirm that the following:
<extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension>
Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0
Thanks
Richard
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
The FreeSWITCH debug log output is quite informative, although it can be daunting at first. My guess is that you have not configured a gateway under conf/sip_profiles/external/gateway-name.xml containing at least <gateway name=”wph_out_work”> which is the lookup key for that gateway named in the sofia line. The name of the XML file is not important, just so that you can identify it. The rest of those settings from Asterisk populate the corresponding fields; even though they come from Asterisk, I doubt that FreeSWITCH will reject them J If you’ve already done this, then the log files will show the bridge app being fed that sofia dial string and the lines immediately following should tell you what happened next. Or perhaps that extension in the dialplan is not even being matched in the first place? Hope this helps. Bote From: Richard Mace Sent: Saturday, 07 March, 2015 04:10 Subject: Re: [Freeswitch-users] Regex Thanks Florent, There must be another reason for my calls not going through the gateway then :) Richard On 7 Mar 2015 09:05, "Florent Krieg" <flokrrr@gmail.com> wrote: Yes it would indeed. Le 7 mars 2015 09:46, "Richard Mace" <richard.mace@gmail.com> a écrit : Hi, Can I just confirm that the following: <extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension> Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0 Thanks Richard
Yes it is... https://regex101.com/r/kX6xK8/1 2015-03-07 9:42 GMT+01:00 Richard Mace <richard.mace@gmail.com>:
Hi, Can I just confirm that the following:
<extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension>
Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0
Thanks
Richard
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Regis, You know that the regex is ok, but you need to find if this specific extension in your dialplan is being tested during the call routing, if you post your dialplan and your debug logs you'll get better answers. Em 07/03/2015 12:14, "Regis M" <regis.freeswitch.org@tornad.net> escreveu:
Yes it is... https://regex101.com/r/kX6xK8/1
2015-03-07 9:42 GMT+01:00 Richard Mace <richard.mace@gmail.com>:
Hi, Can I just confirm that the following:
<extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension>
Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0
Thanks
Richard
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
First, I use the following site (there are many others as well) to test any RegEx expressions that I intend to use https://www.regex101.com/ On that site I select the "Unit Tests", enter a number of test strings into the Add Test, and then click on the right arrow above the test strings to execute the test But looking at the RegEx that you have written, it would REQUIRE: that the string begin with both 9 & 0 and then be followed by 10 digits. The 'captured' value would be that within the parenthesis ( 0nnnnnnnnnn ) which would be used by subsequent code (extensions, outside numbers, passed to 'wph-office', etc.) Within your freeswitch.log file you should be able to see if that particular 'extension' is executed. Do a search for wph_out_work and see if it is listed. If so, they you should be able to see PASS or FAIL on the RegEx that it received. If it is not found by the Search, then something else might be 'intercepting' the number before it ever gets to that 'extension' If all that looks good, then I'd look into whether or not you should be using 'bridge' instead of 'transfer' Good Luck -------------------------------------------- On Sat, 3/7/15, Richard Mace <richard.mace@gmail.com> wrote: Subject: [Freeswitch-users] Regex To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Saturday, March 7, 2015, 2:42 AM Hi,Can I just confirm that the following: <extension name="wph_out_work"> <condition field="destination_number" expression="^9(0\d{10})$"> <action application="bridge" data="sofia/gateway/wph-office/$1"/> </condition> </extension> Would route all calls that were 90 and then another 10 digits, to the gateway wph-office by just passing the number beginning with the 0 Thanks Richard -----Inline Attachment Follows----- _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (6)
-
Bote Man
-
Florent Krieg
-
Regis M
-
Richard Mace
-
T Fred Farmington
-
Ítalo Rossi