This may be due to my ignorance on how regexes are matched to parts of the dialled number. I am testing a new trunk in the dialplan by routing a single number through it. All the other numbers use the existing trunk and will be switched over later. This means I match the whole number and use it in the dial plan. However when I use $0 on its on in the dial string it works okay, but when I prefix it, eg 240$0 the $0 is not translated to the dialled number and is sent literally to the provider with the obvious results. <!-- route 1234 numbers through trunkxxx -> <condition field="destination_number" break="on-true" expression="^1234567890$"> <action application="bridge" data="sofia/gateway/trunkxxx/240$0"/> </condition> What do I need to do to send the whole matched number prefixed or suffixed with some other numbers? -- Frank Church ======================= http://devblog.brahmancreations.com
Hi, As far as I understood you need to prefix exact number with 240 and send it out to provider. Please try following: <!-- route 1234 numbers through trunkxxx -> <condition field="destination_number" break="on-true" expression="^(1234567890$)"> <action application="bridge" data="sofia/gateway/trunkxxx/240$1"/> </condition> In this case only 1234567890 numbers will satisfy this condition and you will sand out to provider 240123456790 With kind regards, Jurijs On Mon, Mar 28, 2016 at 2:10 PM, vfclists . <vfclists@gmail.com> wrote:
This may be due to my ignorance on how regexes are matched to parts of the dialled number.
I am testing a new trunk in the dialplan by routing a single number through it. All the other numbers use the existing trunk and will be switched over later. This means I match the whole number and use it in the dial plan. However when I use $0 on its on in the dial string it works okay, but when I prefix it, eg 240$0 the $0 is not translated to the dialled number and is sent literally to the provider with the obvious results.
<!-- route 1234 numbers through trunkxxx -> <condition field="destination_number" break="on-true" expression="^1234567890$"> <action application="bridge" data="sofia/gateway/trunkxxx/240$0"/> </condition>
What do I need to do to send the whole matched number prefixed or suffixed with some other numbers?
-- Frank Church
======================= http://devblog.brahmancreations.com
_________________________________________________________________________ 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
On 28 March 2016 at 12:26, Jurijs Ivolga <jurijs.ivolga@gmail.com> wrote:
Hi,
As far as I understood you need to prefix exact number with 240 and send it out to provider.
Please try following:
<!-- route 1234 numbers through trunkxxx -> <condition field="destination_number" break="on-true" expression="^(1234567890$)"> <action application="bridge" data="sofia/gateway/trunkxxx/240$1"/> </condition>
In this case only 1234567890 numbers will satisfy this condition and you will sand out to provider 240123456790
With kind regards,
Jurijs
Thanks, it works
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
-- Frank Church ======================= http://devblog.brahmancreations.com
participants (2)
-
Jurijs Ivolga
-
vfclists .