[Freeswitch-users] Table lookups in a dialplan - is using mod_blacklist appropriate or too much of a hack?
Avi Marcus
avi at avimarcus.net
Mon Mar 18 23:58:47 MSK 2013
I use: mod_odbc_query <http://wiki.freeswitch.org/wiki/Mod_odbc_query> to
query SQL directly in the dialplan -- it's from the contrib repository.
Then you could store a bunch of information about each number and you get
each one as a channel variable.
-Avi
On Mon, Mar 18, 2013 at 10:49 PM, Nathan Neulinger <nneul at mst.edu> wrote:
> I was thinking of using mod_blacklist as a way to define a table of short
> extension numbers to be able to "look up" an
> entry in a dialplan condition. i.e. defining a blacklist
> "local_ext_but_not_freeswitch" - or for distinguishing easily
> between sip and skinny phones (is_sip_ext, is_skinny_ext).
>
> Does this seem like a useful use of the (somewhat misnamed) mod_blacklist,
> or a bad approach?
>
> Reason for this is that I'll have approximately 1600 extensions,
> discontiguous - some of which will be on freeswitch,
> others which won't. For the ones that are on freeswitch, some of them will
> be on skinny phones, and others will be on
> SIP phones.
>
> I was leaning toward something like:
>
> <extension name="Local Ext Check">
> <condition field="${blacklist(check is_local_ext $1)}"
> expression="^true$">
> <condition field="destination_number" expression="^(\d\d\d\d)$">
>
> </condition>
> </condition>
> </extension>
>
>
> The alternative was to build a new module very similar to mod_blacklist -
> i.e. 'mod_lookup', with the additional
> capability of having a value lookup and not just existence check.
>
> I realize I could rig something up with mod_hash, but I like the 'load
> straight from a file' capability.
>
> Thoughts?
>
> -- Nathan
>
> ------------------------------------------------------------
> Nathan Neulinger nneul at mst.edu
> Missouri S&T Information Technology (573) 612-1412
> System Administrator - Architect
>
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130318/76ecd83d/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list