[asterisk-users] Asterisk Realtime and SIP configuration

Stuart Ford sbf at zimo.co.uk
Fri Mar 7 04:14:53 CST 2008


Dear all

I'm writing to the list for help as a last resort. I've exhausted all 
other options, so please forgive me. I've lurked here for years but 
never actually posted.

I'm trying to get Asterisk Realtime SIP configuration working, but it 
refuses to do so. I have all the necessary configuration in place, 
Asterisk makes a connection to the database, which can be verified with 
"realtime mysql status", but it WILL NOT query the database to find SIP 
accounts ([general] SIP configuration is still in the normal 
configuration file).

I'm tailing the MySQL query log and there simply aren't ANY queries on 
the table containing my SIP users. Here's my config:

-- res_mysql.conf
[general]
dbhost = 127.0.0.1
dbname = <valid name>
dbuser = <valid user>
dbpass = <valid pass>
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

-- extconfig.conf
[global]
sipusers => mysql,<valid db>,telephones
sippeers => mysql,<valid db>,telephones

(combinations of removing sipusers and sippeers lines make no difference)

Asterisk is *definitely* connecting successfully, and I've verified that 
the user it's using has all the relevant DB and table access within 
MySQL. But here's the funny thing:

When I issue "realtime mysql status", the following appears on the end 
of the MySQL query log:

080307 10:11:09	      9 Init DB     <db name>

This happens reliably, I can up-arrow and enter as many times as I like 
and for each time a line like this will appear. This is how I know that 
Asterisk is definitely connecting to MySQL. But if I run "realtime load 
telephones name sip_1_002" I get (on the * console):

"No rows found matching search criteria."

... but NOTHING in the MySQL query log. It *IS NOT* querying the 
database, it's not even trying.

Why is it not doing this? Any ideas? I've lost significant brain cells 
to this and I'm out of options. I can't find a single other instance of 
someone having this problem.

Background information: Asterisk 1.4.14 running on its own (i.e. no 
external telephony). MySQL 5.0.22.

Many thanks!

Stu

-- 
Stuart Benjamin Ford
Chief Technical Officer

Zimo Communications Ltd.
Landmark House
Station Road
Cheadle Hulme
Cheshire
SK8 7BS

Switch	0800 321 3000
Fax	08703 850 860
Direct	0800 321 3763
E-mail	sbf at zimo.co.uk
Web	www.zimo.co.uk



More information about the asterisk-users mailing list