Fixes for 0.9 to get phonebook worki

Discussion in 'General' started by jpaglier, Nov 29, 2007.

  1. jpaglier

    Joined:
    Nov 26, 2007
    Messages:
    3
    Likes Received:
    0
    I had a lot of issues when I upgraded from 0.8.5 to 0.9.0. My yeastar board stopped working and my system was in a real mess. I decided to install 0.9 again this morning and I now have it running again with the yeastar board.

    After following two posts in this board about blacklisting the "netjetpci" module and then fixing the issue around zapata.conf I was able to get my system running and calls coming in and going out. The only issue I had was the Phone book still did not work.

    I have finaly figured out the issue with the phone book.

    You need to modify /var/lib/asterisk/agi-bin/pbdirectory and find the line that contains the test for 'cidname' and change it. The cidname is embedded in the string and not at the beginning for some reason so the test never succeeds and the entries are never added to the directory.

    original:
    if (substr($k, 1, 7) == 'cidname')
    $numbers[substr($k, 9)] = $v ;

    new:
    if (strstr($k, 'cidname'))
    {
    $numbers[substr($k, 9,4)] = $v ;
    }
    I have 4 digit extensions so this works for me,
    but will fail for anyother size extenstion.

    After that youo need to change the options in the file to what you want, because they never get passes in to the script.

    original:

    $operator = false;
    $dir_type = DIR_FIRST;
    $say_exten = false;

    new:

    $operator = true; // allow user to dial operator
    $dir_type = DIR_ALL; // use first and last name
    $say_exten = true; // say the extension number

    These are what I chose you can pick your options.

    I now have a working phone sytem with and IVR and dial by name directory. I am going to make a backup and keep it handy and probably never upgrade again.

    John
     
  2. jpaglier

    Joined:
    Nov 26, 2007
    Messages:
    3
    Likes Received:
    0
    One more follow up.

    You need to also copy the modified pbdirectory file to /var/www/html/admin/modules/pbdirectory/agi-bin because this file gets copied into the lib directory when you update the settings from freePBX or the elastix Web UI.

    John
     
  3. jpaglier

    Joined:
    Nov 26, 2007
    Messages:
    3
    Likes Received:
    0
    One more fix for the phonebook.

    in functions.inc.php in /var/www/html/admin/modules/pbdirectory you need to change the line

    $ext->add('app-pbdirectory', 'hangup', '', new ext_hangup());

    to

    $ext->add('app-pbdirectory', 'o', '', new ext_goto('from-internal,${OPERATOR_XTN},1'));
    $ext->add('app-pbdirectory', 'hangup', '', new ext_hangup());

    This will add the "Operator" extension into the app-pbdirectory context so that if you press 0 from the directory, you can dial the operator extension.

    This functionallity is in the pbdirectory script but does not work without this.

    jpaglier
     

Share This Page