1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Check out the 6 new Certified Incredible PBX Builds for Asterisk 11 and 13 featuring CentOS 6, Ubuntu 14, Raspberry Pi 2, and Asterisk-NOW.
    Dismiss Notice

SUGGESTIONS New FreePBX SmartRoutes Module

Discussion in 'Add-On Install Instructions' started by wardmundy, Feb 15, 2011.

  1. wardmundy

    wardmundy Nerd Uno

    What appears to be a very sophisticated Smartroutes module for FreePBX has just been released. It lets you use MySQL databases to route incoming calls and was developed specifically for call centers but should have broader application as well. You can read all about it in this ticket.

    The module is available in the PIAF Source Repo as well as from the FreePBX site.

    Context-sensitive help is built into the module, and additional documentation should be available in a couple weeks.

    Special thanks to Jay Reeder for the heads up.

  2. blanchae

    blanchae Guru

    Strange comment? I've never heard of any issues with MySQL before, I wonder if it is due to this module?
  3. I was pointed in this direction and thought I'd help shed some light on the MySQL issue. I know it sounds strange, but if you're doing high volume with many transactions through app_mysql on Asterisk, you will have issues with Asterisk restarting (and hanging up on active callers). Some people don't even know it happened and others aren't sure what's causing it. All of our experiences were long before the Smartroutes module was written.

    Note that Digium has been recommending for some time that people avoid app_mysql. Most recently:

    lmadsen (administrator) 2010-09-15 15:09:
    "Additionally, I would suggest you not use the MYSQL() dialplan application. Much more work has gone into res_odbc and func_odbc modules, and is the recommended method for MySQL interaction from the database. Not only is it more stable and better supported, your dialplan will become a lot simpler. In most cases 5-7 lines of dialplan for MYSQL() can be dropped into a single line since transaction support and all that jazz does not need to be done explicitly from the dialplan (it is handled by the module)."

    Re: Preferred method for mysql database interaction.
    by malcolmd ยป Mon Dec 13, 2010 8:42 am
    "The ODBC connector is the preferred method for connecting to DBs." "The ODBC connector is the one that's preferred because it's the easiest one for us to support - they're doing all of the abstraction to other DBs for us, so we don't have to worry about the intricacies."

    In this new book on Asterisk by developers from Digium, they mention that app_mysql has been deprecated for odbc:

    http://ofps.oreilly.com/titles/9780596517342/ch02.html#asterisk-CHP-5-SECT-1 (and search the page for app_mysql).

    BTW - We've just released the new version of smartroutes that does call tracking to allow "call traffic shaping" so that you can query on the number of active calls to a given DID and if over a certain amount you can route them to a "high call volume" announcement or to a lower priority queue.

    -- Jay
  4. lgaetz

    lgaetz Pundit

    I have an interest in this module for a project in the near future. Some points at random:
    1. The PIAF mirror referred to in post 1 is several versions out of date
    2. The current source can be browsed at the FreePBX site here, but I can't find a source for the current tarbel.
    3. Is there a home page for this project where contributors/testers can discuss?
  5. alesko

    alesko Guru

  6. drmurdoch

    drmurdoch Member

  7. lgaetz

    lgaetz Pundit

    Note in Alesko's post above that ver. 1.3 is available and linked there.

  8. drmurdoch

    drmurdoch Member


    smartroutes-1.1.tgz 20-Feb-2011 11:40 36K
    smartroutes-1.2.tgz 25-Feb-2011 08:20 41K
    smartroutes-1.3.tgz 05-Mar-2011 14:00 41K
  9. tallship

    tallship Member

    It appears that development on this module is proceeding at a rapid pace.

    I'm looking for something with this capability, but I'm wondering if it has stabilized yet considering the amount of point releases in such a short amount of time.

    I don't want dropped calls where it can be avoided, am anxious to implement the features of this module, although would like to know if it is still plagued with the problems cited above and in the tickets that are linked to above.



    Registered Linux User #190795

    - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.
  10. Tallship,

    Now that Freepbx 2.9 has stabilized and we've tested a bit against it, the smartroutes module should be pretty stable at this point. We put out a final release today that addresses issues regarding the new bootloader for 2.9 but otherwise we've seen stable operation with no reported issues over a couple months.

    We're also about to publish an ODBC install/management module for FreePBX that will handle odbc install, driver install (mysql, mssql, postgresql), dsn config (including asterisk res_odbc) all within FreePBX with nice user-friendly forms.

    -- Jay
  11. pbxtest

    pbxtest Member

    Sorry to resurrect an old thread ....

    I am running PIAF green. I downloaded and (tried) to install odbcadmin-0.9.9.tgz from here http://mirror.freepbx.org/modules/release/contributed_modules/ but it's throwing an error;

    The following error(s) occurred processing the uploaded file:

    * File extracting to invalid location: ./._odbcadmin

    Any compatible versions of the ODBC admin around? Or any other modules for configuring ODBC/TDS connections? (supports SQL Server)
  12. lgaetz

    lgaetz Pundit

    I can confirm that the module is uninstallable. If you examine the archive contents, you will notice that for every legitimate file or folder, there is another file with a similar name prefixed with a '._'

    I got it to install by:
    • manually extract the contents of the archive to a temporary location on PC
    • delete all the 193 byte '._' prefix files including the one in the root of the archive and in the subfolders
    • manually copy cleaned up files to '/var/www/html/admin/modules/odbcadmin'
    • chown odbcadmin and contents to asterisk:asterisk
    • chmod odbcadmin and contents to 0664 (or match the perms on your system)
    • In GUI browse to module admin, there should be a new entry to install now
    This module is 2.5 years old and just like the SmartRoutes module from the same folks, it was never updated to work properly with the GUI changes introduced in FreePBX 2.10. It may still be usable, I can't test beyond just loading the module and opening the page because I don't have a test system to mess with. Here is the help page as provided by the module authors. That dearth of info and the fact that an uninstallable module has been sitting in the repo for years will give you an indication of how much support is available to you if you run into problems.
    pbxtest likes this.
  13. pbxtest

    pbxtest Member

    Yeah, good point. Maybe I'll set up a test environ in a VM and try it there, so if I have problems ... no big loss.

    Do you know of any other modules for managing database connections, specifically sql server? I was trying to point the CDR database to an external sql server, but couldn't quite get it working. I saw you can change the settings in FreePBX > Settings > Advanced Settings, but there's no option for sql server, only: mysql and postgres.


Share This Page