I have a problem with Asterisk Realtime setup for sip and extensions, I have tried every possible thing nothing works :-
My Asterisk Version :-
Connected to Asterisk 1.6.1-rc1 with addons 1.6.1-rc2
My Freepbx version:-
2.5.1
Status of mysql realtime :-
fabrikam3*CLI> realtime mysql status
general connected to asterisk@127.0.0.1, port 3306 with username asterisk for 0 seconds.
My res_mysql.conf
[general]
dbhost = 127.0.0.1
dbname = asterisk
dbuser = asterisk
dbpass = ********
dbport = 3306
dbsock = /var/run/mysqld/mysqld.sock
requirements=warn ; or createclose or createchar
Wenn i change my res_mysql.conf to
dbhost = 127.0.0.1 --> dbhost = 192.168.1.14
i get the following error
fabrikam3*CLI> realtime mysql status
general connected to asterisk@127.0.0.1, port 3306 with username asterisk.
so without telling my the seconds but wenn i look to the log i see this.
[Feb 19 13:11:13] ERROR[2607] res_config_mysql.c: MySQL RealTime: Failed to connect database server asterisk on 192.168.1.14 (err 2003). Check debug for more info.
My extconf.conf :-
[settings]
; => ,[,table_name]
sippeers => mysql,asterisk,sip
sipusers => mysql,asterisk,sip
Debug Details by using asterisk -vvvvvvvvgc shows =========================================================================
== Parsing ‘/etc/asterisk/asterisk.conf’: == Found
== Parsing ‘/etc/asterisk/extconfig.conf’: == Found
== Binding sippeers to mysql/asterisk/sip
== Binding sipusers to mysql/asterisk/sip
Asterisk already running on /var/run/asterisk.ctl. Use ‘asterisk -r’ to connect.
Also wenn i try this i will get an error.
fabrikam3*CLI> realtime update sipfriends name nilsvanwoensel port 3306
Failed to update. Check the debug log for possible SQL related entries.
Command ‘realtime update sipfriends name nilsvanwoensel port 3306’ failed.
The logs from asterisk. Don’t get it why he would not connect
[Feb 19 12:33:29] WARNING[2464] config.c: Realtime mapping for ‘sippeers’ found to engine ‘mysql’, but the engine is not available
[Feb 19 12:33:29] WARNING[2464] config.c: Realtime mapping for ‘sippeers’ found to engine ‘mysql’, but the engine is not available
[Feb 19 12:33:29] NOTICE[2414] config.c: Registered Config Engine mysql
[Feb 19 12:33:29] WARNING[2414] translate.c: plc_samples 160 format f
[Feb 19 12:33:33] NOTICE[2464] chan_sip.c: Peer ‘nilsvanwoensel’ is now UNREACHABLE! Last qualify: 0
[Feb 19 12:33:43] WARNING[2464] res_config_mysql.c: MySQL RealTime: Invalid database specified: asterisk
[Feb 19 12:33:43] WARNING[2464] res_config_mysql.c: MySQL RealTime: Invalid database specified: asterisk
[Feb 19 12:33:43] NOTICE[2464] chan_sip.c: Peer ‘nilsvanwoensel’ is now Reachable. (103ms / 2000ms)
[Feb 19 12:34:43] WARNING[2464] res_config_mysql.c: MySQL RealTime: Invalid database specified: asterisk
[Feb 19 12:34:43] WARNING[2464] res_config_mysql.c: MySQL RealTime: Invalid database specified: asterisk
[Feb 19 12:35:43] WARNING[2464] res_config_mysql.c: MySQL RealTime: Invalid database specified: asterisk
I work with freepbx 2.5.1 so the database is a bit different if i look to the tutorails @ internet. I took the database files that are located in the package off freepbx. Wenn I add an user with freepbx he wil work fine. But when I create it only with sql he does nothing till i submit and reload with freepbpx.
Strange thing is wenn i add a user with freebpx and the SIP is working with asterisk and I change a thing in the mysql database and I use the command /var/lib/asterisk/bin/module_admin reload
he takes the info from the database and will use it for asterisk, but wenn i make a new user this won’t work ??
Here my table
id keyword data flags
1 account nilsvanwoensel 0
1 accountcode 0
1 allow 0
1 callerid device <1> 0
1 callgroup 0
1 canreinvite no 0
1 context from-internal 0
1 deny 0.0.0.0/0.0.0.0 0
1 dial SIP/nilsvanwoensel 0
1 disallow 0
1 dtmfmode rfc2833 0
1 host dynamic 0
1 mailbox nilsvanwoensel@device 0
1 nat yes 0
1 permit 0.0.0.0/0.0.0.0 0
1 pickupgroup 0
1 port 5060 0
1 qualify yes 0
1 record_in Always 0
1 record_out Always 0
1 secret 1234 0
1 type friend 0
Can somebody help me please ?