diff -c blacklist2/functions.inc.php blacklist/functions.inc.php *** blacklist2/functions.inc.php 2008-09-02 03:42:27.000000000 -0400 --- blacklist/functions.inc.php 2008-09-02 03:42:21.000000000 -0400 *************** *** 8,13 **** --- 8,17 ---- global $version; switch($engine) { case "asterisk": + $results = sql("SELECT value FROM globals WHERE variable='BLACKLIST_DEST'","getAll",DB_FETCHMODE_ASSOC); + $row=$results[0]; + $goto=$row['value']; + $id = "app-blacklist"; $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal *************** *** 18,31 **** $ext->add($id, $c, '', new ext_gotoif('$["${BLACKLIST()}"="1"]', 'blacklisted')); } else { $ext->add($id, $c, '', new ext_lookupblacklist('')); ! $ext->add($id, $c, '', new ext_gotoif('$["${LOOKUPBLSTATUS}"="FOUND"]', 'blacklisted')); } $ext->add($id, $c, '', new ext_return('')); ! $ext->add($id, $c, 'blacklisted', new ext_answer('')); ! $ext->add($id, $c, '', new ext_wait(1)); ! $ext->add($id, $c, '', new ext_zapateller('')); ! $ext->add($id, $c, '', new ext_playback('ss-noservice')); ! $ext->add($id, $c, '', new ext_hangup('')); $modulename = 'blacklist'; --- 22,31 ---- $ext->add($id, $c, '', new ext_gotoif('$["${BLACKLIST()}"="1"]', 'blacklisted')); } else { $ext->add($id, $c, '', new ext_lookupblacklist('')); ! $ext->add($id, $c, '', new ext_gotoif('$["${LOOKUPBLSTATUS}"="FOUND"]', $goto)); } $ext->add($id, $c, '', new ext_return('')); ! $modulename = 'blacklist'; *************** *** 207,211 **** --- 207,217 ---- function blacklist_chk($post){ return true; } + function blacklist_setdestination($dest){ + global $amp_conf; + global $astman; + + sql("UPDATE globals SET value='".$dest."' WHERE variable=('BLACKLIST_DEST')"); + } ?> Common subdirectories: blacklist2/i18n and blacklist/i18n diff -c blacklist2/install.php blacklist/install.php *** blacklist2/install.php 2008-09-02 03:42:27.000000000 -0400 --- blacklist/install.php 2008-09-02 03:42:21.000000000 -0400 *************** *** 16,19 **** --- 16,22 ---- $fcc->setDefault('*32'); $fcc->update(); unset($fcc); + + sql("INSERT INTO globals VALUES('BLACKLIST_DEST','app-blackhole,zapateller,1')"); + ?> diff -c blacklist2/module.xml blacklist/module.xml *** blacklist2/module.xml 2008-09-02 03:42:27.000000000 -0400 --- blacklist/module.xml 2008-09-02 03:42:21.000000000 -0400 *************** *** 1,11 **** ! blacklist2 ! Blacklist2 2.4.0.2 setup Inbound Call Control ! Blacklist2 *2.4.0.2* #2956 incorrect call to splice code --- 1,11 ---- ! blacklist ! Blacklist 2.4.0.2 setup Inbound Call Control ! Blacklist *2.4.0.2* #2956 incorrect call to splice code diff -c blacklist2/page.blacklist.php blacklist/page.blacklist.php *** blacklist2/page.blacklist.php 2008-09-02 03:42:27.000000000 -0400 --- blacklist/page.blacklist.php 2008-09-02 03:42:21.000000000 -0400 *************** *** 19,24 **** --- 19,34 ---- $dispnum = "blacklist"; //used for switch on config.php + if (isset($_REQUEST['goto0']) && isset($_REQUEST[$_REQUEST['goto0']."0"])) { + $goto = $_REQUEST[$_REQUEST['goto0']."0"]; + } else{ + $results = sql("SELECT value FROM globals WHERE variable='BLACKLIST_DEST'","getAll",DB_FETCHMODE_ASSOC); + $row=$results[0]; + $goto=$row['value']; + } + + + //if submitting form, update database if(isset($_REQUEST['action'])) { *************** *** 36,43 **** blacklist_add($_POST); redirect_standard('editnumber'); break; ! ! } } --- 46,56 ---- blacklist_add($_POST); redirect_standard('editnumber'); break; ! case "setdestination": ! blacklist_setdestination($goto); ! needreload(); ! redirect_standard(); ! break; } } *************** *** 140,143 **** --- 153,173 ---- + + +
+ + + + + + + + + + + +


">
+
+ diff -c blacklist2/uninstall.php blacklist/uninstall.php *** blacklist2/uninstall.php 2008-09-02 03:42:27.000000000 -0400 --- blacklist/uninstall.php 2008-09-02 03:42:21.000000000 -0400 *************** *** 1,7 **** --- 1,7 ----