[Freeswitch-users] Dialplan: Outbound route: destination_number: regex question
Artur Mega
findmeinwland at gmail.com
Mon Jul 3 13:42:52 UTC 2017
Sorry, I asked a question to freeswitch users list, but why I don't see
this question here? It is my second question, and second time question not
goes here.
2017-07-03 16:44 GMT+05:00 Vallimamod Abdullah <vma at vallimamod.org>:
> Hi,
>
> IMHO, instead of trying to find a single complicated regex working in all
> cases, a more readable way is to use condition regex="any" to stack all
> your possible matching regexes and let freeswitch try them one by one:
>
> <condition regex="any">
> <regex field="destination_number" expression="^(\+6422\d{7})$"/>
> <regex field="destination_number" expression="^(022\d{7})$"/>
> <regex field="destination_number" expression="^(\d{7})$"/>
> <action ...>
> </condition>
>
> Hope this helps.
>
> Best Regards,
> --
> Vallimamod Abdullah
> SIP Solutions
> vma at sipsolutions.fr
> .
>
>
> > On 3 Jul 2017, at 05:24, Nate <nathan.port at gmail.com> wrote:
> >
> > Hi Roy, many thanks for responding.
> >
> > I am simply trying to finishing configuring the server to make/receive
> calls from the PSTN.
> >
> > My reference to the regex is from trying to configure an outbound route.
> >
> > Can anyone offer any advice on a regex that will work for me to reach
> any of the following phone numbers:
> >
> > International: +64 22 333 4444
> > non-local: 022 333 4444
> > local: 333 4444
> >
> > From the number assigned to my account? +64 9 xxx yyyy
> >
> > Many many thanks!
> >
> > Nate.
> >
> > On Sat, Jul 1, 2017 at 9:17 AM, <royj at yandex.ru> wrote:
> > Not quite clear. What are you trying to achieve?
> >
> > 30.06.2017, 11:11, "Nate" <nathan.port at gmail.com>:
> >> Good day/evening everyone,
> >>
> >> Apologies for not being able to figure this out on my own. I've been
> searching and trying for several days to get inbound/outbound working but
> have yet to see success.
> >>
> >> At this stage I need help determining a proper regex expression for
> handling New Zealand phone numbers.
> >>
> >> For instance, there are three different ways of expressing numbers here
> in NZ:
> >>
> >> International: +64 22 333 4444
> >> non-local: 022 333 4444
> >> local: 333 4444
> >>
> >> A couple questions related to the SIP proxy:
> >>
> >> If the SIP proxy is located in Hong Kong, but the phone number is a New
> Zealand number, does the location of the proxy have any impact on the
> number of characters in the string for inbound/outbound calls?
> >>
> >> Again, apologies for the rudimentary nature of these questions, but
> having nearly exhausted all other options (docs, searches, IRC), I am now
> spending a large amount of time guessing and trial and error without any
> progress.
> >>
> >> Many thanks for any feedback at all.
> >>
> >> Nate
> >> ,
> >> ____________________________________________________________
> _____________
> >> Professional FreeSWITCH Consulting Services:
> >> consulting at 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 at 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 at 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 at 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 at 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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
С уважением,
Артур
Regards, Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170703/87b0043f/attachment.html>
More information about the FreeSWITCH-users
mailing list