[Asterisk-Dev] Third Party VoiceMail Interface

Ryan Tucker rtucker at netacc.net
Tue Oct 21 08:04:42 MST 2003


On Tue, 21 Oct 2003 10:32:45 +1000, <Jonathan.Hopper at kaz-group.com> wrote:
> We are trying to write a third party application to access the voicemail 
> on
> asterisk.  We are (for various reasons which we don't want to change)
> making a stand alone voicemail system, which allows you to call in and
> check your voicemail.  Asterisk will collect the voicemail, but to check
> the messages, asterisk will transfer the call to our extension.  Our
> application (running on a different machine and using separate telephony
> cards) will then deal with the call, and access the voicemail on 
> asterisk.

Rather strange, but whatever works ;-)

> The question is, how should we get access to the asterisk voicemail
> archive?  Is there a standard interface (VPIM has been floated), do we 
> just
> interact directly with the file structure, and ignore asterisk 
> altogether,
> or is there some sort of API that can give us access to the messages?

Accessing the filesystem will probably be the easiest way.  Being mindful 
of licensing concerns, you may wish to examine the voicemail2 code for 
ideas of how that's done.  Or, just rummage around in /var/spool/asterisk 
and see what's there.

>  We want to do things like:
> Play messages from various mailboxes

Easy enough.  They're usually stored in .wav and .gsm format.  Take a look 
at the .txt file for various metadata.

> Validate passwords

A little tougher.  The passwords are stored in voicemail.conf.  -or-, you 
could answer the call on the Asterisk side, do validation over there using 
the Authenticate application, and then transfer it over.

> Delete messages
> Move messages between boxes.

Both of these are simple filesystem operations.

Be mindful of creating "holes" -- the current voicemail system will 
sometimes create holes if message retrieval is occuring while someone 
leaves a message.  Smarts to work around this will make your mornings much 
less annoying.

> Configure the mailbox (greeting message, time-outs etc)

Greetings are in the user's mailbox directory.  Time outs are configured 
as part of the Dial command in extensions.conf -- e.g. you dial the 
extension with an x second timeout, and then after that times out, go to 
voicemail.

We're working around the timeout configuration stuff by moving most of the 
extension handling to AGI.  But, once you do that, you might as well write 
your own voicemail saving system as well, in AGI or otherwise.  -rt

-- 
Ryan Tucker
Network Engineer
NetAccess, Inc.
1159 Pittsford-Victor Road
Bldg. 5, Suite 140
Pittsford, New York 14534
585-419-8200
www.netacc.net



More information about the asterisk-dev mailing list