[asterisk-users] asterisk18 - realtime/mysql - take 3
Edwin Lam
edwin.lam at officegeneral.com
Wed May 18 18:11:23 CDT 2011
On 5/18/11 1:32 PM, Hans Witvliet wrote:
> Still a couple of questions......
>
> I did configure extconfig.conf
> ...
> ;iaxusers => odbc,asterisk
> ;iaxpeers => odbc,asterisk
> ;sipusers => odbc,asterisk
> sipusers => mysql,asterisk,sip_devices
> sippeers => mysql,asterisk,sip_devices
> ;sippeers => odbc,asterisk
> ;sipregs => odbc,asterisk
> ;voicemail => odbc,asterisk
> ;extensions => odbc,asterisk
> ;meetme => mysql,general
> ;queues => odbc,asterisk
> ;queue_members => odbc,asterisk
> ;musiconhold => mysql,general
> ;queue_log => mysql,general
> ....
> So only defining sipusers& sippeers for mysql
change the sipusers & sippeers line to the following:
sipusers => mysql,general,sip_devices
sippeers => mysql,general,sip_devices
notice it's the context name in stead of the database
name in the 2nd parameter.
> And noticed two files for configuring mysql-stuff:
> file: res_config_mysql.conf
> database access config: host, user, pwd
>
> file: res_odbc.conf
> in section [mysql2]: mysql database config: host, user, pwd
>
> So, i configured them both...
since you're using mysql connection type, you can get rid of
the res_odbc.conf file.
> Quick check:kc3054*CLI> sip show users
> Username Secret Accountcode Def.Context ACL ForcerPort
> j.witvliet geheim default No Yes
> 00000277611 25b06d3a0b5ef73 default No Yes
> kc3054*CLI>
>
> kc3054*CLI> sip show peers
> Name/username Host Dyn Forcerport ACL Port Status Realtime
> 00000277611 (Unspecified) D N 0 Unmonitored
> j.witvliet (Unspecified) D N 0 Unmonitored
> 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2
> offline] kc3054*CLI>
>
>
> Here i see at for both users and peers ONLY the statis entries from
> sip.conf file, nothing from mysql...
they'll show up only if the phone successfully
registered.
[snippage...]
> Try todo something else:
> kc3054*CLI> realtime update sipusers set SET port = 4343 WHERE name =
> 00000277611 Failed to update. Check the debug log for possible SQL
> related entries.
> Command 'realtime update sipusers set SET port = 4343 WHERE name =
> 00000277611' failed.
> [May 18 18:47:16] WARNING[16718]: res_config_mysql.c:559 update_mysql:
> MySQL RealTime: Invalid database specified: 'asterisk' (check
> res_mysql.conf) kc3054*CLI>
>
> ==> here the system talkes about _another_ config file!<==
> So which file should i configure:
> A) res_config_mysql.conf
> B) res_odbc.conf
> C) res_mysql.conf
> But even when i put my credentials in all three of them, still no show!
i believe 1.8.x uses res_config_mysql.conf for mysql realtime.
you can get rid of res_mysql.conf & res_odbc.conf
--
Edwin Lam <edwin.lam at officegeneral.com>
Systems Engineer, OfficeWyze, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0xD6506D20
More information about the asterisk-users
mailing list