******** dialcnet macro ENUM data cacheing version written by Brian Clancy ********

The macro records the routing info, as discovered by ENUMLOOKUP, into the Asterisk 
database for each and every call made and in the event of ENUM server failure all NUMBERS
held in the database can still be called using the stored routings held therein. This is 
completely transparent to the user who will only notice the inaccessibility of NUMBERS 
for which no backup routing info is held. Where multiple NUMBERS have an identical 
routing the database will regardless hold an individual record for each and every NUMBER.
Where there are multiple routings to a single NUMBER these will also be stored on a    
record per routing basis and a base record for such a NUMBER holds a record of the number 
of routing entries and an indicator as to which entry was last called. This allows calls
to a NUMBER with multiple routings i.e. 448081 to operate in round robin mode in much
the same way as they are served from the ENUM server and would also allow NUMBERS with 
more than two routes to be called via a different route on each subsequent call if such
existed, which currently they do not. This has so far only been tested to a depth of
seven route records per NUMBER although there should be no practical limitation to 
the storage and retrieval of multiple entries of this form.

The Asterisk database can be viewed at the CLI using the standard command "database show"
and entries can be added and deleted using "database put" and "database del". This thus
also allows Ian Jolly's non-ENUM routes to be entered manually and used by the macro 
as if it had stored them itself although the macro does not currently support wild card
matching and requires an individual entry for every NUMBER the user may wish to call in 
the event of ENUM server failure. The fastest way to populate the database is to make
phone calls !!!

-----------------------------------------------------  
********** Release bjc1.0 for asterisk 1.4 **********
-----------------------------------------------------
The first release 23 July 2009 written for Asterisk 1.4 only 

Requires E164NETWORKS=std.ckts.info to be declared in the [globals] section of extensions.conf or 
simply change this line 

exten => s,n(search),Set(ENUM=${ENUMLOOKUP(${ARG1}|ALL||1|${E164NETWORKS})})    ;Search ENUM database

to this 

exten => s,n(search),Set(ENUM=${ENUMLOOKUP(${ARG1}|ALL||1|std.ckts.info)})    ;Search ENUM database

-----------------------------------------------------------------------
********** Release bjc1.01 for Asterisk 1.4 and Asterisk 1.2 **********
-----------------------------------------------------------------------

ENUMLOOKUP lines option requires to be uncommented as appropriate

lines renumbered from 'n' for Asterisk 1.2
