Could someone provide some steps for troubleshooting Realtime? I can't see any signs that it's working. I followed and double-checked a few different guides around the net, but haven't been able to figure it out. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070301/c0a457bd/attachment.htm
Mike Hammett wrote:> Could someone provide some steps for troubleshooting Realtime? I can?t > see any signs that it?s working. I followed and double-checked a few > different guides around the net, but haven?t been able to figure it out.You don't say which version you're running. I *think* the syntax is the same for both: realtime <driver-name> status will show you the status. For postgres it's pgsql for driver name (that's what I use). I think the other driver ids are mysql and odbc. If you don't see yourself connected, that's where to start. B. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
queue show Show status of a specified queue realtime load Used to print out RealTime variables. realtime update Used to update RealTime variables. restart gracefully Restart Asterisk gracefully Aiur*CLI> realtime load You must supply a family name, a column to match on, and a value to match to. I am using Asterisk 1.4.0 and MySQL. It appears that the only realtime options are for loading and updating specific items from the database. The only database options seem to be for dundi. Under modules, all I could find is: Aiur*CLI> module show like pbx_realtime.so Module Description Use Count pbx_realtime.so Realtime Switch 0 1 modules loaded --Mike ------------------------------ Message: 12 Date: Thu, 01 Mar 2007 13:02:23 -0500 From: Brian Capouch <brianc@palaver.net> Subject: Re: [asterisk-users] Asterisk Realtime To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com> Message-ID: <45E7152F.1070702@palaver.net> Content-Type: text/plain; charset=windows-1252; format=flowed Mike Hammett wrote:> Could someone provide some steps for troubleshooting Realtime? I cant > see any signs that its working. I followed and double-checked a few > different guides around the net, but havent been able to figure it out.You don't say which version you're running. I *think* the syntax is the same for both: realtime <driver-name> status will show you the status. For postgres it's pgsql for driver name (that's what I use). I think the other driver ids are mysql and odbc. If you don't see yourself connected, that's where to start. B. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ------------------------------
[root@Aiur asterisk]# cat res_mysql.conf ; ; Sample configuration for res_config_mysql.c ; ; The value of dbhost may be either a hostname or an IP address. ; If dbhost is commented out or the string "localhost", a connection ; to the local host is assumed and dbsock is used instead of TCP/IP ; to connect to the server. ; [general] ;dbhost = 127.0.0.1 dbname = asterisk dbuser = asterisk dbpass = yourpassword ;dbport = 3306 dbsock = /var/lib/mysql/mysql.sock [root@Aiur asterisk]# cat extconfig.conf ; ; Static and realtime external configuration ; engine configuration ; ; Please read doc/extconfig.txt for basic table ; formatting information. ; [settings] ; ; Static configuration files: ; ; file.conf => driver,database[,table] ; ; maps a particular configuration file to the given ; database driver, database and table (or uses the ; name of the file as the table if not specified) ; ;uncomment to load queues.conf via the odbc engine. ; ;queues.conf => odbc,asterisk,ast_config ; ; The following files CANNOT be loaded from Realtime storage: ; asterisk.conf ; extconfig.conf (this file) ; logger.conf ; ; Additionally, the following files cannot be loaded from ; Realtime storage unless the storage driver is loaded ; early using 'preload' statements in modules.conf: ; manager.conf ; cdr.conf ; rtp.conf ; ; ; Realtime configuration engine ; ; maps a particular family of realtime ; configuration to a given database driver, ; database and table (or uses the name of ; the family if the table is not specified ; ;example => odbc,asterisk,alttable ;example2 => ldap,"dc=oxymium,dc=net",example2 ; ;iaxusers => odbc,asterisk ;iaxpeers => odbc,asterisk ;sipusers => odbc,asterisk ;sippeers => odbc,asterisk ;voicemail => odbc,asterisk ;extensions => odbc,asterisk ;queues => odbc,asterisk ;queue_members => odbc,asterisk sippeers => mysql,asterisk,sip_peers sipusers => mysql,asterisk,sip_users iaxpeers => mysql,asterisk,iax_peers iaxusers => mysql,asterisk,iax_users queues => mysql,asterisk,queue_table queue_members => mysql,asterisk,queue_member_table voicemail => mysql,asterisk
== Parsing '/etc/asterisk/res_mysql.conf': [Mar 7 14:12:37] DEBUG[4380]: config.c:844 config_text_file_load: Parsing /etc/asterisk/res_mysql.conf Found [Mar 7 14:12:37] WARNING[4380]: res_config_mysql.c:555 parse_config: MySQL RealTime: No database host found, using localhost via socket. [Mar 7 14:12:37] WARNING[4380]: res_config_mysql.c:555 parse_config: MySQL RealTime: No database host found, using localhost via socket. [Mar 7 14:12:37] WARNING[4380]: res_config_mysql.c:569 parse_config: MySQL RealTime: No database port found, using 3306 as default. [Mar 7 14:12:37] WARNING[4380]: res_config_mysql.c:569 parse_config: MySQL RealTime: No database port found, using 3306 as default. [Mar 7 14:12:37] DEBUG[4380]: res_config_mysql.c:585 parse_config: MySQL RealTime Host: [Mar 7 14:12:37] DEBUG[4380]: res_config_mysql.c:586 parse_config: MySQL RealTime Port: 3306 [Mar 7 14:12:37] DEBUG[4380]: res_config_mysql.c:590 parse_config: MySQL RealTime User: asterisk [Mar 7 14:12:37] DEBUG[4380]: res_config_mysql.c:591 parse_config: MySQL RealTime Password: yourpassword [Mar 7 14:12:37] DEBUG[4380]: res_config_mysql.c:623 mysql_reconnect: MySQL RealTime: Successfully connected to database. [Mar 7 14:12:37] NOTICE[4380]: config.c:1174 ast_config_engine_register: Registered Config Engine mysql [Mar 7 14:12:37] NOTICE[4380]: config.c:1174 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so => (MySQL RealTime Configuration Driver) ------------------------------ Message: 5 Date: Thu, 01 Mar 2007 20:58:37 +0100 From: Philipp Kempgen <philipp.kempgen@amooma.de> Subject: Re: [asterisk-users] Asterisk Realtime To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com> Message-ID: <45E7306D.4080001@amooma.de> Content-Type: text/plain; charset=ISO-8859-15 Brian Capouch wrote:> Mike Hammett wrote: >> Could someone provide some steps for troubleshooting Realtime? I can't >> see any signs that it's working. I followed and double-checked a few >> different guides around the net, but haven't been able to figure it out. > > You don't say which version you're running. > > I *think* the syntax is the same for both: > > realtime <driver-name> status > > will show you the status. For postgres it's pgsql for driver name > (that's what I use). I think the other driver ids are mysql and odbc. > > If you don't see yourself connected, that's where to start.Or put console => notice,warning,error,verbose,debug in logger.conf / run asterisk -vvvvvvvvvvvvvvvvvvvdddddddddddddddddddc :) This will give you all MySQL queries and warnings. Regards, Philipp -- amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Let's use IT to solve problems and not to create new ones. Asterisk? -> http://www.das-asterisk-buch.de Geschdftsf|hrer: Stefan Wintermeyer Handelsregister: Neuwied B 14998 ------------------------------
I enabled some more detailed debugging and logging as per someone else a few posts ago and I saw that the permissions on MySQL were set incorrectly. I granted all, but what are the least permissions this user should need? How do I register to other servers? It seems to be ignoring the register statements in my iax.conf. --Mike =======================================All that looks fine. What do you get when you do "realtime mysql status?" The next areas to look at would be your DB configs, and debug status when you actually try to use one of the entries in your DB. . . I only use it for iaxpeers/users and extensions, so I can't comment much on its use with SIP or voicemail. B. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.