Incoming Routes stopped working after Core 2.6.0.2 update

stickys's picture

I tried this in two different installations (PBX in a Flash with Asterisk 1.4.21.2, with all latest FreePBX updates) with the same results... Before the latest Core 2.6.0.2 update i could see and edit my incoming routes... After the update i cannot edit or add any incoming route from FreePBX web interface... The webpage after i click on of my preexisting routes is like that...

* Add Incoming Route
* All DIDs (toggle sort)
* User DIDs
* General DIDs
* Unused DIDs
* All Incoming
any DID / any CID
* Mobile Calls
69********** / any CID

It shows anly this info and nothing else... And this was the production machine... I have a test machine also in another office, in which the incoming routes worked OK and after the update stopped working either... Restart of machine didn't solve the problem... And i cannot add anything new...

Any ideas?

Thanks in advance...


__________________


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

A quick fix is this: Edit

mickecarlsson's picture

A quick fix is this:
Edit your /var/www/html/admin/modules/core/functions.inc.php
Goto line 2476 and add after that line:

global db;

You need to do the same a couple of lines down.

Now your code should look like this:

function core_did_get($extension="",$cidnum=""){
        global $db;
        $cidnum = $db->escapeSimple($cidnum);
        $sql = "SELECT * FROM incoming WHERE cidnum = \"$cidnum\" AND extension = \"$extension\"";
        return sql($sql,"getRow",DB_FETCHMODE_ASSOC);
}

function core_did_del($extension,$cidnum){
        global $db;
        $cidnum = $db->escapeSimple($cidnum);
        $sql="DELETE FROM incoming WHERE cidnum = \"$cidnum\" AND extension = \"$extension\"";
        sql($sql);
}

I will try to get an updated version out ASAP.


__________________

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)


That fix seems to work alright

stickys's picture

That fix seems to work OK in my test machine...

Thanks a lot for your fast reply and help...