[Asterisk-Users] voicemail system

Orlando Guitián oguitian at msn.com
Mon Jun 20 20:49:19 MST 2005


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


>From: harry gaillac <gaillacharry at yahoo.fr>
>Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion 
><asterisk-users at lists.digium.com>
>To: Asterisk-Users at lists.digium.com
>Subject: [Asterisk-Users] voicemail system
>Date: Tue, 21 Jun 2005 00:51:48 +0200 (CEST)
>
>Hello,
>
>I wish to use asterisk as a voicemail server with ser
>.
>
>I want to use asterisk external configuration toHello,
>
>I wish to use asterisk as a voicemail server with ser
>.
>
>I want to use asterisk external configuration to
>manage users and storing voicemail messages according
>to ser database.
>
>Where can i find the schema of the SQL DB for
>voicemail accounts .
>for example in extconfig ; file.conf =>
>driver,database[,table]
>;voicemail => odbc,asterisk
>
>where is the schema of "asterisk" database ?
>
>which script retrieve values in db for voicemail.conf
>?
>
>Regards
>
>Harry
>
>
>
>
>
>
>///////////////////////////////////////////////////////
>
>A Voicemail table would look more like this:
>
>+----------+---------+----------+----------+-----------+---------------+
>| uniqueid | mailbox | context  | password |email
>|   fullname    |
>+----------+---------+----------+----------+-----------+---------------+
>|        1 |   1234  | default  |  4242    | a at b.com
>| Joe Schmoe    |
>+----------+---------+----------+----------+-----------+---------------+
>
>ODBC Storage allows you to store voicemail messages
>within a database
>instead of using a file.  This is *not* a full
>realtime engine and
>*only* supports ODBC.  The table description for the
>"voicemessages"
>table is as follows:
>
>+--------------+-------------+------+-----+---------+-------+
>| Field        | Type        | Null | Key | Default |
>Extra |
>+--------------+-------------+------+-----+---------+-------+
>| msgnum       | int(11)     | YES  |     | NULL    |
>      |
>| dir          | varchar(80) | YES  | MUL | NULL    |
>      |
>| context      | varchar(80) | YES  |     | NULL    |
>      |
>| macrocontext | varchar(80) | YES  |     | NULL    |
>      |
>| callerid     | varchar(40) | YES  |     | NULL    |
>      |
>| origtime     | varchar(40) | YES  |     | NULL    |
>      |
>| duration     | varchar(20) | YES  |     | NULL    |
>      |
>| recording    | longblob    | YES  |     | NULL    |
>      |
>+--------------+-------------+------+-----+---------+-------+
>
>
>
>
>manage users and storing voicemail messages according
>to ser database.
>
>Where can i find the schema of the SQL DB for
>voicemail accounts .
>for example in extconfig ; file.conf =>
>driver,database[,table]
>;voicemail => odbc,asterisk
>
>where is the schema of "asterisk" database ?
>
>which script retrieve values in db for voicemail.conf
>?
>
>Regards
>
>Harry
>
>
>
>
>
>
>///////////////////////////////////////////////////////
>
>A Voicemail table would look more like this:
>
>+----------+---------+----------+----------+-----------+---------------+
>| uniqueid | mailbox | context  | password |email
>|   fullname    |
>+----------+---------+----------+----------+-----------+---------------+
>|        1 |   1234  | default  |  4242    | a at b.com
>| Joe Schmoe    |
>+----------+---------+----------+----------+-----------+---------------+
>
>ODBC Storage allows you to store voicemail messages
>within a database
>instead of using a file.  This is *not* a full
>realtime engine and
>*only* supports ODBC.  The table description for the
>"voicemessages"
>table is as follows:
>
>+--------------+-------------+------+-----+---------+-------+
>| Field        | Type        | Null | Key | Default |
>Extra |
>+--------------+-------------+------+-----+---------+-------+
>| msgnum       | int(11)     | YES  |     | NULL    |
>      |
>| dir          | varchar(80) | YES  | MUL | NULL    |
>      |
>| context      | varchar(80) | YES  |     | NULL    |
>      |
>| macrocontext | varchar(80) | YES  |     | NULL    |
>      |
>| callerid     | varchar(40) | YES  |     | NULL    |
>      |
>| origtime     | varchar(40) | YES  |     | NULL    |
>      |
>| duration     | varchar(20) | YES  |     | NULL    |
>      |
>| recording    | longblob    | YES  |     | NULL    |
>      |
>+--------------+-------------+------+-----+---------+-------+
>
>
>
>
>
>
>
>
>
>
>___________________________________________________________________________
>Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
>Téléchargez cette version sur http://fr.messenger.yahoo.com
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list