Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8759089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:42:50+00:00 2026-06-13T14:42:50+00:00

Problems: I am using AsteriskNow which running asterisk 2.0 server in VirtualBox. And i

  • 0

Problems: I am using AsteriskNow which running asterisk 2.0 server in VirtualBox. And i want to connect Asterisk with MySQL databases using ODBC modules. But it fails. When i started with asterisk*CLI> odbc show The command prompt shows that “No such command ODBC SHOW”

My Objectives: configure ODBC in asterisk to access MySQL from Asterisk’s dialplan directly and dynamically.

What i did: I installed my AsteriskNow in VirtualBox. The version of asterisk is 2.0, the CentOS version 5.8 final. I firstly installed related Linux RPMs by

yum -y install unixODBC-devel
yum -y install libdbi-dbd-mysql
yum -y install mysql-connector-odbc

My detail configured files are as follows:

/etc/odbc.ini

[asterisk-connector]
Description           = MySQL connection to 'asterisk' database
Driver                = MySQL
Database              = asterisk
Server                = localhost
UserName              = root        
Password              = mypassword
Port                  = 3306
Socket                = /var/lib/mysql/mysql.sock

/etc/odbcinst.ini

# Driver from the mysql-connector-odbc package
# Setup from the unixODBC-libs package
[MySQL]
Description = ODBC for MySQL
Driver      = /usr/lib/libmyodbc3_r.so
Setup       = /usr/lib/libodbcmyS.so
;Driver64   = /usr/lib64/libmyodbc3_r.so
;Setup64        = /usr/lib64/libodbcmyS.so
FileUsage   = 1

/etc/asterisk/res_odbc.conf

[asterisk]
enabled=>yes
dsn=>asterisk-connector
;dsn=>asterisk
username=>root
password=>mypassword
pooling=>no
limit=>0
pre-connect=>yes

When i used “isql” command to connect MySQL databases, it works fine
enter image description here

But when i started the console in CLI, input command odbc show . it shows No SUCH COMMAND “odbc show “

enter image description here

And i am confusing here, and do not know how to solve it. I googled it and find someone recommend to solve it by having the res_odbc.so module loaded. Thus i went through the file modules.conf and add those modification into files

autoload=yes
preload => res_odbc.so
preload => res_config_odbc.so

After being modified, the complete file is as follow”
/etc/asterisk/modules

;
; Asterisk Module Loader configuration file
;
;

[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger has been initialized) can be loaded
; using 'preload'. This will frequently be needed if you wish to map all
; module configuration files into Realtime storage, since the Realtime
; driver will need to be loaded before the modules using those configuration
; files are initialized.
;
; An example of loading ODBC support would be:
preload => res_odbc.so
preload => res_config_odbc.so
;
; As FreePBX is using Local as the channel for queue members we need to make sure
; that pbx_config.so and chan_local.so are preloaded. If not, queue members
; will be marked as invalid until app_queue is reloaded. 
preload => pbx_config.so
preload => chan_local.so
;
; Uncomment the following if you wish to use the Speech Recognition API
;preload => res_speech.so
;
; If you want, load the GTK console right away.  
; KDE console is obsolete and was removed from Asterisk 2008-01-10
;
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
;
; Intercom application is obsoleted by
; chan_oss.  Don't load it.
;
noload => app_intercom.so
;
; DON'T load the chan_modem.so, as they are obsolete in * 1.2

noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so

; Trunkisavail is a broken module supplied by Trixbox
noload => app_trunkisavail.so

; Ensure that format_* modules are loaded before res_musiconhold
;load => format_ogg_vorbis.so
load => format_wav.so
load => format_pcm.so

; format_au.so is removed from Asterisk 1.4 and later, remove ; to enable
;load => format_au.so

; This isn't part of 'Asterisk' iteslf, it's part of asterisk-addons. If this isn't
; installed, asterisk will fail to start. But it does need to go here for native MOH
; to work using mp3's. 
;   Note that on a system with a high number of calls, using a compressed audio format for
;   musiconhold takes CPU resources. Converting these files to ulaw/alaw makes the job
;   much easier for your CPU.
load => format_mp3.so
load => res_musiconhold.so
;
; Load either OSS or ALSA, not both
; By default, load no console driver
;
noload => chan_alsa.so
noload => chan_oss.so
;
noload => app_directory_odbcstorage.so 
noload => app_voicemail_odbcstorage.so 

After did this, i went back the CLI console to reload the res_odbc.so. But it failed to find the res_odbc.so
enter image description here

I need someone give me hints on solving the ODBC connections problems.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:42:51+00:00Added an answer on June 13, 2026 at 2:42 pm

    In the AsteriskNOW environment, to get res_odbc.so, which is the module that provides the ODBC resource to Asterisk, you need to have the asterisk-odbc package installed.

    (Depending on how your AsteriskNOW installation is configured with respect to the packages.asterisk.org repositories, you may need asterisk18-odbc or a similar versioned package instead.)

    If you have res_odbc.so (check in /usr/lib/asterisk/modules for this file) and it is still not loading correctly, you should check the Asterisk logs in /var/log/asterisk for messages relating to res_odbc for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problems using Mysql with MySQL Connector, I can successfully connect to a
I'm running into some problems using my .NET 4.0 libraries in .NET 2.0 applications.
I'm having some problems while using PDO. It all seems correct but I am
I´m having problems using VichUploaderBundle. Uploads files correctly, but when I write <td><img src=<img
I'm having problems using Hibernate and SQL Server 2008. When I try to save
I'm having problems using conditional ORDER BYs. I want to do something like this
i'm running into problems using DIV's to style a contentbox for my website. It
I'm facing some problems using CDATA blocks inside h:outputscripts with MyFaces 2.0... but I
I have some problems using ajax with Spring MVC. I want to refresh only
I'm running into problems using macruby with ActiveRecord (w/ sqlite3) or Sequel . Any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.