[asterisk-users] Asterisk Realtime... Help Me!!!

Tijl Van den Broeck subspawn at gmail.com
Fri Oct 20 04:46:04 MST 2006


I'm having the same issue overhere with a nearly identical config:

res_odbc.conf:
[mysql2]
enabled => yes
dsn => MySQL-asterisk
username => asterisk
password => asterisk
pre-connect => yes

extconfig.conf
[settings]
sipusers => odbc,MySQL-asterisk,sip_buddies
sippeers => odbc,MySQL-asterisk,sip_buddies

sip_buddies is identical to what is described at
http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip

+----+------+-------------+----------+-----------+-----------------------+-------------+------------+-----------+----------+----------+------------+-------------+---------+----------+----------+---------+-----------+-----+------+--------+------+-------------+------+---------+-------------+------------+----------------+--------+--------+----------+----------+-------+-------------+------------+--------+----------+----------------+--------+
| id | name | accountcode | amaflags | callgroup | callerid
  | canreinvite | context    | defaultip | dtmfmode | fromuser |
fromdomain | fullcontact | host    | insecure | language | mailbox |
md5secret | nat | deny | permit | mask | pickupgroup | port | qualify
| restrictcid | rtptimeout | rtpholdtimeout | secret | type   |
username | disallow | allow | musiconhold | regseconds | ipaddr |
regexten | cancallforward | setvar |
+----+------+-------------+----------+-----------+-----------------------+-------------+------------+-----------+----------+----------+------------+-------------+---------+----------+----------+---------+-----------+-----+------+--------+------+-------------+------+---------+-------------+------------+----------------+--------+--------+----------+----------+-------+-------------+------------+--------+----------+----------------+--------+
|  1 | 1006 | NULL        | NULL     | 2         | Test account <1006>
| no          | ciscophone | NULL      | NULL     | NULL     | NULL
   | NULL        | dynamic | NULL     | NULL     | NULL    | NULL
| no  | NULL | NULL   | NULL | 2           |      | NULL    | NULL
   | NULL       | NULL           | 1234   | friend | 1006     | all
  | alaw  | NULL        |          0 |        |          | yes
   |        |
+----+------+-------------+----------+-----------+-----------------------+-------------+------------+-----------+----------+----------+------------+-------------+---------+----------+----------+---------+-----------+-----+------+--------+------+-------------+------+---------+-------------+------------+----------------+--------+--------+----------+----------+-------+-------------+------------+--------+----------+----------------+--------+

modules.conf includes:
preload => res_odbc.so
preload => res_config_odbc.so


When I execute "odbc show", I can see a query coming in from asterisk
in the mysql query log, thus the odbc connection & mysql work.
061020 13:25:47      10 Connect     asterisk at localhost on asterisk
061020 13:27:03      10 Query       select 1

Other than that, I have the same problem as Maurizio Pederneschi.

*CLI> realtime load sipusers username 1006
No rows found matching search criteria.

Same DB problem occurs when I register the 1006 phone:
*CLI> Oct 20 13:29:58 NOTICE[32135]: chan_sip.c:11084
handle_request_register: Registration from '<sip:1006 at 172.16.5.104>'
failed for '172.16.5.206' - Username/auth name mismatch
At that time I see no incoming query whatsoever passing in the MySQL log.

I'm running debian/unstable asterisk package 1.2.12.1.dfsg-1. Perhaps
it is a problem with just this release?

greetings

Tijl Van den Broeck



On 10/20/06, Maurizio Pederneschi <maury76 at rita.it> wrote:
> These are my conf file:
>
> res_odbc.conf
>
> ;;; odbc setup file
>
> ; ENV is a global set of environmental variables that will get set.
> ; Note that all environmental variables can be seen by all connections,
> ; so you can't have different values for different connections.
> [ENV]
> INFORMIXSERVER => my_special_database
> INFORMIXDIR => /opt/informix
>
> ; All other sections are arbitrary names for database connections.
>
> ;[asterisk]
> ;enabled => yes
> ;dsn => asterisk
> ;;username => myuser
> ;;password => mypass
> ;pre-connect => yes
>
>
> [mysql]
> enabled => yes
> dsn => MySQL-asterisk
> username => root
> password =>
> pre-connect => yes
>
> ----------------------------------------------------------------------------
> -------------
>
> extconfig.conf
>
> ;
> ; Static and realtime external configuration
> ; engine configuration
> ;
> ; Please read doc/README.extconfig 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
> ;iaxusers => odbc,asterisk
> ;iaxpeers => odbc,asterisk
> sipusers => odbc,asterisk,sipusers
> ;sippeers => odbc,asterisk
> voicemail => odbc,asterisk
> ;extensions => odbc,asterisk
> ;queues => odbc,asterisk
> ;queue_members => odbc,asterisk
> extensions => odbc,asterisk,extensions
>
> ----------------------------------------------------------------------------
> ------------------------------------
>
> This is my table sipusers
>
>
> | id | name         | username     | context  | host    | port | secret   |
> allow                   | ipaddr | type   | password |
> |  1 | pippo        | pippo        | tutorial | dynamic |      | password |
> g729;ilbc;gsm;ulaw;alaw | NULL   | friend | password |
> |  2 | testAsterisk | testAsterisk | tutorial | dynamic |      | password |
> g729;ilbc;gsm;ulaw;alaw | NULL   | friend | password |
>
> ----------------------------------------------------------------------------
> ----------------------------------------
>
> This is the output of the "realtime load" command:
>
> realtime load sipusers name pippo
> No rows found matching search criteria.
>
> Thank's
> Maury
>
> ----- Original Message -----
> From: "Benjamin Jacob" <benjamin.jacob at masconit.com>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion"
> <asterisk-users at lists.digium.com>
> Sent: Friday, October 20, 2006 12:39 PM
> Subject: Re: [asterisk-users] Asterisk Realtime... Help Me!!!
>
>
> > Maurizio Pederneschi wrote:
> >
> > > Hi,
> > >
> > > i have implemented Asterisk Realtime architecture with Odbc and MySql
> > > DB. I have followed all the step of the documentation I found on the
> > > Internet.
> > >
> > > On the CLI, if I make "odbc show" I see that the DB connection is
> > > "UP", but if I make "realtime load <family> <column> <value>" both
> > > with extensions family or with sipusers family, I can't find anything
> > > in the db.
> > > Why it happens? What can I check in my configuration?
> > > Someone know if there is a way to test if asterisk make effectively
> > > the query to the DB when I make the "realtime load" command?
> > >
> > > Please, help me!
> > >
> > > Maury
> > >
> > >------------------------------------------------------------------------
> > >
> > >_______________________________________________
> > >--Bandwidth and Colocation provided by Easynews.com --
> > >
> > >asterisk-users mailing list
> > >To UNSUBSCRIBE or update options visit:
> > >   http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> > >
> > paste your relevant config files and also an example command (realtime
> > load etc) that you are using.
> >
> > also.. if u can.. turn on logging(DEBUG) in logger.conf, or better
> > still, go change the code n put in ur own debug lines
> > duznt take too long to figure out where u r going wrong.
> >
> >  - Ben
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>


More information about the asterisk-users mailing list