Freepbx 2.2.1 no working

Hello,

I just installed freepbx 2.2.1 in a centos 4.4 following the steps given at: http://powerontech.com/FreePBX-Production-Install-Guide.htm
I have an X101P card with an FXO port. I have created a new incoming route that tells the asterisk to route incomings calls to a specific sip extension. However this is not working.

In the zapata.con I have the following:
[trunkgroups]
; define any trunk groups
[channels]
; hardware channels
; default
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
busydetect=yes
busycount=6
echocancelwhenbridged=yes
echocancel=yes
echotraining=yes
rxgain=1.2
txgain=1.2
; define channels
context=from-zaptel; Incoming calls go to [from-zaptel] in extensions.conf
signalling=fxs_ks ; Use FXS signalling for an FXO channel
channel => 1 ; PSTN attached to port 1

This is what I see at the asterisk console when arrives to it an incoming call:

-- Starting simple switch on 'Zap/1-1'
-- Executing NoOp("Zap/1-1", "Entering from-zaptel with DID == ") in new stack
-- Executing Ringing("Zap/1-1", "") in new stack
-- Executing Set("Zap/1-1", "DID=s") in new stack
-- Executing NoOp("Zap/1-1", "DID is now s") in new stack
-- Executing GotoIf("Zap/1-1", "1?zapok:notzap") in new stack
-- Goto (from-zaptel,s,8)
-- Executing NoOp("Zap/1-1", "Is a Zaptel Channel") in new stack
-- Executing Set("Zap/1-1", "CHAN=1-1") in new stack
-- Executing Set("Zap/1-1", "CHAN=1") in new stack
-- Executing Macro("Zap/1-1", "from-zaptel-1|s|1") in new stack
-- Executing NoOp("Zap/1-1", "Returned from Macro from-zaptel-1") in new stack
-- Executing Goto("Zap/1-1", "from-pstn|s|1") in new stack
-- Goto (from-pstn,s,1)
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing NoOp("Zap/1-1", "Entering from-zaptel with DID == ") in new stack
-- Executing Ringing("Zap/1-1", "") in new stack
-- Executing Set("Zap/1-1", "DID=s") in new stack
-- Executing NoOp("Zap/1-1", "DID is now s") in new stack
-- Executing GotoIf("Zap/1-1", "1?zapok:notzap") in new stack
-- Goto (from-zaptel,s,8)
-- Executing NoOp("Zap/1-1", "Is a Zaptel Channel") in new stack
-- Executing Set("Zap/1-1", "CHAN=1-1") in new stack
-- Executing Set("Zap/1-1", "CHAN=1") in new stack
-- Executing Macro("Zap/1-1", "from-zaptel-1|s|1") in new stack
-- Executing NoOp("Zap/1-1", "Returned from Macro from-zaptel-1") in new stack
-- Executing Goto("Zap/1-1", "from-pstn|s|1") in new stack
-- Goto (from-pstn,s,1)
-- Hungup 'Zap/1-1'

.
.
I can not either call from any sip extension to another one.

What must be done after a freepbx installation to put it to work ?

Thanks in advanced

Hello,

This is what I have found in /var/log/asterisk/full:

Apr 22 22:57:54 VERBOSE[3846] logger.c: [res_config_mysql.so]Apr 22 22:57:54 VERBOSE[3846] logger.c: [res_config_mysql.so] => (MySQL RealTime Configuration Driver)
Apr 22 22:57:54 DEBUG[3846] res_config_mysql.c: MySQL RealTime Host:
Apr 22 22:57:54 DEBUG[3846] res_config_mysql.c: MySQL RealTime Port: 0
Apr 22 22:57:54 DEBUG[3846] res_config_mysql.c: MySQL RealTime User:
Apr 22 22:57:54 DEBUG[3846] res_config_mysql.c: MySQL RealTime Password:
Apr 22 22:57:54 ERROR[3846] res_config_mysql.c: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info.
Apr 22 22:57:54 DEBUG[3846] res_config_mysql.c: MySQL RealTime: Cannot Connect (2002): Can’t connect to local MySQL server through socket ‘’ (111)
Apr 22 22:57:54 WARNING[3846] res_config_mysql.c: MySQL RealTime: Couldn’t establish connection. Check debug.
Apr 22 22:57:54 DEBUG[3846] res_config_mysql.c: MySQL RealTime: Cannot Connect: Can’t connect to local MySQL server through socket ‘’ (111)
Apr 22 22:57:54 NOTICE[3846] config.c: Registered Config Engine mysql
Apr 22 22:57:54 VERBOSE[3846] logger.c: MySQL RealTime driver loaded.

This shows that asterisk was unable to connect to mysql server.

How can I fix this problem ?

You missed something on your setup
Is mysql running?
go run this

/var/lib/asterisk/bin/retrieve_conf

What happened

Hello,

Yes, mysql is running. I did service mysqld status and I got:
mysqld (pid 3395) is running…

I did ps xa | grep mysqld and I got :
3365 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
3395 ? Sl 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
5235 pts/1 R+ 0:00 grep mysqld

I did /var/lib/asterisk/bin/retrieve_conf and I got:
Content-type: text/html
X-Powered-By: PHP/4.3.9
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
Please Reload Asterisk by visiting http://192.168.2.12/admin

I did mysqladmin --protocol=socket --socket=/var/lib/mysql/mysql.sock version and I got:
error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

Thank you !