Index: /modules/branches/2.2/zoip/functions.inc.php =================================================================== --- /modules/branches/2.2/zoip/functions.inc.php (revision 2516) +++ /modules/branches/2.2/zoip/functions.inc.php (revision 2524) @@ -18,5 +18,5 @@ switch($engine) { case "asterisk": - $ext->add('app-zoip', 's', '', new ext_answer()); + $ext->add('app-zoip', 's', '', new ext_answer('')); $ext->add('app-zoip', 's', '', new ext_agi($amp_conf['AMPWEBROOT'].'/admin/modules/zoip/sphinx_server.pl')); $ext->add('app-zoip', 's', '', new ext_playback('wait-moment')); Index: /modules/branches/2.2/phonebook/functions.inc.php =================================================================== --- /modules/branches/2.2/phonebook/functions.inc.php (revision 2292) +++ /modules/branches/2.2/phonebook/functions.inc.php (revision 2524) @@ -20,8 +20,10 @@ $list = $astman->database_show(); foreach ($list as $k => $v) { - if (substr($k, 1, 7) == 'cidname') - $numbers[substr($k, 9)]['name'] = $v ; - if (substr($k, 1, 13) == 'sysspeeddials') - $numbers[$v]['speeddial'] = substr($k, 15) ; + if (isset($v)) { // Somehow, a 'null' value is leaking into astdb. + if (substr($k, 1, 7) == 'cidname') + $numbers[substr($k, 9)]['name'] = $v ; + if (substr($k, 1, 13) == 'sysspeeddials') + $numbers[$v]['speeddial'] = substr($k, 15) ; + } } Index: /modules/branches/2.2/pbdirectory/functions.inc.php =================================================================== --- /modules/branches/2.2/pbdirectory/functions.inc.php (revision 2195) +++ /modules/branches/2.2/pbdirectory/functions.inc.php (revision 2524) @@ -21,5 +21,5 @@ if (!empty($code)) { - $ext->add('app-pbdirectory', $code, '', new ext_answer()); + $ext->add('app-pbdirectory', $code, '', new ext_answer('')); $ext->add('app-pbdirectory', $code, '', new ext_wait(1)); $ext->add('app-pbdirectory', $code, '', new ext_goto(1,'pbdirectory')); @@ -30,5 +30,5 @@ $ext->add('app-pbdirectory', 'pbdirectory', '', new ext_noop('Got number to dial: ${dialnumber}')); $ext->add('app-pbdirectory', 'pbdirectory', '', new ext_dial('Local/${dialnumber}@from-internal/n','','')); - $ext->add('app-pbdirectory', 'hangup', '', new ext_hangup()); + $ext->add('app-pbdirectory', 'hangup', '', new ext_hangup('')); $ext->addInclude('from-internal-additional', 'app-pbdirectory'); Index: /modules/branches/2.2/cidlookup/functions.inc.php =================================================================== --- /modules/branches/2.2/cidlookup/functions.inc.php (revision 2128) +++ /modules/branches/2.2/cidlookup/functions.inc.php (revision 2524) @@ -46,4 +46,6 @@ // TODO: move sql to functions cidlookup_did_(add, del, edit) + if (!isset($request['action']) + return; switch ($request['action']) { case 'addIncoming': @@ -128,5 +130,5 @@ case "internal": - $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_lookupcidname()); + $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_lookupcidname('')); break; @@ -187,5 +189,5 @@ case "sugarcrm": $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_noop('SugarCRM not yet implemented')); - $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_return()); + $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_return('')); break; } @@ -196,10 +198,10 @@ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_db_put('cidname', '${CALLERID(num)}', '${CALLERID(name)}' )); } - $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_return()); + $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_return('')); } } - $ext->add('cidlookup', 'cidlookup_return', '', new ext_lookupcidname()); - $ext->add('cidlookup', 'cidlookup_return', '', new ext_return()); + $ext->add('cidlookup', 'cidlookup_return', '', new ext_lookupcidname('')); + $ext->add('cidlookup', 'cidlookup_return', '', new ext_return('')); } break; @@ -224,9 +226,5 @@ function cidlookup_did_list() { $results = sql("SELECT * FROM cidlookup_incoming","getAll",DB_FETCHMODE_ASSOC); - if(is_array($results)){ - return $results; - } else { - return null; - } + return is_array($results)?$results:null; } @@ -244,10 +242,10 @@ } } - return $allowed; + return isset($allowed)?$allowed:null; } function cidlookup_get($id){ $results = sql("SELECT * FROM cidlookup WHERE cidlookup_id = '$id'","getRow",DB_FETCHMODE_ASSOC); - return $results; + return isset($results)?$results:null; } Index: /modules/branches/2.2/speeddial/functions.inc.php =================================================================== --- /modules/branches/2.2/speeddial/functions.inc.php (revision 2218) +++ /modules/branches/2.2/speeddial/functions.inc.php (revision 2524) @@ -25,5 +25,5 @@ if (!empty($code)) { - $ext->add('app-pbdirectory', $code, '', new ext_answer()); + $ext->add('app-pbdirectory', $code, '', new ext_answer('')); $ext->add('app-pbdirectory', $code, '', new ext_wait(1)); $ext->add('app-pbdirectory', $code, '', new ext_goto(1,'pbdirectory')); @@ -55,5 +55,5 @@ $ext->add('macro-speeddial-lookup', 's', '', new ext_goto('end')); $ext->add('macro-speeddial-lookup', 's', 'failed', new ext_noop('No system or user speeddial found'), 'lookupsys',101); - $ext->add('macro-speeddial-lookup', 's', 'end', new ext_noop()); + $ext->add('macro-speeddial-lookup', 's', 'end', new ext_noop('End of Speeddial-lookup')); if (!empty($callcode)) { @@ -66,5 +66,5 @@ $ext->add('app-speeddial', '_'.$callcode.'.', 'failed', new ext_playback('speed-dial-empty'), 'lookup',101); - $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_congestion()); + $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_congestion('')); } @@ -94,5 +94,5 @@ $ext->add('app-speeddial-set', 's', '', new ext_playback('is-set-to')); $ext->add('app-speeddial-set', 's', '', new ext_saydigits('${newnum}')); - $ext->add('app-speeddial-set', 's', '', new ext_hangup()); + $ext->add('app-speeddial-set', 's', '', new ext_hangup('')); @@ -118,5 +118,5 @@ $ext->add('app-speeddial-set', '3', '', new ext_goto('setnum','s')); - $ext->add('app-speeddial-set', 't', '', new ext_congestion()); + $ext->add('app-speeddial-set', 't', '', new ext_congestion('')); Index: /modules/branches/2.2/blacklist/functions.inc.php =================================================================== --- /modules/branches/2.2/blacklist/functions.inc.php (revision 2385) +++ /modules/branches/2.2/blacklist/functions.inc.php (revision 2524) @@ -84,13 +84,13 @@ $id = "app-blacklist-check"; $c = "s"; - $ext->add($id, $c, '', new ext_lookupblacklist()); + $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_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_zapateller()); + $ext->add($id, $c, '', new ext_zapateller('')); + $ext->add($id, $c, '', new ext_zapateller('')); $ext->add($id, $c, '', new ext_playback('ss-noservice')); - $ext->add($id, $c, '', new ext_hangup()); + $ext->add($id, $c, '', new ext_hangup('')); $modulename = 'blacklist';