Friday, September 21, 2012

Guide to install Web-MeetMe. by Sunny Khetarpal

1. Download and extract Web-MeetMe gui in the root direcotry of your
Web Server (usually /var/www/). The actual version of the package is
1.3.3. Run :
wget http://www.fitawi.com/Asterisk/Web-MeetMe_v1.3.3.tgz
As root run:
cd /var/www/
mv Web-MeetMe_v1.3.3.tgz /var/www/
tar -xzf Web-MeetMe_v1.3.3.tgz
mv Web-MeetMe web-meetme (it's not necessary, if you do this you'll
have to edit the index.html file in the same folder in order to match
the address)


2. Edit the file Web-MeetMe/lib/defines.php in order to match the
configuration of your system ( database configuration). Here is an
example of the configurable part of the file with some comment.

define ("WEBROOT", "http://192.168.0.1/");
// IP address of you asterisk server
define ("FSROOT", "/var/www/Web-MeetMe/");
// Absolute address of the folder where the package was extracted
define ("LIBDIR", FSROOT."lib/");
define ("HOST", "localhost");
// Server alias
define ("PORT", "3306");
// The standard port used by Asterisk is 3306
define ("USER", "root");
define ("PASS", "");
// Username and password of your database.
//Default password for mysql if it was installed by asterisk@home is
//passw0rd, otherwise the default password for root user in a normal
//mysql installation is empty ("").
// It's really dangerous use default password for an obvious security
//issue.
define ("DBNAME", "meetme");
// Database name. Don't change if you want to follow this guide.
define ("DB_TYPE", "mysql"); // mysql o postgres
//This guide is for mysql but can easily be adaptable to postgresql.
// Comment the following three lines if you don't want any kind of
// authentication (every user can handle or delete the conference of
// another user). The only authentication method supported by now is
// based on an Active Directory Server.
define ("AUTH_TYPE", "adLDAP"); // adLDAP or ""
define ("ADMIN_GROUP", "Domain Admins");
include (FSROOT."lib/".AUTH_TYPE.".php");
// In order to configure your Active Directory Server parameters you
// have to edit /lib/adLDAP.php
define ("DB_TABLECDR", "cdr");
define ("DB_TABLESCHED", "booking");
// Name of two tables used by the program. Don't change if you don't
//have any partucoular aim.

3. Download and compile app_cbmysql in /usr/src/asterisk/apps or
wherever you have the Asterisk source. Run as root:
cd /usr/src/asterisk/apps
wget http://www.fitawi.com/Asterisk/app_cbmysql.c
Edit the Makefile in that folder using the patch
www.fitawi.com/Asterisk/Makefile-cbmysql-patch.txt . Compile Asterisk
: run make install in the Asterisk source directory (not the
subdirectory apps!!!!). In this way you will compile only
app_cbmysql.c and not all the other parts of Asterisk.

Note: A comman error is: /usr/bin/ld: cannot find -lpq. You can avoid
this error installin the package postgresql-devel (or the equivalent
of your distribution). You have to install it even if you will use
mysql as database.

4. Create the database meetme and the table booking folling the file
www.fitawi.com/Asterisk/db-tables-v2.txt. Here is the sql code used to
create the table.

CREATE TABLE `booking` (
`bookId` INT( 11 ) DEFAULT NULL NOT NULL AUTO_INCREMENT ,
`clientId` INT( 11 ) DEFAULT '0' NOT NULL ,
`roomNo` VARCHAR( 30 ) DEFAULT '0' NOT NULL ,
`roomPass` VARCHAR( 30 ) DEFAULT '0' NOT NULL ,
`silPass` VARCHAR( 30 ) DEFAULT '0' NOT NULL ,
`startTime` DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL ,
`endTime` DATETIME DEFAULT '0000-00-00 00:00:00',
`dateReq` DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL ,
`dateMod` DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL ,
`maxUser` VARCHAR( 30 ) DEFAULT '10' NOT NULL ,
`status` VARCHAR( 30 ) DEFAULT 'A' NOT NULL ,
`confOwner` VARCHAR( 30 ) NOT NULL ,
`confDesc` VARCHAR( 30 ) NOT NULL ,
PRIMARY KEY ( `bookId` )
);


5. Download cbmysql.conf and copy it in /etc/asterisk. Run:
cd /etc/asterisk
wget http://www.fitawi.com/Asterisk/cbmysql.conf
Edit with your system parameters. A possible configuration is:
[global]
hostname=localhost
dbname=meetme
password=
user=root
port=3306
// database port, the same used in defines.php
sock=/var/run/mysqld/mysqld.sock
//Where the used socket is. Default path is ok for red hat flavour
while Debian (and his flavors like Ubuntu) has that file in
/var/run/mysqld/mysqld.sock
OptsAdm=dp
OptsUsr=dp
ConfApp=MeetMe
ConfAppCount=MeetMeCount

6. Edit /etc/asterisk/manager.conf
It's necessary to enable the global user and create the phpagi one if
it's not already present adding this code:
[phpagi]
secret = phpagi
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0

read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
It's dangerous to leave default password (in every cas). In order to
chacge it you have to use the same password in manager.conf and in
phpagi.conf in /etc/asterisk.
If that file not exist you have to create it editing
phpagi.example.conf in ../Web-MeetMe/phpagi/ .

7. Edit extensions.conf. You can add:
exten => 8600,1,Answer
exten => 8600,2,Wait(1)
exten => 8600,3,CBMysql()
exten => 8600,4,Hangup

8. Check if you have "register_globals = On" in php.ini and the line
"extension=mysql.so" have to be not commented.

9.Reload Asterisk.

15 comments:

  1. ERROR: WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update

    Solution: pear channel-update "pear.php.net"

    Error: DB Error: extension not found
    Solution: yum -y install httpd php php-mysql php-devel
    Solution: yum -y install httpd php php-mysql php-devel


    Error: No application 'CBMysql' for extension
    Check: core show application CBMySQL
    These steps will help identify the problem-
    Solution:
    1. module unload app_cbmysql.so
    2. core set verbose 10
    3. core set debug 10
    4. module load app_cbmysql.so


    ERROR: Unable to load config for CBMySQL: cbmysql.conf
    Solution: vi /etc/asterisk/cbmysql.conf
    write this :
    [global]
    hostname=localhost
    dbname=meetme
    password=meetme
    user=meetme
    port=3306
    sock=/var/lib/mysql/mysql.sock
    DBOpts=yes
    ConfApp=MeetMe
    ConfAppCount=MeetMeCount
    ; Choose one of the following to modify early join behaviour
    earlyalert=300 ; Tell the participant if they are too early (seconds)
    ;fuzzystart= ; Allow participants to join early (seconds)



    I recompiled it and made sure that app_cbmysql.so (the new one) was placed in

    /usr/lib/asterisk/modules/app_cbmysql.so, as well as /var/www/html/web-meetme/cbmysql/app_cbmysql.so


    service asterisk restart
    service httpd restart
    service mysqld restart

    cd /var/log/httpd/
    tail -100 error_log

    cd /var/log/asterisk/
    tail -40 messages




    nano /etc/asterisk/cdr_adaptive_odbc.conf
    nano /etc/asterisk/res_odbc.conf



    Unable to open Asterisk database '/var/lib/asterisk/astdb': Permission denied

    Realtime mapping for 'meetme' found to engine 'odbc', but the engine is not available


    ERROR:
    Error loading module 'app_cbmysql.so': /usr/lib/asterisk/modules/app_cbmysql.so: cannot open shared object file: No

    such file or directory

    SOLUTION:
    Here is what I changed in the makefile...


    the makefile is..

    in the archive under cbmysql/Makefile

    near the end... from this :

    app_cbmysql.o: app_cbmysql.c
    $(CC) -pipe -I/usr/include/mysql -L/usr/lib/mysql $(CFLAGS) -c -o app_cbmysql.o app_cbmysql.c

    app_cbmysql.so: app_cbmysql.o
    $(CC) -shared -Xlinker -x -o $@ $< -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient


    to this :

    app_cbmysql.o: app_cbmysql.c
    $(CC) -pipe -I/usr/include/mysql -L/usr/lib64/mysql $(CFLAGS) -c -o app_cbmysql.o app_cbmysql.c

    app_cbmysql.so: app_cbmysql.o
    $(CC) -shared -Xlinker -x -o $@ $< -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient


    so, even though it appears the makefile is supposed to detect your environment, it's static... I am running 64 bit, so

    /usr/lib/mysql is not valid.




    ERROR: Asked to transmit frame type 4, while native formats is 0x100 (g729)(256) read/write = 0x8 (alaw)
    ERROR: Unable to find a codec translation path from 0x100 (g729) to 0x8 (alaw)
    Solution: Install Codec G729 from the below link
    http://asterisk.hosting.lv/
    before downloading the codec please check your server is 32 bit or 64 bit by the command "uname-a"
    and check the processor by the command "cat /proc/cpuiinfo"

    After installing reload the asterisk server


    ERROR: CBMySQL: MySQL Error response: Unknown column 'b.roomNo' in 'field list'

    Solution: change field name from confno to roomNo in booking table

    ReplyDelete
  2. These instructions are for a seriously out-of-date version of Web-MeetMe. Current version is 4.0.5 and supports the author-recommended architecture that integrates with Atserisk Real-Time. Start here: http://sourceforge.net/projects/web-meetme/

    ReplyDelete
  3. But In Current version there are lot of bugs related to booking table fields like rommno & confno, etc...any help would be appreciated on this part

    ReplyDelete
  4. ERROR:
    PHP Fatal error: Class 'DB' not found in /var/www/html/web-meetme/lib/database.php

    SOLUTION:
    Type the following command to install the package
    yum install php-pear
    pear install DB


    After instalation check the same by the below command

    BEFORE INSTALLATION

    [root@localohost#]# pear list
    Installed packages, channel pear.php.net:
    =========================================
    Package Version State
    Archive_Tar 1.3.7 stable
    Console_Getopt 1.3.1 stable
    PEAR 1.9.4 stable
    Structures_Graph 1.0.4 stable
    XML_RPC 1.5.4 stable
    XML_Util 1.2.1 stable


    AFTER INSTALLATION

    Package Version State
    Archive_Tar 1.3.7 stable
    Console_Getopt 1.3.1 stable
    DB 1.7.14 stable
    PEAR 1.9.4 stable
    Structures_Graph 1.0.4 stable
    XML_RPC 1.5.4 stable
    XML_Util 1.2.1 stable

    ReplyDelete
    Replies
    1. pear install DB
      WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
      Failed to download pear/PEAR, latest release is version 1.10.0, but it requires PHP version "5.4.0", use "channel://pear.php.net/PEAR-1.10.0" to install
      pear/DB requires package "pear/PEAR" (version >= 1.10.0), installed version is 1.9.4
      No valid packages found

      SO INSTALL
      pear install MDB2

      Delete
    2. I guess the easiest thing to do would to use an older version, like 1.9.0 (see https://pear.php.net/package/DB/download/1.9.0) as this dependency was introduced in 1.9.1 and the latest version is 1.9.2.

      RUN THE COMMAND:
      pear install DB-1.9.0

      Delete
  5. ERROR: syntax error, unexpected $end in /var/www/html/web-meetme/lib/defines.php on line 144

    Solution: edit /etc/php.ini
    and find the below line
    short_open_tag = Off
    Change it to
    short_open_tag = On

    ReplyDelete
    Replies
    1. OR

      at the very bottom of the file the php tag <? needs to be replaced with <?php
      I had this issue today and was able to fix it on my installation.
      php short tags are disabled on my system.
      Hope this helps someone out there!

      Delete
  6. for realtime go for url:
    http://voip.iindya.com/asterisk-realtime-meetme/

    ReplyDelete
  7. for realtime go for url:
    http://findoutanswer.com/3/how-to-make-web-meetme-latest-version-fully-working

    ReplyDelete
  8. getting the error "No application 'Meetme' for extension

    ReplyDelete
    Replies
    1. goto asterisk source code directory and apply command
      "[root@localhost]# make menuselect"

      in menu select "applications" and select "app_meetme".

      now its time to recompile the ast source code by "make" and "make install" commands.

      Delete
  9. I can see the current users in the conference but the Mute, Kick, Extend, and End Now buttons on the current conference gui not working

    ReplyDelete
    Replies
    1. There are two possible causes
      1. Incorrect permissions in manager.conf. This is not likely if you see participants in the monitor screen
      2. You did not set the WEBROOT define in lib/defines.php Most of the buttons have Ajax code backing
      them, and it gets grumpy if the parent url differs from the configured url. I personally use meta-rediects
      in index/html to force all connections to https and fully qualified server names to ensure that the define
      matches the parent url and is what the Ajax code expects.
      Source: https://sourceforge.net

      Delete
  10. any one who has latest version working of webmeetme

    ReplyDelete