TRY THIS Enchilada (maybe others) CID Superfecta errors

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Using HiFormance (they use Venet0:0 if it makes any difference) and Incredible 13 with Asterisk 13.20 and the whole enchilada (installed on (2018-03-27 or so) -- this is on CentOS6 if it matters.

I am going through the old system I have on Vultr and making comparisons and as for the CID Superfecta am duplicating sources and credentials (OpenCman and such).

When I try Debug to test if the stuff will pull a name (like from my own Cell Number and such) I get errors similar to this:
Code:
Executing Asteridex
Connecting to Asteridex Database....
{"error":{"type":"Whoops\\Exception\\ErrorException","message":"Undefined index: DB_Name","file":"\/var\/www\/html\/admin\/modules\/superfecta\/sources\/source-Asteridex.module","line":51}}

this seems to happen on all sources, just different Line numbers -- in above the line is:
Code:
                $dbh = new PDO('mysql:dbname='.$run_param['DB_Name'].';host='.$run_param['DB_Host'].";charset=utf8", $run_param['DB_User'], $run_param['DB_Password']);

This is in an if/else block inside function get_caller_id($thenumber,$run_param=array() )

The function looks like this :
Code:
function get_caller_id($thenumber, $run_param=array()) {
        $caller_id = null;

        if(class_exists('PDO')) {
            $this->DebugPrint(_("Connecting to Asteridex Database...."));
            try {
                $dbh = new PDO('mysql:dbname='.$run_param['DB_Name'].';host='.$run_param['DB_Host'].";charset=utf8", $run_param['DB_User'], $run_param['DB_Password']);
            } catch (PDOException $e) {
                $this->DebugPrint(_('Connection failed: ') . $e->getMessage());
                return null;
            }
        } else {
            $this->DebugPrint(_("PDO not present on system...Skipping"));
            return null;
        }

        // trim number to filter length if applicable
        if ($run_param['Filter_Length'] != 0) {
            if (strlen($thenumber) > $run_param['Filter_Length']) $thenumber = substr($thenumber, -$run_param['Filter_Length']);
        }

        $sql_params = array();
        $sql = 'SELECT `name` FROM `user1` where `out` REGEXP :theregex';

        //  Build regular expression from the $thenumber to avoid non-digit characters stored in database
        $theregex = "[^0-9]*";
        for( $x=0; $x < ((strlen($thenumber))-1); $x++ )  {
            $theregex .=  substr($thenumber,$x,1)."[^0-9]*";
        }
        $theregex = $theregex.(substr($thenumber,-1))."([^0-9]+|$)";
        $sql_params[':theregex'] = $theregex;

        $sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
        if(!$sth) {
            $this->DebugPrint(_("Failed to Prepare the SQL Statement. Are we connected?...Skipping"));
            return null;
        }
        $this->DebugPrint(_("Connected!"));
        $this->DebugPrint(_("Searching Database..."));
        $sth->execute($sql_params);
        $find = $sth->fetch(PDO::FETCH_BOTH);

        if($find && is_array($find)) {
            $this->DebugPrint(_("Found.."));
            return $find[0];
        } else {
            $this->DebugPrint(_("Not Found"));
            return null;
        }
    }

I have searched for two days and find stuff from 2015 and before on Freepbx forum and elsewher (different programs not like ours same type errors) but I am no programmer but I thought semicolons were and 'execute' type terminator (as in mysql) and since the error shows as
Code:
Undefined index: DB_Name","file":"\/var\/www\/html\/admin\/modules\/superfecta\/sources\/source-Asteridex.module"
and these are to connect to databases (mysql) could the sytax be wrong? and maybe the entire function was just C/p into each source?

Any help would be greatly appreciated.

Another thought is there maybe a yum program or something that may not have been loaded that should have been?

Thanks again.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Lots of view, no ideas - I seem to think that some package may not have been installed or maybe the wron version of something. I will patiently wait but would like to know. I do like to use Superfecta (OpenCnam mainly but the more the merrier) seems to be in all sources.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@mainenotarynet: Download the attached Superfecta tarball to your desktop. Then login to web GUI and perform install steps 6, 7, and 8 from here. Good luck!!
 

Attachments

  • superfecta.tar.gz
    377.1 KB · Views: 6

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
No effect same errors Asteridex source shows at line 51. and stops so I cant see which lines in other sources but its always the same type code - I think something didn't get loaded.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Have you tried disabling all of the various Superfecta modules and then activating one module at a time to see if they all do the same thing?? It may be that one module is killing everything. You'd be better off with all of them except one rather than none.

Have you tried completely removing Superfecta in module admin and then reinstalling it using the latest version? This may or may not clean up whatever mess was made in the first instance.

Both are worth a try anyway.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Disabled, uninstalled, removed (Apply Config aftereach step of course)

Reinstalled Bulk Handler first (Most important right now)

Same errors as in other thread -- not continuing with Superfecta until extensions are in so...

The problem is the older FreePBX Bulk Extensions (which has been replace by the Bulk Handler) had a LOT more fields in it and they have had some renamed so that is an issue.

Looking at the core.class.php (2nd error) says undefined index Dial. In the file it is there but on old version it may be the ddial which is either blank or CHECKED or it could be the devinfo_dial (SIP/{Extension} so without knowing how core.class.php or the findmefollowme.class.php works I will do by hand and not use either the Bulk handler and since the reinstall didn't work for one - I wont reinstall superfecta either and just use OpenCName which leaves off other methods of checking numbers simply because the same errror appears on each source just different line numbers -- it is usually in the SAME function though.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Old system had FreePBX UserManager -> FOP2 Phonebook -> Asteridex -> SugarCRM* -> OpenCNAM -> Trunk Provided -> Telco Data (In this order)
The Sugar CRM is on another one of my servers and if I use the IP in Hostname it does work (Yes Loced down within MySQL on remote machine) [the fqdn does not]

The new system has all EXCEPT the FOP2 Phonebook now
If I set the Native FreePBX to yes I get an error of undefined offset???
If I set this to No and manually tell it the same $4!7 I get a different error as undefined index NATIVE_FreePBX something or other. -- So I am not going to use the FOP2Phonebook -- not that there is anything in it anyways -- this would be MORE helpful if it took from the mobile numbers and other number fields to do transfers, but that is no good to me either as when I transfer calls I use prefixes to force out the "tenant's assigned trunk. -- So I guess this is moot.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
You've been doing this a long time so I suspect the problems you are seeing are the result of sloppy cleanup/removal of old code when new code is installed. For many programmers, that's the hardest piece to get right and the one they'd prefer not to waste a lot of time on. Most folks prefer to focus on making the next shiny object rather than mucking around in old code to achieve compatibility with the new way of doing things. That's especially true where there is a profit motive to get the paid modules right before investing time in old open source code that doesn't provide a return on investment. The solution lies in more competition that encourages better outcomes. I know you've already tried a few, but that's where we are with legacy FreePBX code, I'm afraid. As I said before, I haven't seen the Superfecta issues you are experiencing, and I can only attribute that to the fact that I upgraded the Superfecta module before beginning rather than attempting to upgrade an outdated module.
 

wa4zlw

Member
Joined
Feb 14, 2008
Messages
845
Reaction score
22
FWIW I opened a ticket over six months ago on Superfecta and it still sits.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Yes, I know this is two months old, but Mr Mundy, can you attach the lates Superfecta and Bulk handler here as I went to Gitthub and found Superfecta 13. whatever and there is a 14 but can't find the tgz file -- haven't found the bulk handler yet.

I inavertantly erased my old (vultr) server without finishing of the new (Hiformance) one so I am making twins (installing fresh on Vultr [as slave] and Hiformance [as Master], if I can figure out how tho HA between the two as was with Wazo) and Yes I have an available 'witness' somewhere else (that is the source of my neorouter-server, just need to sign in the two PBXes to it yet.

Thank you.
 

0D@yByt3

New Member
Joined
Jul 24, 2018
Messages
2
Reaction score
0
I had the same error on IncrediblePBX 13 13 lean on CentOS6. I can confirm that updating the superfecta worked.

here is what I did, log in as root and

cd /root
./gpldownload superfecta
cd /var/www/html/admin/modules
mv /root/superfecta.tar.gz .
tar zxvf superfecta.tar.gz
rm -f superfecta.tar.gz

then login to webui and go to Admin/Module Admin
go to superfecta and upgrade
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
I had the same error on IncrediblePBX 13 13 lean on CentOS6. I can confirm that updating the superfecta worked.

here is what I did, log in as root and

cd /root
./gpldownload superfecta
cd /var/www/html/admin/modules
mv /root/superfecta.tar.gz .
tar zxvf superfecta.tar.gz
rm -f superfecta.tar.gz

then login to webui and go to Admin/Module Admin
go to superfecta and upgrade


FYI: Latest versions of Incredible PBX have a new gplinstall script. So all you have to do is /root/gplinstall superfecta
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Ward, I tried that -- I put in my OpenCnam (paid) Credentials and ran a Debug to test it (make sure it works) and the Debug said something like (I did this yesterday):
Code:
Executing OpenCNAM
Searching OpenCNAM ... 
Illegal characters found in URL 
Orignal Raw Returned Data: 

{this box was blank}

CNAM not found.
result  took 0.0024 seconds.

so let's see how deep this rabbit hole goes. Yes Y did the ./gplinstall superfecta to try to update it No Joy .
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Ward, I tried that -- I put in my OpenCnam (paid) Credentials and ran a Debug to test it (make sure it works) and the Debug said something like (I did this yesterday):
Code:
Executing OpenCNAM
Searching OpenCNAM ...
Illegal characters found in URL
Orignal Raw Returned Data:

{this box was blank}

CNAM not found.
result  took 0.0024 seconds.

so let's see how deep this rabbit hole goes. Yes Y did the ./gplinstall superfecta to try to update it No Joy .

I thought we determined that was because of some old Superfecta components on your server. Nobody else is seeing the problem.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
How can it be in old code, when I use YOUR nerdvittles tutorails from scratch, and YOUR suggestions for installing superfecta. I DO noNOT roll my own, so where to now?
 

Members online

No members online now.

Forum statistics

Threads
25,781
Messages
167,507
Members
19,201
Latest member
troutpocket
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top