Vous êtes sur la page 1sur 5

Install Web-MeetMe 4.0.2 for FreepPBX 2.8 with Asterisk 1.8 on CentOS 5.

5
News - Ubuntu / Linux / Unix Written by Mark Veenstra Tuesday, 11 January 2011 21:11

Click here to hear this article Web-MeetMe is a suite of PHP pages to allow for scheduling and managing conferences on an Asterisk PBX. In this installation guide I am going to show you howto install Web-MeetMe on a installation of FreePBX 2.8 with Asterisk 1.8. I also updated my own installation guide of FreePBX with Asterisk, this guide is also on this website. Well read on and learn howto install Web-MeetMe 4.0.2.

Prepare installation
First check if Asterisk module res_odbc is installed. Login into your Asterisk server and start the Asterisk command-line:
1 asterisk -r

On the Asterisk command line execute the next command:


1 asterisk*CLI> module show like res_odbc

Also the module cdr_adaptive_odbc should be loaded into Asterisk. Check if it exists:
1 asterisk*CLI> module show like cdr_adaptive_odbc

If both modules fail or one of these two I recommend you install res_odbc and cdr_adaptive_odbc with the next steps:

1 yum install -y unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel php-odbc mysql-connector-

Now we need to recompile Asterisk from the source:


1 2 3 4 5 6 cd /usr/src/asterisk-1.8.1.1/ amportal stop make clean contrib/scripts/get_mp3_source.sh ./configure make menuselect

This last step opens a menu, in this menu be sure that: - Head into Channel Drivers and make sure chan_dahdi is selected - Head into Add-Ons and make sure app_mysql, app_saycountpl, cdr_mysql, format_mp3, res_config_mysql are selected - Head into Extra Sound Packages and make sure EXTRAS-SOUNDS-EN-GSM is selected - Head into Resource Modules and make sure res_odbc is selected

- Head into Call Detail Recording and make sure cdr_adaptive_odbc is selected If all off the above is marked for installation save and quit the menu. Let us now compile Asterisk again and start it back up.
1 make 2 make install 3 amportal start

If you want you can check if the Asterisk modules (res_odbc & cdr_adaptive_odbc) are loaded. If not Google is your friend :-) Also app_meetme module should be installed. If this is not installed follow my instructions that you can find here. Check that you have PHP version 4.3 or later installed. If not install an update or install PHP. Normally you would have this version.

Configure ODBC
Open /etc/odbc.ini and add the following:
1 2 3 4 5 6 7 8 9 10 11 [MySQL-Asterisk] Description = Driver = Server = Database = Port = Socket = Option = Stmt = Trace = TraceFile = ODBC for MySQL MySQL 127.0.0.1 meetme 3306 /tmp/mysql.sock yes /tmp/odbc.log

Now let's create the res_odbc.conf


1 touch /etc/asterisk/res_odbc.conf 2 chown asterisk:asterisk /etc/asterisk/res_odbc.conf 3 chmod 775 /etc/asterisk/res_odbc.conf

Open /etc/asterisk/res_odbc.conf and add the following as DB user and pass I used the settings of the asteriskuser DB and PASSWORD2 from this article:
1 2 3 4 5 [meetme] dsn => MySQL-Asterisk username => <db-username> password => <db-password> pre-connect => yes

Also we need to create the file /etc/asterisk/extconfig.conf:


1 touch /etc/asterisk/extconfig.conf 2 chown asterisk:asterisk /etc/asterisk/extconfig.conf 3 chmod 775 /etc/asterisk/extconfig.conf

Open /etc/asterisk/extconfig.conf and add the following:


1 [settings] 2 meetme => odbc,meetme,booking

To enable CDR logs we need to create /etc/asterisk/cdr_adaptive_odbc.conf:


1 touch /etc/asterisk/cdr_adaptive_odbc.conf 2 chown asterisk:asterisk /etc/asterisk/cdr_adaptive_odbc.conf 3 chmod 775 /etc/asterisk/cdr_adaptive_odbc.conf

Open /etc/asterisk/cdr_adaptive_odbc.conf and add the following:


1 [wmm] 2 connection=meetme ;Note that this matches res_odbc.conf 3 table=cdr

Open /etc/asterisk/cdr.conf en make sure that the following setting matches:


1 endbeforehexten=no

Prepare database
Let us setup the MySQL database for Web-MeetMe:
1 2 3 4 5 6 7 mysqladmin -p create meetme cd /usr/src/ wget (link to download web meet me) tar xzvf Web-MeetMe_v4.0.2.tar cd webmeet-me mysql -p meetme < cbmysql/db-table-create-v7.txt mysql -p meetme < cbmysql/db-admin-user-create.txt

Let us start the MySQL command line:


1 mysql -p

Because I configured the asterisk DB user (asteriskuser with PASSWORD2) as DB user I have to give rights to this user for this database:
1 GRANT ALL PRIVILEGES ON meetme.* TO asteriskuser@localhost IDENTIFIED BY 'PASSWORD2'; 2 flush privileges; 3 \q

Install and configure Web-MeetMe


First let us install Web-MeetMe

1 cd /usr/src/ 2 mv weebmeet-me /var/www/html/ 3 chown -R asterisk:asterisk /var/www/html/web-meetme/

Open the following PHP file


1 vi /var/www/html/web-meetme/lib/defines.php

And adjust the following settings to your needs (read the file; maybe more settings needed):
1 define ("WEBROOT", "http://<your ip or hostname>/web-meetme/"); 2 define ("FSROOT", "/var/www/html/web-meetme/"); 3 define ("AUTH_TYPE", "sqldb");

We need to adjust the /etc/asterisk/phpagi.conf, make it look like this (adjust some settings to your needs):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 [phpagi] #enable debuging debug=false #use internal error handler error_handler=true #mail errors to admin=your@email.com #host name of this server hostname=my.host.com # temporary directory for storing temporary output tempdir=/var/spool/asterisk/tmp/ [festival] #path to text2wave binary text2wave=/usr/src/festival/bin/text2wave tempdir=/var/lib/asterisk/sounds/tmp/ [asmanager] # server to connect to server=localhost # default manager port port=5038 #username for login username=pick the username from /etc/asterisk/manager.conf #password for login secret=pick the password from /etc/asterisk/manager.conf [cepstral] #alternate text to speech engine swift=/opt/swift/bin/swift voice=David

Now open the /etc/asterisk/manager.conf and uncomment the next line:


1 include manager_custom.conf

Then open the /etc/asterisk/manager_custom.conf and add the following to it:


1 2 3 4 [MeetMe] secret = {pick-a-password} read = call write = command,originate

Open the next file to configure DB settings:


1 vi /var/www/html/web-meetme/lib/database.php

Adjust the file to the user you added to the meetme database. If you followed these instructions it is the asterisk DB user from this artice:
1 2 3 4 5 6 7 8 9 10 11 12 13 <?php include_once 'DB.php'; $database = 'meetme'; $host = 'localhost'; $username = 'asteriskuser'; $password = 'PASSWORD2'; $dsn = "mysql://$username:$password@$host/$database"; $db = DB::connect($dsn); if (DB::isError($db)) { die ($db->getMessage()); } ?>

Also the /var/www/html/web-meetme/index.html of Web-MeetMe needs a adjustment:

1 <META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://<your ip or hostname>/web-meetme/meetme_contro

Let us finish the installation with a reboot of Asterisk and FreePBX


1 amportal restart

Complete and check installation


If everything went correct you are now able to use Web Meet Me. Check the installation by browsing to http://<your server>/web-meetme. You can login with the standard user and password which are: user: wmm@localhost pass: wmmpw Don' forget to reset these credentials, because they are known over the world. Have fun with your Web-MeetMe installation!

Vous aimerez peut-être aussi