login | register
Fri 04 of Jul, 2008 [20:05 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Samuel, Thu 03 of Jul, 2008 [13:41 UTC]: ok thank you
  • Mats Karlsson, Thu 03 of Jul, 2008 [13:37 UTC]: Nice Samuel, will look forward to rad it.
  • bwl_fernstudent, Thu 03 of Jul, 2008 [09:08 UTC]: Your blog shows some usefull code
  • Samuel, Thu 03 of Jul, 2008 [08:04 UTC]: I'll translate it, for sure
  • Mats Karlsson, Wed 02 of Jul, 2008 [20:46 UTC]: LOL, in french! Translate it to English and I will read it.
  • Samuel, Wed 02 of Jul, 2008 [08:07 UTC]: Hello, i wrote a blog about Asterisk, speaking about installation,programming and more http://sambranche.blogspot.com/
  • Nick Barnes, Tue 01 of Jul, 2008 [17:46 UTC]: Steve - Asterisk doesn't 'fit into linux' - it's an application which runs on top of Linux.
  • Steve, Mon 30 of Jun, 2008 [18:07 UTC]: anyone know where I can find a block diagram of how asterisk fits into linux. my f'ing bosses want me to draw something up.. ugh.
  • akbar, Fri 27 of Jun, 2008 [10:37 UTC]: marley_boyz@yahoo.com how to configure call forward, call back, call pick up using TDM and asterisk 1.2.13... please help me.. thx...
  • Matthew Williams, Tue 24 of Jun, 2008 [22:37 UTC]: We are looking for Tier II VoIP Support Technicians in St Louis. Send resumes to mwilliams AT voxitas DOT com.
Server Stats
  • Execution time: 0.26s
  • Memory usage: 2.62MB
  • Database queries: 30
  • GZIP: Disabled
  • Server load: 1.89

Asterisk voicemail database

Database support in voicemail


NOTE: This is the old way of configuring voicemail users via a database, and will soon be obsoleted by the new asterisk realtime architecture (ARA) - see Asterisk RealTime. As of cvs stable release 1.0.7, realtime configuration is not available, it is currently only found in CVS-Head. This does not store the voicemail files, only the voicemail configuration. See also Asterisk Voicemail ODBC storage



The Asterisk voicemail system, comedian mail, supports configuration of mailboxes in a database. Voicemail supports both Postgres and MySQL databases. Work is going on to make it support UnixODBC.

This means:
  • All voicemail user configurations will be read dynamically from database
  • Users can change their voicemail passwords from inside voicemail or using a simple web-based UI

1. Download

Note that the MySQL support has been moved to asterisk-addons due to MySQL changing the licensing of their libraries to full GPL.

cd /usr/src
export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
cvs login - the password is anoncvs.
cvs checkout asterisk-addons

2. Compile

cp asterisk-addons/mysql-vm-routines.h asterisk-0.7.2/apps
cd asterisk-0.7.2
vi apps/Makefile +14
USE_MYSQL_VM_INTERFACE=1
make clean
make
make install

3. Configure in voicemail.conf

for mysql use:
In the [general] section in voicemail.conf specify

dbuser=username
dbpass=password
dbhost=localhost
dbname=asterisk_vm

for postgresql use:
in [general]:

dboption=dbname=asterisk user=USERNAME password=PASSWORD


4. Configure database

Create a database (e.g. 'asterisk_vm') & a user which can access it (needs to have write access for password changes from inside VM).

For mysql table has to be called 'users' (hardcoded in .h file)

CREATE TABLE users (
   context char(79) DEFAULT '' NOT NULL,
   mailbox char(79) DEFAULT '' NOT NULL,
   password char(79) DEFAULT '' NOT NULL,
   fullname char(79) DEFAULT '' NOT NULL,
   email char(79) DEFAULT '' NOT NULL,
   pager char(79) DEFAULT '' NOT NULL,
   options char(159) DEFAULT '' NOT NULL,
   stamp timestamp,
   PRIMARY KEY (context,mailbox)
);

For postgres table has to be called 'voicemail'

CREATE TABLE voicemail (
   context varchar(79) DEFAULT '' NOT NULL,
   mailbox varchar(79) DEFAULT '' NOT NULL,
   password varchar(79) DEFAULT '' NOT NULL,
   fullname varchar(79) DEFAULT '' NOT NULL,
   email varchar(79) DEFAULT '' NOT NULL,
   pager varchar(79) DEFAULT '' NOT NULL,
   options varchar(159) DEFAULT '' NOT NULL,
   stamp timestamp,
   PRIMARY KEY (context,mailbox)
);

Note that context refers to the Mailbox context, not extension context)
Note that the password is stored in plain text

See also


Created by oej, Last modification by flobi on Tue 06 of Sep, 2005 [15:17 UTC]

Comments Filter

voicemail only say "beep"

by tecnoxarxa on Friday 02 of March, 2007 [15:53:16 UTC]
All work fine, but now, voicemail only say "beep"

Any option for say automatic message for busy or others status ?

Realtime Voicemail and vmail.cgi

by Fídias Augusto Machado Teixeira on Friday 17 of February, 2006 [12:19:01 UTC]
I have configured all the Realtime voicemail and it´s working fine, but I also used vmail.cgi and now it´s not accepting authentication, do I have to change anything in the cgi file or voicemail.conf so it could work ?

voicemail on and off

by edwig on Wednesday 09 of February, 2005 [16:32:19 UTC]
Is there also an option to let the user switch voicemail on and off?
Edit

Can this work with MWI?

by Anonymous on Wednesday 02 of February, 2005 [01:48:59 UTC]
How can I use MWI with database based voicemail config and mysql sipfriends?
Edit

Re: Postgresql config

by Anonymous on Wednesday 21 of July, 2004 [20:26:47 UTC]
There is an error in the schema above. Please remove the NOT NULL clause from the pager column. Also, I recommend renaming the primary key index to voicemail_pk, though you may choose any name you like.
Edit

Postgresql config

by Anonymous on Thursday 24 of June, 2004 [17:22:16 UTC]
Here is the schema for the table in postgresql:

CREATE TABLE public.voicemail
(
 context varchar(79) NOT NULL,
 mailbox varchar(79) NOT NULL,
 password varchar(79) NOT NULL,
 fullname varchar(79) NOT NULL,
 email varchar(79) NOT NULL,
 pager varchar(79) NOT NULL,
 options varchar(159),
 stamp timestamp,
 CONSTRAINT users_pk PRIMARY KEY (context, mailbox)
) WITHOUT OIDS;

Make sure the user asterisk uses to login with has rights to read the table.

To connect to the db, use the dboption keyword in the general section:
dboption=dbname=asteriskdb user=asteriskuser password=asteriskpw host=localhost port=5432

David
dfilion@dotality.com
Edit

module won't load

by Anonymous on Wednesday 02 of June, 2004 [02:12:07 UTC]
I followed the instructions, however, when asterisk comes up it
can't load the voicemail app. From /var/log/asterisk/messages:
Jun 1 19:03:13 WARNING16384: app_voicemail.so: load_module failed, returning -1
Jun 1 19:03:13 WARNING16384: Loading module app_voicemail.so failed!


When someone goes to Voicemail and tries to log in, ASTERISK DIES
immediately and with no messages w/o regard to the verbose setting.

Note: I did a make clean; make; make install. The make date on the .so in question is just before the asterisk binary.

How can I debug this or fix it? I had to return to non-sql so this would stay up... since it's a production box... but I can test on evenings.

Thanks

Ehud
gavron@wetwork.net

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver