FOP2 replacing FOP1 in Op Panel Tab in WebGUI

Discussion in 'General' started by Chilling_Silence, Sep 23, 2009.

  1. Chilling_Silence

    Joined:
    Sep 23, 2008
    Messages:
    488
    Likes Received:
    0
    Just a quick update on the excellent tutorial here:
    http://www.elastixconnection.com/index. ... &Itemid=89

    Just doing this, as it's nice to also have the Phonebook not give off errors when you click it, as well as you can now replace FOP1 with FOP2 in the Elastix Web GUI, so when you give limited-access staff a login, you don't need to give them a completely separate link to remember to get to FOP2 ;)

    Code:
    cd /var/www/html/fop2
    mysqladmin -u root -peLaStIx.2oo7 create fop2
    mysql -u root -peLaStIx.2oo7 < mysql.db
    mysql -u root -peLaStIx.2oo7 -e \
    "grant all privileges on fop2.* to fop2@'localhost' \
    identified by 'myPassw0rd'"
    
    Naturally though you'd replace 'myPassw0rd' with something unique of your choosing however for today we're just going to assume that's your password ;)

    Now, edit: /var/www/html/fop2/config.php
    Top few lines should now look like this:
    Code:
    <?
    // Database connection details 
    $DBHOST = 'localhost';
    $DBNAME = 'fop2';
    $DBUSER = 'fop2';
    $DBPASS = 'myPassw0rd';
    
    $language="en";
    
    // -----------------------------------------------------
    // Do not modify below this line
    // -----------------------------------------------------
    
    Now, the last part, tying this in to the Elastix GUI instead of the old FOP (Surprisingly easy).
    Code:
    cd /var/www/html
    mv panel panel.old
    ln -s fop2 panel
    
    Hope this helps


    Chill.
     
  2. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    Hi Chill.

    Thanks for this information. :)
    It's very interesting.
     
  3. nsumner

    Joined:
    Sep 16, 2009
    Messages:
    6
    Likes Received:
    0
    Hey thanks for the tips. I really appreciate replacing FOP1 with FOP2! I no longer need to give my users a seperate link which is a real bonus.
     
  4. Chilling_Silence

    Joined:
    Sep 23, 2008
    Messages:
    488
    Likes Received:
    0
    My thoughts exactly!

    Though I wish I could make FOP2 tie in to the User Account details provided from their WebGUI login. Still, it's not too difficult for them to remember that to login to FOP2 they must use their Voicemail password.

    As a side-note, Bob, if you ever read this: Even if a user does *not* have Voicemail setup, they can still login, it's just you must specify their SIP Secret instead. I refuse to give that to end-users, there is a reason why I make them a 15 random letters & numbers long ;)
     
  5. bugbeta

    Joined:
    Dec 29, 2008
    Messages:
    15
    Likes Received:
    0
    nice work!
    thanks
     
  6. asternic

    Joined:
    Jun 29, 2009
    Messages:
    18
    Likes Received:
    0
    Re: Re:FOP2 replacing FOP1 in Op Panel Tab in WebGUI

    Chiming in a little bit late. A better approach to replace fop with fop2 is to use an Alias in apache config rather than doing a symlink (because you might run into issues if you update the fop framework in freepbx).

    In fop2 FAQ I have added the steps involved in creating the alias:

    You can do it by means of modifying your apache configuration file. In Centos the file is located in /etc/httpd/conf/httpd.conf. In this file add the following line:

    alias /panel/ "/var/www/html/fop2/"

    You will then need to copy the index.html file to index_amp.php in order to make FreePBX happy:

    cp /var/www/html/fop2/index.html /var/www/html/fop2/index_amp.php

    After the changes, reload Apache. From then one, all requests to /panel will be redirected to your FOP2 install.
     
  7. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    paid my $40 to asternic.

    I am following the directions at www.elastixconnection.com/index.php?opt ... &Itemid=89

    When I do this: tar -zxvf fop2-op_panel-0.30.tar.gz

    I get this:
    tar: fop2-op_panel-0.30.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors

    Can anyone tell me how to get get the file into for fop2 directory?

    This is what is in my src

    rw-r--r-- 1 root root 24588 Jul 7 2008 ceros.rpm
    drwxr-xr-x 2 root root 4096 Dec 19 11:38 debug
    drwxr-xr-x 2 root root 4096 Dec 19 21:01 fop2
    drwxr-xr-x 4 root root 4096 Jan 26 2010 kernels
    -rw-r--r-- 1 root root 355782 Dec 19 20:52 op_panel-0.30.tar.gz
    -rw-r--r-- 1 root root 505774 Dec 7 09:30 rsli.rpm
    -rw-r--r-- 1 root root 19149 Sep 29 14:59 setup-rhino

    thanks.
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    you don't have

    fop2-op_panel-0.30.tar.gz

    in that directory only

    op_panel-0.30.tar.gz

    so

    tar -zxvf fop2-op_panel-0.30.tar.gz

    won't work, check your work (or better yet use Nicolas' asternic site for authority on how it all works) . . .
     
  9. dstamour

    Joined:
    Dec 10, 2010
    Messages:
    10
    Likes Received:
    0
    I noticed that there's a difference between the elastixconnection's tutorial and the installation procedure from FOP2. In the FOP2 procedure, there's a step where you append the file "extensions_override_freepbx.conf" from the tarball to "/etc/asterisk/extensions_override_freepbx.conf" and this step is not there in the elastixconnection's tutorial.

    Here's a quote from the FOP2 procedure : "This file is needed if you want to integrate FOP2 presence with FreePBX DND feature code"

    Is this step not necessary with Elastix?

    Thanks
     
  10. asternic

    Joined:
    Jun 29, 2009
    Messages:
    18
    Likes Received:
    0
    Yes, it is needed with any FreePBX based distribution, including Elastix. If you do not do it fop2 will still work, but you will not have integration between fop2 presence and DND status, and you will not be able to park calls from fop2. But everything else will work well. Best regards,
     
  11. dstamour

    Joined:
    Dec 10, 2010
    Messages:
    10
    Likes Received:
    0
    Thanks and doing so correctly toggle the "Presence Icon" of FOP2 when using *78 and *79. Is it possible to make the "Aastra XML Scripts" DND application do the same? According to the Aastra's documentation : "The application allows a user to activate and deactivate the server side DND on his phone". Unfortunately, using the DND application does not toggle the "Presence Icon" of FOP2.

    The same apply the Aastra's call forward application.

    Does anyone correctly integrated FOP2 and the "Aastra XML Scripts"?

    Thanks again
     
  12. asternic

    Joined:
    Jun 29, 2009
    Messages:
    18
    Likes Received:
    0
    I never had an aastra phone to make such integration or test, but it should be possible. What fop2 version are you using? There is an updated extensions_override_freepbx.sh scrip on version 2.20 that includes the device state events that might work on your phones. Not sure about it.
     
  13. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Will look at tutorial on ElastixConnection and update if necessary....

    Will do this weekend....

    Regards

    Bob
     
  14. dstamour

    Joined:
    Dec 10, 2010
    Messages:
    10
    Likes Received:
    0
    @asternic: For our customers, we're using 2.11 but I'm currently evaluating the Aastra phone and I've setup on my bench, Elastix 2.0.3 with FOP2 2.20 (beta) and the Aastra XML Scripts v 2.3.0.
     
  15. asternic

    Joined:
    Jun 29, 2009
    Messages:
    18
    Likes Received:
    0
    compare the extensions_override_freepbx.conf packaged with fop2 2.11 and 2.20, you will see updated macros including the device state lines that you probably need. Do you have them? Does it work at all? It should as it is the same macro that comes with freepbx but with some 3 more lines added for fop2 integration. If the macro works standalone (without the override file in place), it should also work when the override config is there..
     
  16. dstamour

    Joined:
    Dec 10, 2010
    Messages:
    10
    Likes Received:
    0
    I compare both extensions_override_freepbx.conf from 2.11 and 2.20 packages and on my test server I have the one that came with 2.20 appended to my /etc/extensions_override_freepbx.conf. It worked as expected if I use *78 and *79 for the DND feature but the Aastra XML Scripts DND application doesn't seem to bo some kind of a speed dial for *78 or *79 so the FOP2 doesn't update. Next week I'll dig the php script that gets called from the DND button of the phone.

    Thanks
     
  17. dstamour

    Joined:
    Dec 10, 2010
    Messages:
    10
    Likes Received:
    0
    From what I understand, the DND application from Aastra reads and writes the DND value from the Asterisk Database through the AGI so, I guess, nothing goes through the dialplan. This is probably why FOP2 doesn't get updated. I think I can modify the Aastra script to send some kind of a "DND toggle event" to FOP2. Do you have some documentation on how to send message to FOP2?

    I hope what I'm trying to explain makes sense, I'm still kind of new to the Asterisk world.

    Thanks for your help.
     
  18. asternic

    Joined:
    Jun 29, 2009
    Messages:
    18
    Likes Received:
    0
    If you can fire an userevent from the AGI script, you can add it to it:

    UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: Do not Disturb)

    and with an empty value to set it to available state.


    If you cannot fire userevents from within that .agi, you can create a special context where you set the astdb entry and fire the userevent, via dialplan, and in the agi you originate a call to Local/yourexten@yourdialplan

    Best regards,
     

Share This Page