FOP2 completely empty

Get help on installation and configuration.

FOP2 completely empty

Postby wickedsun » Sun Apr 25, 2010 6:33 pm

Hi,

I was trying to install FOP2, and everything went fine, from the logs, everything should be working as intended. However, when I log into FOP2, I do not see anything. No extensions, no trunks. I see the filter bar, but no other button (except the phonebook).

I am using FreePBX 2.7, all the tables (fop2) are there in the database, all the auto-scripts seem to work (the tables are populated), but no matter what I do, nothing is showing up. I have spent a great deal of time trying to figure it out, but I am at a loss now. I have installed the FreePBX module as well and configured some users, but no matter what I do, nothing shows up.

I have created users that match users of my Asterisk installation, with the same password as the voicemail password I set up on Asterisk.

I would really appreciate any help. I have tried pretty much everything I could think of before posting this.

Thanks!
wickedsun
 
Posts: 6
Joined: Sun Apr 25, 2010 6:28 pm

Re: FOP2 completely empty

Postby admin » Wed Apr 28, 2010 10:12 am

Please run the following script in the linux command line:

/usr/local/fop2/autoconfig-buttons-freepbx.sh

And look at the output, it should look like valid fop2 button configuration data. If that script fails and it does not produce output, then that is the problem you have and that needs fixing.
Nicolás
admin
Site Admin
 
Posts: 812
Joined: Tue Jun 23, 2009 11:26 am

Re: FOP2 completely empty

Postby wickedsun » Thu Jul 29, 2010 4:35 pm

Hey there,

I have found a "problem" with the script (and this is a fresh install of the OS). Since my first post, I have reinstalled the entire OS and I am still getting the same problem.

Apparently, some rows contain a * in the SQL request, causing the while loop to fail:

Code: Select all
mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e \
    "SELECT if(type='extension',CONCAT('USER/',exten),device) AS channel,type,if(type<>'trunk',exten,' ') AS extension,\
    label,mailbox,context,'$QUEUECONTEXT' as queuecontext,concat('*',mailbox) AS extenvoicemail, \
    privacy,\`group\`,IF(type='trunk',IF(email<>'',concat('splitme-',email),''),email) as email, \
    queuechannel,originatechannel FROM fop2buttons WHERE device<>'' ORDER BY type,exten" | \
    sed '/\*\*/d' | sed 's/: /=/g' | sed '/.*=$/d' | while read LINEA

If the line is a *, then it will parse the files in the directoy, like so:

Code: Select all
SIP/100
extension
100
Main Line

from-internal
from-queue
autobuttons.cfg autobuttons.cfg.~1~ autobuttons.cfg.~2~ autobuttons.cfg.~3~ autoconfig-buttons-freepbx.sh autoconfig-buttons-freepbx.sh.~1~ autoconfig-buttons-freepbx.sh.~2~ autoconfig-buttons-freepbx.sh.~3~ autoconfig-users-freepbx.sh autoconfig-users-freepbx.sh.~1~ autoconfig-users-freepbx.sh.~2~ autoconfig-users-freepbx.sh.~3~ buttons.cfg.sample buttons.cfg.sample.~1~ buttons.cfg.sample.~2~ buttons.cfg.sample.~3~ extensions_override_freepbx.conf extensions_override_freepbx.conf~ FOP2Callbacks.pm FOP2Callbacks.pm.sample FOP2Callbacks.pm.sample.~1~ FOP2Callbacks.pm.sample.~2~ fop2.cfg fop2.cfg.new fop2_server op_lang_de.cfg op_lang_de.cfg~ op_lang_en.cfg op_lang_en.cfg~ op_lang_es.cfg op_lang_es.cfg~ op_lang_fr_FR.cfg op_lang_fr_FR.cfg~ op_lang_it.cfg op_lang_it.cfg~ op_lang_pt_BR.cfg op_lang_pt_BR.cfg~ op_lang_zh.cfg op_lang_zh.cfg~
none


Now, I added a sed 's/\*/ /' before the while, but the buttons are still not showing up in the interface. I don't know exactly what it's supposed to look like (the final output) so it's hard to figure out what's wrong with the output I get. Could you enlighten me?

This is the actual output from the SQL request, without the sed:
Code: Select all
SIP/100
extension
100
Main Line

from-internal
from-queue
*
none
wickedsun
 
Posts: 6
Joined: Sun Apr 25, 2010 6:28 pm

Re: FOP2 completely empty

Postby admin » Fri Jul 30, 2010 6:03 am

Try to change the mysql parameters to -NB instead of -ENB

Best regards,
Nicolás
admin
Site Admin
 
Posts: 812
Joined: Tue Jun 23, 2009 11:26 am

Re: FOP2 completely empty

Postby wickedsun » Fri Jul 30, 2010 12:11 pm

Code: Select all
./autoconfig-buttons-freepbx.sh
SIP/100 extension 100 Main Line from-internal from-queue autobuttons.cfg autobuttons.cfg.~1~ autobuttons.cfg.~2~ autobuttons.cfg.~3~ autoconfig-buttons-freepbx.sh autoconfig-buttons-freepbx.sh.~1~ autoconfig-buttons-freepbx.sh.~2~ autoconfig-buttons-freepbx.sh.~3~ autoconfig-users-freepbx.sh autoconfig-users-freepbx.sh.~1~ autoconfig-users-freepbx.sh.~2~ autoconfig-users-freepbx.sh.~3~ buttons.cfg.sample buttons.cfg.sample.~1~ buttons.cfg.sample.~2~ buttons.cfg.sample.~3~ extensions_override_freepbx.conf extensions_override_freepbx.conf~ FOP2Callbacks.pm FOP2Callbacks.pm.sample FOP2Callbacks.pm.sample.~1~ FOP2Callbacks.pm.sample.~2~ fop2.cfg fop2.cfg.new fop2_server op_lang_de.cfg op_lang_de.cfg~ op_lang_en.cfg op_lang_en.cfg~ op_lang_es.cfg op_lang_es.cfg~ op_lang_fr_FR.cfg op_lang_fr_FR.cfg~ op_lang_it.cfg op_lang_it.cfg~ op_lang_pt_BR.cfg op_lang_pt_BR.cfg~ op_lang_zh.cfg op_lang_zh.cfg~ none


Apparently, it only removes the CRs from the request.

Any other ideas?
wickedsun
 
Posts: 6
Joined: Sun Apr 25, 2010 6:28 pm

Re: FOP2 completely empty

Postby wickedsun » Fri Jul 30, 2010 12:36 pm

Just as an FYI, this is what the table looks like with your query
Code: Select all
mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SELECT if(type='extension',CONCAT('USER/',exten),device) AS channel,type,if(type<>'trunk',exten,' ') AS extension,label,mailbox,context,'$QUEUECONTEXT' as queuecontext,CONCAT('*',mailbox) AS extenvoicemail, privacy,\`group\`,IF(type='trunk',IF(email<>'',CONCAT('splitme-',email),''),email) as email, queuechannel,originatechannel FROM fop2buttons WHERE device<>'' ORDER BY type,exten"


The table:
Code: Select all
USER/100        extension       100     Main Line               from-internal           *       none            wickedsun@gmail.com
USER/200        extension       200     Charles         from-internal           *       none            wickedsun@gmail.com
USER/900        extension       900     Fop2    900@default     from-internal           *900@default    none            wickedsun@gmail.com
PARK/default    park                            parkedcalls             *
SIP/voicenetwork-canada trunk           SIP/voicenetwork-canada                         *
SIP/callcentric trunk           SIP/callcentric                         *
SIP/voipms      trunk           SIP/voipms                              *
SIP/voicenetwork-usa    trunk           SIP/voicenetwork-usa                            *
wickedsun
 
Posts: 6
Joined: Sun Apr 25, 2010 6:28 pm

Re: FOP2 completely empty

Postby admin » Fri Jul 30, 2010 3:32 pm

Try using only -E . The output should look like this (vertical display):

*************************** 36. row ***************************
channel: SIP/gsm
type: trunk
extension:
label: SIP/gsm
mailbox:
context:
queuecontext:
extenvoicemail: *
privacy:
group:
email:
queuechannel:
originatechannel:
Nicolás
admin
Site Admin
 
Posts: 812
Joined: Tue Jun 23, 2009 11:26 am

Re: FOP2 completely empty

Postby wickedsun » Fri Jul 30, 2010 5:34 pm

There you go:
Code: Select all
*************************** 1. row ***************************
         channel: USER/100
            type: extension
       extension: 100
           label: Main Line
         mailbox:
         context: from-internal
    queuecontext:
  extenvoicemail: *
         privacy: none
           group:
           email: wickedsun@gmail.com
    queuechannel:
originatechannel:
*************************** 2. row ***************************
         channel: USER/200
            type: extension
       extension: 200
           label: Charles
         mailbox:
         context: from-internal
    queuecontext:
  extenvoicemail: *
         privacy: none
           group:
           email: wickedsun@gmail.com
    queuechannel:
originatechannel:
*************************** 3. row ***************************
         channel: USER/900
            type: extension
       extension: 900
           label: Fop2
         mailbox: 900@default
         context: from-internal
    queuecontext:
  extenvoicemail: *900@default
         privacy: none
           group:
           email: wickedsun@gmail.com
    queuechannel:
originatechannel:
*************************** 4. row ***************************
         channel: PARK/default
            type: park
       extension:
           label:
         mailbox:
         context: parkedcalls
    queuecontext:
  extenvoicemail: *
         privacy:
           group:
           email:
    queuechannel:
originatechannel:
*************************** 5. row ***************************
         channel: SIP/voicenetwork-canada
            type: trunk
       extension: 
           label: SIP/voicenetwork-canada
         mailbox:
         context:
    queuecontext:
  extenvoicemail: *
         privacy:
           group:
           email:
    queuechannel:
originatechannel:
*************************** 6. row ***************************
         channel: SIP/callcentric
            type: trunk
       extension: 
           label: SIP/callcentric
         mailbox:
         context:
    queuecontext:
  extenvoicemail: *
         privacy:
           group:
           email:
    queuechannel:
originatechannel:
*************************** 7. row ***************************
         channel: SIP/voipms
            type: trunk
       extension: 
           label: SIP/voipms
         mailbox:
         context:
    queuecontext:
  extenvoicemail: *
         privacy:
           group:
           email:
    queuechannel:
originatechannel:
*************************** 8. row ***************************
         channel: SIP/voicenetwork-usa
            type: trunk
       extension: 
           label: SIP/voicenetwork-usa
         mailbox:
         context:
    queuecontext:
  extenvoicemail: *
         privacy:
           group:
           email:
    queuechannel:
originatechannel:


Does anything look out of place?
wickedsun
 
Posts: 6
Joined: Sun Apr 25, 2010 6:28 pm

Re: FOP2 completely empty

Postby admin » Sun Aug 01, 2010 12:11 pm

That looks fine, with that output the button config should work.
Nicolás
admin
Site Admin
 
Posts: 812
Joined: Tue Jun 23, 2009 11:26 am

Re: FOP2 completely empty

Postby wickedsun » Mon Aug 02, 2010 1:18 pm

Hi,

It finally works!

Why is it not working with the base script? Is it a version problem (mysql) ?
wickedsun
 
Posts: 6
Joined: Sun Apr 25, 2010 6:28 pm

Next

Return to Installation and Configuration

Who is online

Users browsing this forum: No registered users and 1 guest