[Freeswitch-users] mod_dptools acting funny?

Nathan Neulinger nneul at mst.edu
Wed Jun 4 00:28:59 MSD 2014


Look at your number:

351213572318

Does it match: "Starts with 1" --> no

Does it match: "2 followed by 3 digits" --> yes

351213572318
--------^^^^

Capture the 3 digits -> (318)


You probably want that to be:

^[1-2](\d{3})$

or similar.

-- Nathan

On 06/03/2014 01:39 PM, Peter Villeneuve wrote:
> Thanks Anthony.
>
> It seems that my dp is picking it up as a local extension even though it doesn't start with 1 or 2 nor is it 3 digits.
> Weird, huh?
>
> sofia/internal/1000 at my.domain.com <mailto:1000 at my.domain.com> Regex (PASS) [Local_Extension]
> destination_number(#351213572318) =~ /^1|2(\d{3})$/ break=on-false
> Dialplan: sofia/internal/1000 at my.domain.com <mailto:1000 at my.domain.com> Action export(dialed_extension=318)
>
>
> On Tue, Jun 3, 2014 at 7:25 PM, Anthony Minessale <anthony.minessale at gmail.com <mailto:anthony.minessale at gmail.com>> wrote:
>
>     console loglevel debug
>
>
>     On Tue, Jun 3, 2014 at 1:20 PM, Peter Villeneuve <petervnv1 at gmail.com <mailto:petervnv1 at gmail.com>> wrote:
>
>         Hi,
>
>         Trying to process a simple call and it seems that mod_dptools is only recognizing the last 3 digits of the
>         dialled number instead of the complete number (318 in this example).
>
>         Any clue what I'm doing wrong?
>
>         Thanks,
>         Peter
>
>
>         2014-06-03 18:15:27.933596 [INFO] mod_dialplan_xml.c:558 Processing <1000>->#123456782318 in context default
>         2014-06-03 18:15:27.933596 [INFO] switch_ivr_async.c:3631 Bound B-Leg: *1 execute_extension::dx XML features
>         2014-06-03 18:15:27.933596 [INFO] switch_ivr_async.c:3631 Bound B-Leg: *2
>         record_session::/usr/local/freeswitch/recordings/1000.2014-06-03-18-15-27.wav
>         2014-06-03 18:15:27.933596 [INFO] switch_ivr_async.c:3631 Bound B-Leg: *3 execute_extension::cf XML features
>         2014-06-03 18:15:27.933596 [INFO] switch_ivr_async.c:3631 Bound B-Leg: *4 execute_extension::att_xfer XML features
>         2014-06-03 18:15:27.933596 [WARNING] mod_dptools.c:3979 Can't find user [318 at my.domain.com
>         <mailto:318 at my.domain.com>]
>         2014-06-03 18:15:27.933596 [NOTICE] switch_ivr_originate.c:2707 Cannot create outgoing channel of type [user]
>         cause: [SUBSCRIBER_ABSENT]
>         2014-06-03 18:15:27.933596 [INFO] mod_dptools.c:3234 Originate Failed.  Cause: SUBSCRIBER_ABSENT
>
>
>
>
>
>         _________________________________________________________________________
>         Professional FreeSWITCH Consulting Services:
>         consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>         http://www.freeswitchsolutions.com
>
>         
>         
>
>         Official FreeSWITCH Sites
>         http://www.freeswitch.org
>         http://wiki.freeswitch.org
>         http://www.cluecon.com
>
>         FreeSWITCH-users mailing list
>         FreeSWITCH-users at lists.freeswitch.org <mailto: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
>
>
>
>
>     --
>     Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>
>http://freeswitch.org/http://cluecon.com/http://twitter.com/FreeSWITCH
>     ☞ irc.freenode.net <http://irc.freenode.net> #freeswitch ☞ _http://freeswitch.org/g+_
>
>     ClueCon Weekly Development Call
>     ☎ sip:888 at conference.freeswitch.org <mailto:sip%3A888 at conference.freeswitch.org>  ☎ +19193869900 <tel:%2B19193869900>
>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>     http://www.freeswitchsolutions.com
>
>     
>     
>
>     Official FreeSWITCH Sites
>     http://www.freeswitch.org
>     http://wiki.freeswitch.org
>     http://www.cluecon.com
>
>     FreeSWITCH-users mailing list
>     FreeSWITCH-users at lists.freeswitch.org <mailto: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://wiki.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
>

-- 
------------------------------------------------------------
Nathan Neulinger                       nneul at mst.edu
Missouri S&T Information Technology    (573) 612-1412
System Administrator - Architect



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list