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.

NEW CallerID Superfecta 2.2.4: THE MODULE

Discussion in 'Add-On Install Instructions' started by tshif, May 11, 2009.

  1. kelinger New Member

    So, step by step, here's what happens (and which way to get it to work):

    If I just go in and created an inbound route for 555-666-1212, I get an error saying that "A directdid for this DID is already associated with extension: 1212 (Ken Linger)." I then cancel the creation of the inbound route and go into my extensions, select 1212, and can see that for the Direct DID field, 555-666-1212 is listed (this is how that extension gets calls without going through an inbound route definition).

    So, if I blank out the Direct DID field on extensions, save my extension, go back to inbound routes, I can create an inbound route for 555-666-1212 and point it to my extension (and of course, select Superfecta as my CID source because that's what this entire string is about!).

    Assuming that this works, then I should go ahead and do the same for the other 99 extensions? If it works, great. (Pain to redo 100 extensions but fairly simply moving forward)
  2. wardmundy Nerd Uno

    You might want to post this as a feature request on the FreePBX site with a link back to your post. Certainly looks like an oversight in the original design. :cool:
  3. kelinger New Member

    Perhaps... or maybe the issue is with the CID Lookup module (not the Superfecta addon) because that module isn't being called on DirectDIDs.
  4. tshif Guru

    Yes, and yes, but -- when you fill in the DID field in the extension definition, it actually creates the inbound route for you. All you should have to do is find that inbound route on the list, and select Superfecta as the caller ID source.

    In older versions of FreePBX this wasn't the case. Putting in a DID in the extension definition screen didn't make a visible route - and thus no caller ID could be assigned. If your version of FreePBX is 2.4.x vs. 2.5.x, then your assertion is correct. You would have to remove the DID from the extension definition, and add it in the inbound routes. But seriously, if your running a current freePBX that should not be necessary.
  5. kelinger New Member

    Bingo! Its working. I'm running 2.6.2.2 but our staff is pretty stable--haven't added or removed an extension since 2.4.x and I'm assuming that upgrading to the 2.6+ version didn't just automatically go through and create new inbound routes (it didn't) so I'm adding them manually now. The few I've done, though, work as expected.

    Thanks for all the help... this was a frustrating one for me. Great work on a great program!
  6. tshif Guru

    Ok glad to hear it! Shall I assume your running a Trixbox? The highest version of standard FreePBX that I know of is 2.5.x - So im very interested to know - that could explain a lot. With the Tribox fork of FreePBX, what we think of as default behaviour could easily be different.
  7. kelinger New Member

    Yes, I'm on Trixbox. The status screen says "v2.6.2.2 ©2008 Fonality, inc All Rights Reserved."
  8. tshif Guru

    You really should pitch-a-bitch over at Trixbox.- FreePBX has handled this situation by automatically producing the inbound routes for you for some time now. TrixBox should bring themselves up to date - this would have been much easier for you - and us - to figure out! :crazy:

    Either way -it's very cool that its working for you. Glad to know our efforts to make the module compatible with TrixBox has paid off.

    -tshif
  9. tshif Guru

    Hang on tight - the Feature Release is on its way!

    Ok - you guys already know I have a hard time keeping my mouth shut when exciting things are about to happen... And boy are they!

    The next release of Caller ID Superfecta is undergoing final test and polishing - and with luck we'll be putting a bow on it in the next couple of days.

    Without letting to many secrets out - I can say there's something in it for everyone. Better support for Canadian Data lookups, Better debug, Better cache options, better better better!

    And - we didnt forget the could-be code contributors - some very exciting new capabilites for adding new data sources are in store!

    Ok - I have to shut up now - but seriously - Stay tuned for some really massively cool features in our Caller ID Superfecta!

    until next time -
    Tony
  10. jroper Guru

    There are three main kinds of communication:-

    Telephone
    Telegraph

    and Tel-tony

    Joe
  11. tshif Guru

    Caller ID Superfecta: THE MODULE Feature Release 2.1.0

    Caller ID Superfecta: THE MODULE Feature Release 2.1.0 Is now available.

    This Feature Release contains significant upgrades and internal changes.

    It is strongly recommended that you install this release on all platforms.

    Only limited support will be available for previous versions 2.0.1 and prior.

    Here is a brief listing of the changes. A more complete description of this release follows this announcement.

    1. Added Local Caching to MySQL
    2. Retain Valid Caller ID if Provided by Trunk
    3. "Automatic" Support for data sources that require authentication
    4. Post CID retrieval processing for source scripts
    5. Alter whocalled behavior to return textual caller ID info
    6. Make provisions to handle sources that provide both CID and SPAM rankings
    7. Deliver enhanced error reporting from source-[name] scripts to debug interface
    8. Alter whocalled behavior to return textual caller ID info
    9. Provided "Report Back" capability so we can help populate Data sources (that allow it) with CID.
    A complete write up of the new release follows this announcement.

    As always, please let us know how this new release works for you.

    -Tony
  12. tshif Guru

    Caller ID Superfecta: THE MODULE Feature Release 2.1.0

    Caller ID Superfecta: THE MODULE Feature Release 2.1.0 (Part 1)

    A scant 9 days after the release of Caller ID Superfecta 2.01, the project team has just released Caller ID Superfecta: THE MODULE, version 2.1.0 Feature Release! (Download it here)

    Features – We got Features!
    Version 2.1.0 is primarily a "New Feature Release", and some of these features are beyond pretty darn cool.

    For the end user, this release brings enhanced debug information, and more data sources than ever before.

    We also added special features to make it easier to figure out how and when to use the Username and Password fields in the General Options section.

    Rounding out the user interface upgrades, we have centralized the placement of configuration options for sources that require authentication or other special information to operate.

    Entering The Data Source Specific Configuration Information
    Data sources that have additional parameters that should be configured have a “==>” to the right of their name.

    To configure the login, password, token, or other service specific configuration items required for any data source, click on the Name of the data provider, or the “==>” to the right of the data provider name. This will open up the data source configuration option window for that particular data source.

    Provide the requested information, if any, and press the "Apply" button. All done!


    [IMG]

    Easy Integration of New Sources
    For the developer, the new release of the Caller ID Superfecta sports a fairly sophisticated mini API (Application Programmers Interface), that allows Superfecta data-source scripts to support some pretty exciting capabilities. With the new architecture, data-source scripts can provide very detailed debug information for each source, and easily support sources that have specialized data needs, such as authentication.

    Report Back to Data Sources
    The new Superfecta even allows us to return Caller ID information (A feature called “Report Back”) to sites that allow for it (More about that later).

    Data Source Upgrades
    Let's start out by talking about the new data sources that have been added for this release -- in fact there are FOUR of them, plus a whole new lease on life for an old favorite.

    User contributed data source for Canada with new “Canpages.ca” Data Source
    Forum participant mageminds contributed a data source script for Canadian data site canpages.ca. It passed standards and practices, and has been included with this feature release of the caller ID Superfecta. This source will return both businesses, and personal information for telephone numbers based in Canada. Way to go mageminds! You're the first user generated code contributor to the new caller ID Superfecta!

    User contributed data source “VoIPCNAM.com” Data Source
    Stepping right up with another first, forum member mruge created the first user-supplied data-source script for a “for-pay” data-source; VoIPCNAM.com. This script is the first one designed to take advantage of the new Superfecta capabilities of dynamically supporting new data sources that have authentication requirements. Thanks Michael!

    Caller ID Data Caching to MySQL with new "Superfecta Cache" Data Source
    A new local data source called the "Superfecta Cache" has been added to the module.

    The Superfecta Cache data source is a high speed local data source that is well suited to being one of the first (if not THE first) selection on your providers list. If you are using the Asterisk Phone book to store company wide speed dial information, it is recommended that you place the Asterisk Phone book above the Superfecta Cache.

    When the Superfecta Cache is enabled, results returned by Superfecta are cached locally for a user defined number of days, after which they are deleted. The user decides for themselves the best length of time for the system to retain data in the cache before it is purged. This choice should be based on whatever criteria make sense for the prevailing circumstances, rather than worrying about how large the cache might get. (MySQL can handle LARGE amount of data if need be.) During the cache period, the data is available for fast local look up.

    Read more about the Superfecta Cache Data Source here: http://projects.colsolgrp.net/documents/show/11

    Retain valid caller ID if provided by TSP with “Trunk Provided” Data Source
    Some TSP's provide no caller ID information, while some TSP's do provide limited to complete caller ID information. In these and certain other cases, it is nice to be able to use the valid caller ID information provided by the TSP.

    When enabled, the "Trunk Provided" data source watches the caller ID data being provided by the inbound trunks. It compares this data to a user configurable list of known invalid caller IDs. (By default the words “unknown", "wireless", "toll free", and "unlisted” are already recognized as invalid.) When the Trunk service provider delivers either no caller ID data at all, or caller ID data that matches data in the “Invalid” list, the "Trunk Provided" data source is considered to have failed, and the caller ID Superfecta will move on to the next source. When the caller ID data provided by the trunk source does not match data in the "Invalid" list, caller ID Superfecta accepts that as a positive hit, and stops processing further data sources. (One thing to remember about this source – it will ALLWAYS seem to fail in the debug mode. The reason? We can’t really poll the trunk provider for the number we put into debug the same way we can the other sources, so remember it will always show a NOT FOUND during debug.)

    User driven upgrade for “whocalled.us” Data Source
    As we looked hard at each data-source during this round of development, we found some interesting things. One thing we found is that a long time SPAM rating source, whocalled.us – really should not be used for SPAM rating at all.

    Our investigation found that the number we’ve been using as a SPAM value was really just the number of times a telephone number had been submitted to the whocalled.us site. It had nothing to do with SPAM! We were just about ready to begin sunsetting the whocalled.us source, when PBXIAF forum member Marv intervened at the development support site. With some good reasoning and facts he made a compelling case, and we like to listen to those!

    Thanks to this dogged support from Marv, the whocalled.us data source has been upgraded to retrieve and use the textual caller ID information that’s available, and no longer erroneously uses the “times-reported” value as a SPAM threshold.

    There is a caveat to using the new caller ID part of this data provider. All of the caller ID data that this data provider has available is contributed by individuals like you and I. Because of that, the data returned may not be as consistent as the data from other potential providers. In the event that the same telephone number has been listed with more than one different textual form of caller ID, the Caller ID Superfecta 2.1.x version of the whocalled.us data source will return the most frequently provided response.

    But – as they say on TV – “But Wait, there’s more!”

    See Caller ID Superfecta: THE MODULE Feature Release 2.1.0 (Part 2)
  13. tshif Guru

    Caller ID Superfecta: THE MODULE Feature Release 2.1.0 (Part 2)

    Caller ID Superfecta: THE MODULE Feature Release 2.1.0 (Part 2)

    Theres even more new stuff under the hood -
    Report Back
    Because the whocalled.us data source is made up of user contributed data, it seems only fair that we help populate the information pool. Toward that end, this Superfecta data source comes ready to do exactly that. If you enable the check mark box called "Return to Who Called", the caller ID Superfecta will be a good citizen and return any caller ID information it may collect from any source, and populate the who called.US site with it.

    This ability to report back to a source (In programmer talk, this function is called “Post CID retrieval processing for source scripts”), can be used in creating additional data-source scripts. It’s a capability now built into the Caller ID Superfecta Engine, as part of the mini API.

    Enhanced Debug Information
    Enhanced debug support for data source errors
    Because data sources can fail for many reasons, we've increased the amount of debug information that's made available to the user in the debug window.

    In the past, if a data source could not be reached, or, if that data source experienced an internal error (at the provider's site), the debug information would reflect "not found". Now, any error conditions returned by the data source website will be returned and displayed in the debug box.

    These errors will be expressed in terms of HTTP errors, such as an error 500. (Error 500, in general, means internal error.) Now, instead of just getting a “not found”, we will have authoritative error messages telling us whether or not the data source itself is not functioning.

    "Automatic" Support for Services Which Require Authentication/Token
    One of the biggest remaining hurdles for adding new data sources to the caller ID Superfecta has been the way we previously handled data sources that require user ID’s, passwords or API tokens. In versions prior to this release, adding a source with such requirements demanded a development effort in the module user interface, and the database, to include the necessary authentication information. In version 2.1.0, this limitation has been overcome.

    Effective with this release, adding new data sources, even those which require some form of authentication, no longer requires a separate development effort to modify the user interface, or the database structure. With this new architecture, and a little programming time, it should be possible to add virtually any online data source without requiring further development support in the main body of the caller ID Superfecta module. (If you're a developer who's dying to add his or her favorite source, check out the source creation documentation here, and then share your creation with the rest of us. )

    A Veritable Plethora of Data Sources
    Back when the caller ID Superfecta was still known as the Trifecta, there were a total of three data sources available. Today, effective with version 2.1.0 of the caller ID Superfecta, we have no less than 15 potential data sources included with the module!

    What's Next?
    Most of these enhancements came about by folks making good suggestions. I sure hope everyone continues to make suggestions, and toss around ideas. If we do, then the future looks amazingly bright! With the current architecture underlying the caller ID Superfecta, it is now easier than ever for anyone with an interest - to create a data source script for their favorite data provider. Merely copying that script to the correct location in the Superfecta module will activate the data source, and automatically adjust the caller ID Superfecta Web user interface to reflect the new data source; And that includes the ability to configure any required special extended configuration data, such as authentication ID password or API tokens.

    Ok. How much do we owe?
    As has always been the case with Superfecta, all the developers who participated, from klingon888, and marv, to mruge and mageminds – as well as everyone else involved, accomplished all this as volunteers!

    Staying up late, or pitching in before their regular workday begins – these generous souls have given us the easiest to install and use, most flexible and sophisticated leading edge Caller ID tool available to any FreePBX based platform anywhere. And we here in the PBXIAF forums got it FIRST.

    Again, please join me in providing your full throated congratulations to the caller ID Superfecta version 2.1.0 team, with special thanks to our lead developer, Jeremy Jacobs, on an awesome feature release. Jeremy’s insight, hard work, and outstanding design instincts have literally brought the caller ID Superfecta to the leading edge of what is possible in delivering caller ID data to the Asterisk/Free PBX-based PBXs.

    Until next time –
    tshif
  14. wardmundy Nerd Uno

    This is a terrific enhancement. Great work!!!


    :party::party::party:

    For ease of reference, here are Tony's original install instructions:

  15. stucker Member

    A standing "O" indeed in order for all of you!!!
    Sofar all is working very well.
  16. Tenshi New Member

    Here is my modest contribution to the project... Canada411 lookups (or a try at it!)

    Now the caveat is that I'm not very familiar with curlopt or PHP, so my question to the group is whether there is a way to speed things up here... although this scripts works, it usually takes me up to 13 seconds to grab the answer! :( So if you are in Canada, and willing to try this, raise your timeout in the menu to 15 seconds and do the following steps:

    First, need another line added to the function get_url_contents in callerid.php (under the bin directory)

    PHP:

    curl_setopt
    ($crl,CURLOPT_FOLLOWLOCATION,true);
    The Canada411 works through a HTTP Error 301 redirect... The way Superfecta grabs info is through CURL. My guess is that a lot of time is wasted between the first grab (and the processing of the 301 error), and then the redirect.

    Then you can create a new module with the others, which I named source-Canada411.php

    PHP:

    <?php
    // Pretty ALPHA Module for Canada411

    if($usage_mode == 'get caller id')
    {
        if(
    $debug)
        {
            print 
    "Searching Canada411 ... ";
        }
        
        
    $url="http://www.canada411.ca/search/?src=c411&stype=re&pac=$npa&pex=$nxx&pnum=$station";
        
    $value get_url_contents($url);
        
        
    $start strpos($value"<h1>");
        
    $value substr($value,$start);
        
    $end strpos($value"</h1>");
        
    $value substr($value,0,$end);
        if (
    strlen($value) > 1)
        {
           
    // For some reasons, Canada411 inverses the values on their page
           
    list($last_name$first_name) = split(" "$value);
           
    $caller_id trim(strip_tags("$first_name $last_name"));
        }
        else if(
    $debug)
        {
            print 
    "not found<br>\n";
        }
    }
    ?>
    So anyone with actual knowledge may do his/her magic and build on that! :lol: The first step would probably to either optimize the parameters for curl so not a lot of time is wasted on the redirect, or have a separate get_url function for Canada411 (or other sources which may require it) entirely...

    I'll leave the debate to the floor...
  17. wardmundy Nerd Uno

  18. tshif Guru

    UPDATE: Ok - I was wrong! (phew!) There is no bug.
    -----
    A bug has been located in the voipcnam.com data source.
    This bug will not interfere with the operation of Superfecta, but it does render the Voipcnam data source unusable until corrected. See the Bug Report here.
  19. wardmundy Nerd Uno

    You gotta love 'em...

    [IMG]
  20. Lost Trunk Guru

    Great job - everything I could have wanted… except…

    Except that it's not working right. When the CallerID Superfecta is called, the CLI displays this:

    Code:
        -- Executing [cidlookup_5@cidlookup:1] Set("SIP/1-pstn-b7d1ac68", "CALLERID(name)=<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>302 Found</title>
    </head><body>
    <h1>Found</h1>
    <p>The document has moved <a href="https://localhost/admin/modules/superfecta/bin/callerid.php?thenumber=8005551212">here</a>.</p>
    <hr>
    <address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>
    </body></html>") in new stack
    And therefore the Caller ID name sent is this:

    Code:
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    Obviously not exactly the effect we were hoping for. Didn't this issue pop up once before?

Share This Page