Asterisk using the database configuration method

Source: Internet
Author: User
Tags dsn ini odbc


1, install UnixODBC unixodbc-devel Libtool-ltdl Libtool-ltdl-devel, in order to enable asterisk support database storage (must be installed first)

2. Install MySQL and set up C_include_path and Ld_library_path

3, download the new version of Asterisk (asterisk-11-current.tar.gz) from Http://

4. Copy and unzip.

5, enter the extracted directory asterisk-11.2.1, execute./configure

6. Perform make MenuSelect Select the component to follow

7. Execute make

8. Execute make Install

9. Execute Make Samples

10. Install MySQL

11, Installation mysql-connector-odbc-5.1.12-1.rhel5.x86_64.rpm

Configure ODBC



Description = ODBC for MySQL

Driver =/usr/lib64/

Setup =/usr/lib64/

FileUsage = 1



Description = MySQL connection to ' asterisk ' database

Driver = MySQL

Database = asterisk

Server = localhost

UserName = asterisk

Password = asterisk

Port = 3306

Socket =/tmp/mysql.sock

Configuration asterisk:

1, modules.conf


preload =

preload =

2, extconfig.conf

Sipusers = Odbc,asterisk,sippeers

Sippeers = Odbc,asterisk,sippeers

3, res_odbc.conf


Enabled = Yes

DSN = asterisk

Username = asterisk

Password = asterisk

Pre-Connect = yes

Limit = 5

4, http.conf







5, manager.conf


Enabled = Yes

webenabled = yes

Port = 5038



Secret = admin

Read = System,call,log,verbose,command,agent,config,read,write,originate

Write = System,call,log,verbose,command,agent,config,read,write,originate






6, extensions.conf


Exten = _xxx,1,dial (sip/${exten},60)

7, sip.conf (Support video)





Configuration database:

1. Build the asterisk library and build the table with the SQL script provided in the asterisk installation package


2, establish user asterisk, and grant the operation permission of Asterisk library

3. Set up user data in the Sippeers table

ID name regseconds DefaultUser host type context secret

1 101 0 101 dynamic friend From-sip 101

2 102 0 102 dynamic friend From-sip 102

After configuring the above information, start by ASTERISK-VVVC mode

You can talk to each other using the Eyebeam client.

Web mode management asterisk:

Asterisk can be managed through Http://

ODBC status can be viewed through CLI commands term Code vm-108*cli> ODBC show ODBC DSN Settings-----------------Name:asterisk Dsn:asterisk last connection attempt:1970-01-01 08:00:00 Pooled:no connected:yes

HTTP service status can be viewed through CLI commands term code   vm-108*cli> http show status   http server  status:   prefix: /asterisk   server enabled and bound to      Enabled uri ' s:  /asterisk/httpstatus =>  asterisk http general status  /asterisk/phoneprov/... => asterisk  http phone provisioning tool  /asterisk/amanager => html manager  Event Interface w/Digest authentication  /asterisk/arawman => raw  HTTP Manager Event Interface w/Digest authentication  /asterisk/ manager => html manager event interface  /asterisk/rawman =>  Raw HTTP Manager Event Interface  /asterisk/static/... =>  Asterisk http&nbsP static delivery  /asterisk/amxml => xml manager event interface  w/Digest authentication  /asterisk/mxml => xml manager event  interface  /asterisk/ws => asterisk http websocket      enabled redirects:     None.  

The whole configuration process is complicated, and the main reference is Asterisk.The.Definitive.Guide


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.