@dan_ce wrote:
So re: this thread, I’ve done some more research and the snippet from the above referenced file seems to relate to this.
Any ideas why restoring my settings might cause a problem for this function?
What I’d really like to do is ‘reset’ FreePBX without reinstalling but I gather this is not possible?
Thanks
function core_hint_get($account){ global $astman; static $hintCache; if (isset($hintCache[$account])) { return $hintCache[$account]; } $chan_dahdi = ast_with_dahdi(); // We should always check the AMPUSER in case they logged into a device // but we will fall back to the old methond if $astman not open although // I'm pretty sure everything else will puke anyhow if not running // if ($astman) { $device=$astman->database_get("AMPUSER",$account."/device"); $device_arr = explode('&',$device); $sql = "SELECT dial, hint_override from devices where id in ('".implode("','",$device_arr)."')"; } else { $sql = "SELECT dial, hint_override from devices where user = '{$account}'"; } $results = sql($sql,"getAll",DB_FETCHMODE_ASSOC); //create an array of strings if (is_array($results)){ foreach ($results as $result) { $hint = !empty($result['hint_override']) ? $result['hint_override'] : $result['dial']; if ($chan_dahdi) { $dial[] = str_replace('ZAP', 'DAHDI', $hint); } else { $dial[] = $hint; } } } //create a string with & delimiter if (isset($dial) && is_array($dial)){ $hint = implode($dial,"&"); } else { if (isset($results[0]['dial'])) { $hint = $results[0]['dial']; } else { $hint = null; } } $hintCache[$account] = $hint; return $hint; }
If I delete ALL extensions I can get it to reload. If I try to recreate an extension I get the following error:
EDIT Think I sorted it. I rolled back Core a few versions, reinstated the backup, THEN upgraded Core.
I still think the backup that was taken of my system wasn’t a brilliant one - or there were difficulties instating it - there were quite a few gremlins I had to find. e.g. mysterious additional empty destinations on an IVR that were causing errors until deleted.
Thanks
Posts: 2
Participants: 2