FOP2 address book and Caller ID Superfecta

  1. 10 years ago

    I am trying to pull the FOP2 address book into Caller ID Superfecta, but the FOP2 Address book module appears to be broken in 2 places.

    It never retrieves the contact in the database. I found that the $run_param['CNAM_Type'] is not set.
    Setting this to 2 at line 37 fixes the problem and it returns a result.

    The other thing is that unless FOP2 is the last in the results, it does something to code or database or something. The next module to run errors out with

    Looking for Trunk Provided Caller ID ...
    Fatal error: Cannot use object of type DB_Error as array in /var/www/html/admin/modules/superfecta/sources/source-Trunk_Provided.module on line 24

    Or If I use OpenCnam
    Searching OpenCNAM ...
    Fatal error: Cannot use object of type DB_Error as array in /var/www/html/admin/modules/superfecta/sources/source-OpenCNAM.module on line 28

    The above DB_Error does not appear if I set FOP2 below the other modules or disable it.
    FOP2Admin is 1.2.14
    FreePBX is 2.11.0.8
    Running PIAF

    I have two systems with the same setup that have this issue.

  2. admin

    11 Dec 2013 Administrator

    Hi,

    We did not write the caller id superfecta module/integration, so not sure what the problem is. It seems that there is a mysql query that is not correct and the warning/error affects other modules/plugins down below? However, I have no idea at all.

    where did you get callerid superfecta?

  3. admin

    11 Dec 2013 Administrator

    I found superfecta on google code, seems a kind of old version. I have enabled fop2 lookup and google, then I do a test in the bottom of the plugin page and works fine. How did you test? Are you sure you entered the correct mysql data in the configuration page? the visual_phonebook table since fop 2.21 is created in the "asterisk" database directly. Perhaps you misconfigured the mysql credentials/data for the source?

  4. Superfecta was installed with PIAF by default. I didn't install it by hand. I figured the FOP2 module was installed by fop2admin.

    I did some debugging, and the sql query is done correct and returns results, so my database information is correct. But because $run_param['CNAM_Type'] is not set, the results are not formatted and it does not output anything. But that is an easy fix.

    As for the DB_Error, enable the FOP2 option and set it at the very top. Then enable Trunk Provider and set it below FOP2. Save, then run a debug test. It will fail with that DB_Error. I don't see anything wrong with the code, but it's like something related to the database is not reset right.

    I need caller ID information pulled from the FOP2 address book, and if that fails, from the trunk information. Since Superfecta failing me, can you suggest another option?

    Thanks for the help.

  5. Also, here is the current version.
    https://github.com/POSSA/Caller-ID-Superfecta/wiki

  6. admin

    13 Dec 2013 Administrator

    That was the version I had installed, anyways, not sure how you are testing, but I did the debug test on the cid superfecta page and it works just fine. Not sure if it will work if I enabled that as a cid lookup. But I think you have some misconfiguration somewhere. In any case, to say that what you experience is a bug, it must be reproducible, let me know HOW can I reproduce it. If it is reproducible then you can report it as a bug to the developers of that module (we are not the ones). Here is a result from a debug test I made:

    Debugging Enabled, will not stop after first result.
    Processing Default Scheme.
    Searching FOP2 ... 'Nicolas Celular'
    result  took 0.0016 seconds.
    
    Searching Google ... Skipping Source - Not a valid US/CAN number: XXXXXXXXXX
    result  took 0.0008 seconds.
    
    Looking for Trunk Provided Caller ID ... not found
    result  took 0.0010 seconds.
    
    Post CID retrieval processing.
    
    Returned Result would be: Nicolas Celular
    result  took 0.0322 seconds.

    What did you configure as the database name in the fop2 lookup source page? And what cnam type did you choose there?

  7. If you downloaded Superecta 2.2.6.1 from git, then it works fine.
    It's the 2.11 branch that comes with FreePBX directly that fails.

    I have posted in the PIAF form here.
    http://pbxinaflash.com/community/index. ... ecta.12531

  8. The module has been fixed. Download in this post.
    http://pbxinaflash.com/community/index. ... cta.12531/

or Sign Up to reply!