[Asterisk-Dev] Gentoo unixODBC + MyODBC + MySQL + Asterisk CVS problems....

Nicholas Wong nwong at kancharla.com
Thu Jun 9 04:04:13 MST 2005

I'm just getting into modifying asterisk a bit and I can't seem to get
it to accept calls.

I wasn't sure which list to post this to, but I'm a developer and I'm
having a strange problem with my install. If this is against etiquite,
let me know.

I'm running:
Gentoo 2005.0 kernel 2.6.11 (gentoo sources)
unixODBC 2.2.6 (by emerge)
MyODBC 3.5.11 (by emerge)
MySQL 4.1.12 (by emerge)
Asterisk CVS

Using odbctest I was able to do a full connect to the mysql database and
run a few commands with success results.

I have a numer set to go to this box through the main server, and that
appears to be working as well; however, when I dial the number assigned
to this box, I get this in the asterisk console.

Jun  9 10:16:05 WARNING[15102]: res_config_odbc.c:72 realtime_odbc: SQL
Alloc Handle failed!
Jun  9 10:16:05 WARNING[15102]: res_config_odbc.c:219
realtime_multi_odbc: SQL Alloc Handle failed!

and this in the /var/log/asterisk/messages file:

Jun  9 10:35:14 WARNING[15205] res_config_odbc.c: SQL Alloc Handle failed!

The error code that SQLAllocHandle() is returning is -2, which is listed
as SQL_INVALID_HANDLE. However, when Asterisk starts up, the console
shows this:

Jun  9 10:35:06 NOTICE[15192]: res_odbc.c:215 load_odbc_config:
registered database handle 'asterisk' dsn->[asterisk]

When I force a sanity check in the fetch_odbc_obj(database, 0); above by
setting 1, the connection isn't active and it attempts a reconnect.

Jun  9 11:02:05 WARNING[17805]: chan_sip.c:1612 create_addr: No such
host: 73518
Jun  9 11:02:05 NOTICE[17805]: app_dial.c:977 dial_exec_full: Unable to
create channel of type 'SIP' (cause 3)
Jun  9 11:02:05 WARNING[17805]: res_odbc.c:95 odbc_smart_execute: SQL
Execute error! Attempting a reconnect...
Jun  9 11:02:05 WARNING[17805]: res_odbc.c:416 odbc_obj_disconnect:
res_odbc: disconnected 0 from asterisk [asterisk]
Jun  9 11:02:05 NOTICE[17805]: res_odbc.c:473 odbc_obj_connect:
Connecting asterisk
Jun  9 11:02:05 NOTICE[17791]: channel.c:1884 set_format: Unable to find
a path from g729 to ulaw
Jun  9 11:02:05 NOTICE[17791]: channel.c:1884 set_format: Unable to find
a path from g729 to ulaw
Jun  9 11:02:05 NOTICE[17805]: res_odbc.c:488 odbc_obj_connect:
res_odbc: Connected to asterisk [asterisk]
Jun  9 11:02:05 WARNING[17805]: res_config_odbc.c:108 realtime_odbc: SQL
Execute error!
[SELECT * FROM voicemail WHERE mailbox = ? AND context = ?]

Jun  9 11:02:05 WARNING[17805]: app_voicemail.c:2252 leave_voicemail: No
entry in voicemail config file for '<my number>'

I really doubt this is supposed to happen every time I dial this number.

No one else here has any idea why that would happen. Anyone know what
would cause this? I'm pretty confident the conf files are correct. I've
compared them to a running server we have.

As a side note, is there a prefered IDE? I'm partial to Eclipse/CDT.

Nick Wong

More information about the asterisk-dev mailing list