1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.

Caller ID Superfecta: THE MODULE

Discussion in 'Add-On Install Instructions' started by tshif, Mar 13, 2009.

  1. andygee New Member

    Even with this latest version I get:

    "Using CallerID "<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN>
    <html><head>
    <title>401 Authorization Required</title>
    </head><body>
    <h1>Authorization Required</h1>
    <p>This server could not verify that you
    are authorized to access the document
    requested. Either you supplied the wrong
    credentials (e.g., bad password), or your
    browser doesn't understand how to supply
    the credentials required.</p>
    <hr>
    <address>Apache/2.2.3 (CentOS) Server at 127.0.0.1 Port 80</address>
    </body></html>" <6786868876>

    I have asteridex and sugar disabled, I have the others enabled.

    Andy
  2. kb9mwr Guru

    This is a great module thanks. I'm curious if there is a way to have it check the Asterisk Phonebook?
  3. tshif Guru

    Andy-
    Make sure you have added your maint ID/PW in the CallerID Lookup Sources for CallerID SUperfecta.
  4. tshif Guru

    kb9mwr [IMG]

    Hmm - I think FreePBX checks the phone book first. That would seem to be a logical flow - have you tried it out?
  5. kb9mwr Guru

    I know you have to set a caller id lookup source to "internal" for it check the Asterisk phonebook.

    Then you can have set an incoming route check it.
  6. andygee New Member

    I'm not sure how that went away but you are correct. Sorry about that. Thanks for the help.

    Andy
  7. tshif Guru

    Ok - I think we could improve that - your right.

    What does everyone think about adding another source called Asterisk Phone Book to the list? It would have Enable/Disable settings like all the others.

    One thing - We should determine what is the best order of
    search. In other words, in what order do we search the various sources? (Which results supercede?)
  8. BillG New Member

    Adding the internal phone book would be great. That should be checked first - there may be no need to go out to the web if you find a match. Plus, that lets us override what the web might have (for instance, a nice nickname for my ex rather than seeing my name show up from my old house!) I used to do it that way with my old Trixbox, then upgraded to this and put everything into Asteridex to get the same functionality.
  9. tshif Guru

    Looks like the asterisk phone book is kept in a database that is NOT mysql. If anyone in the group has experience programatically accessing this database - and are willing to help in this integration - please chime in and let us know.
  10. jeffmac Guru

    When I was building my override of the callerid lookup routine, I discovered the following:
    When you define a callerid source of "Internal", FreePBX generates 2 following lines in the [cidlookup] context:
    LookupCIDName()
    Return()

    As I recall from reading "Asterisk: The Future of Telephony", the LookupCIDName is an Asterisk function that uses the Asterisk DB. The description of the function is in the book. There are no parameters, so I would assume it simply uses the callerid number supplied on the "current" call to lookup in the Asterisk DB and populate callerid name.

    Populating the Asterisk DB is beyond the scope of my knowledge.....

    Jeff
  11. tshif Guru

    Jeff-
    This is fascinating -
    With two sources defined, Superfecta and Internal, the context looks like this:

    Code:
    [cidlookup]
    include => cidlookup-custom
    exten => cidlookup_5,1,Set(CALLERID(name)=${CURL(http://maint:password@127.0.0.1:80/admin/modules/superfecta/callerid.php?thenumber=${CALLERID(num)})})
    exten => cidlookup_5,n,Return()
    
    exten => cidlookup_4,1,LookupCIDName
    exten => cidlookup_4,n,Return()
    
    exten => cidlookup_return,1,LookupCIDName
    exten => cidlookup_return,n,Return()
    
    
    It looks like the context is built with every source defined. If I understand the dial plan, it seems like all sources use a common exit point called 'return'. Return does LookupCIDName. If LookupCID works as you recall - then every single lookup source will always have its NAME reference overridden by the Asterisk phone book. It means that Any answers that Superfecta delivers could be overriden by whatever may already be in the Phonebook.

    Thats significant - and may explain some of the results folks have been puzzled over.

    If any CID souorce has the CACHE selected, that saves every result, even generic ones, to the phonebook. Those generic answers will then override more specific answer which might be delivered. Not so nice.

    If I understand this correctly - It looks like what kb9mwr asked for is already being done by FreePBX no matter what! :whistlingb:
  12. ronw Guru

    You can only select one source on each inbound route. Each source entry in [cidlookup] has it's own return.
    exten => cidlookup_5,n,Return()
    or
    exten => cidlookup_4,n,Return()
    depending on which source has been selected on the inbound route.

    Only one source is used. They are not combined by FreePBX.
  13. tshif Guru

    Right - I get that, but what are the bottom two lines used for?
  14. tshif Guru

    CallerID Superfecta: THE MODULE v1.1.1: The Superfecta module has been updated

    Note: This article's download links are obsolete, but left here for archival purposes. Get the current code from the link in the very first post of this thread.


    CallerID Superfecta: THE MODULE v1.1.1

    The CallerID Superfecta module has been updated.

    This is a maintenance release. Upgrading is recommended, but not required. Please get the upgrade here.

    Changes:
    1. Added "More Information" Link in FreePBX Module Manager.

    2. Corrected un un install bug that had been lurking.
    The uninstall process would hang non fatally, but require a browser refresh to clear. This has been fixed.

    The module version has been tested and is known to work with Asterisk versions 1.4 and 1.6.

    As always - please provide feedback as to your success or failure with this new version of the module.

    -tshif
  15. rossiv Guru

    When I choose my sources in the module, it does not change the config file. I have version 1.1.1 installed. A Fresh 1.4 install, after Orgasmatron Installer.
  16. tshif Guru

    What config file?
  17. rossiv Guru

    callerid.php in /var/www/html/admin/modules/superfecta
  18. tshif Guru

    I think I must be misunderstanding you. The module does not write back to callerid.php once installed. Im pretty sure you know that. So I must not be understanding you.

    Heres some of your previous posts about this topic. Did you by chance have a chance to go back and re read any of them? (This was sorta of a random sampling, there are more)

    Please - try and explain differently - I will domy best to help.
  19. rossiv Guru

    Ok, let me try again. When I choose what lookup sources (Asteridex, Google, etc.) I want to use in the Superfecta module interface, should it not set those respective values for those sources in callerid.php to 1 instead of 0?
    [IMG]

    Code:
    
    // Setting the variables below to 1 activates each of the respective searches.
    // The phonebook searches are executed in the order shown.
    // When a match is bound during a search, the callerid script ends with that result.
    // E.g. if there is a match in AsteriDex, then the Google and AnyWho searches aren't executed.
    //$AsteriDex = '1' ;
    //$WhoCalled = '0' ;
    //$Google = '1' ;
    //$AnyWho = '1' ;
    //$WhitePagesCAD = '0';
    //$Telcodata = '1' ;
    //
    //$WhoCalled_name      = 'xxx' ;      // Whocalled Username
    //$WhoCalled_pass      = 'xxx' ;     // Whocalled Password
    //$WhoCalled_threshold = '5' ;            // Whocalled threshold
    //$WhoCalled_CNAM      = 'SPAM-CALLER';   // CNAM to return if pass threshold
    
    
    Ok, now I see that those lines are commented out.
    And I also see the new code below. Why not say OLD CODE or something in there?
    So now I guess my quesiton is "Why when I have asteridex enabled/selected/choosen in the module, does it not use that as caller ID?" It is using Google's city and phone type result.
    I get "Pawleys Island, SC Land Line" instead of "Ross Lindsay".
    I have all default passwords for MySQL and the Asterisk manager.
  20. tshif Guru

    Look into your Asterisk Phone book. If there are matching entries, remove them. See if that helps. FreePBX it seems always gives priority to the Asterisk Phone Book.
    The ID and passwords for the db no longer have to be defaults - that is stated very clearly in the thread - so its not a part of your issue.

Share This Page