[Freeswitch-users] Table lookups in a dialplan - is using mod_blacklist appropriate or too much of a hack?
Nathan Neulinger
nneul at mst.edu
Mon Mar 18 23:49:27 MSK 2013
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
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list