Ronnie Earle
2003-Jul-23 09:34 UTC
[Asterisk-Users] Asterisk as a stand alone voice mail server
I'm sure asterisk would make a great stand alone voice mail server. Basically I want to get rid of our voice mail system and replace it with *, but the problem is we use a cisco cluster with skinny clients. So I was thinking the way to contact a * server, would be through our 3640. But so far any attempt has failed. I am wondering if anyone has done something similar. Just want to verify the idea is sound. Please keep in mind I just heard of * a few days ago and don't know much about it. Though it seems pretty easy to use. At least configuring a couple clients was not that tough. Thanks to John Todd for his easy to follow guide at www.onlamp.com. Anyone with something similar? if so some info on what you did would help a lot. Thanks all, Ron E.
Troy Settle
2003-Jul-23 12:24 UTC
[Asterisk-Users] Asterisk as a stand alone voice mail server
Funny. I just subscribed to this list to ask the exact same question. The application I have in mind though, would be a little more intense. What I would like to create, is a unified messaging center for voice, fax, and follow-me service (home, office, cell, pager). -- Troy Settle Pulaski Networks http://www.psknet.com 540.994.4254 ~ 866.477.5638 Pulaski Chamber 2002 Small Business Of The Year> -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of > Ronnie Earle > Sent: Wednesday, July 23, 2003 12:35 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] Asterisk as a stand alone voice mail server > > I'm sure asterisk would make a great stand alone voice mail server. > Basically I want to get rid of our voice mail system and > replace it with > *, but the problem is we use a cisco cluster with skinny clients. So I > was thinking the way to contact a * server, would be through our 3640. > But so far any attempt has failed. I am wondering if anyone has done > something similar. Just want to verify the idea is sound. > Please keep in > mind I just heard of * a few days ago and don't know much about it. > Though it seems pretty easy to use. At least configuring a couple > clients was not that tough. Thanks to John Todd for his easy to follow > guide at www.onlamp.com. > > Anyone with something similar? if so some info on what you did would > help a lot. > > Thanks all, > > Ron E. > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
John Todd
2003-Jul-23 16:53 UTC
[Asterisk-Users] Asterisk as a stand alone voice mail server
The downside right now to using Asterisk as a VM server is that there is no "easy" way to get message waiting indications back into your upstream PBX platform so that message waiting lights work as expected. I posted the spec for SMDI (Bellcore spec TSR-TSY-000283) on the 13th of last month (http://lists.digium.com/pipermail/asterisk-dev/2003-June/000884.html) if anyone wants to take up the flag and start writing code. I see that SMDI is supported by Cisco Call Manager (at least, in >v3.0 that I've found) but I don't know if they support it _inbound_ and if it's TCP or serial or what. I have not done any research on Cisco's implementation. It does not appear that writing an SMDI interface for Asterisk would be of great difficulty, so if Cisco supports the standard, it would be a day or two of work by a clever programmer to get a module together. Other than that "gotcha", Asterisk works quite well as a voicemail server. There are some quirks to the existing Voicemail and Voicemail2 applications, but if you find bugs they are (usually) fixed quickly. Shortly, the envelope functions should be in place which are the last remaining pieces that are "basic" functionality that is expected to work in a voicemail system but is currently missing. ("Message one received at three fifty two pm july tenth") I would strongly suggest that your VM access be via IP or PRI channels; using analog channels is certainly possible, but not desirable if you have other options.>I'm sure asterisk would make a great stand alone voice mail server. >Basically I want to get rid of our voice mail system and replace it with >*, but the problem is we use a cisco cluster with skinny clients. So I >was thinking the way to contact a * server, would be through our 3640. >But so far any attempt has failed. I am wondering if anyone has done >something similar. Just want to verify the idea is sound. Please keep in >mind I just heard of * a few days ago and don't know much about it. >Though it seems pretty easy to use. At least configuring a couple >clients was not that tough. Thanks to John Todd for his easy to follow >guide at www.onlamp.com.Yer welcome.>Anyone with something similar? if so some info on what you did would >help a lot. > >Thanks all, > >Ron E.JT
Siggi Langauf
2003-Jul-24 15:40 UTC
[Asterisk-Users] Asterisk as a stand alone voice mail server
On Wed, 23 Jul 2003, Ronnie Earle wrote:> I'm sure asterisk would make a great stand alone voice mail server. > Basically I want to get rid of our voice mail system and replace it with > *, but the problem is we use a cisco cluster with skinny clients. So I > was thinking the way to contact a * server, would be through our 3640. > But so far any attempt has failed. I am wondering if anyone has done > something similar. Just want to verify the idea is sound. Please keep in > mind I just heard of * a few days ago and don't know much about it. > Though it seems pretty easy to use. At least configuring a couple > clients was not that tough. Thanks to John Todd for his easy to follow > guide at www.onlamp.com. > > Anyone with something similar? if so some info on what you did would > help a lot.Yup, I'm currently running such a system. Right now only ~10 test mailboxes, but planned to be deployed for a medium-sized (~250) user base. We're running Cisco CallManager 3.3 with Cisco 7940 and 7960 Skinny phones. * is registered to the CallManager as an H.323 gateway (using the chan_oh323 driver, chan_h323 didn't work with the Cisco cluster). This setup seems to work fine so far, even though * drops calls that are put on hold, and it has slightly worse jitter than a hard gateway. Moreover, * can be (ab)used to gateway calls from CCM via IAX, SIP, MGP or even analog or ISDN zaptel lines. That gives you nice options of linking to all known other VoIP systems... Currently, the biggest challenge is a sane menu-driven voicemail interface on the Cisco phones (via XML service, as our users dislike the idea of IVR menus). I got that somehow working, but in the current prototype, you have to dial into a pseudo extension on * in order to be able to play something through the phone, which is quite ugly... Other minor wishlist items include: German voicemail prompts, Message Waiting indicator on the phone, IMAP based voicemail storage (so you can access voicemail via MUA, Web interface, XML Service or IVR menu without getting message spools out of sync) I guess I could wrap up a set of patches and a few PHP scripts by next week, if anybody is interested. Cheers, Siggi
Dave Packham
2003-Jul-24 15:45 UTC
[Asterisk-Users] Asterisk as a stand alone voice mail server
I would like to see your code... sounds great Dave
Siggi Langauf
2003-Aug-08 08:43 UTC
[Asterisk-Users] Asterisk as a stand alone voice mail server
Hi again, struggling with localization issues (so the script is not "German only") took me a week longer than expected. (Did anybody ever get PHP's gettext extension working??) But finally, I've wrapped something up: On Thu, 24 Jul 2003, Dave Packham wrote:> I would like to see your code... > > sounds greatWell, don't expect too much! I've wrapped up an archive along with some elementary documentation. You can download it from http://swt.uni-stuttgart.de/~langausd/asterisk/ You will need something like the attached patch, so app_voicemail2 writes files in a way that allows PHP to read them. If I ever understand how to add config options to asterisk applications, I'll do it properly... Note that I don't even have a proper name for the project, yet. (suggestions are welcome!) Due to the early stage of the project, I haven't really shipped it with any usable license. If anybody really wants to use this now: please contact me off-list! (It will probably be something like BSD Artistic license if it ever becomes a real project...) Otherwise: feel free to test this stuff, and rip out what you want! (The only exception is: cisco-xmlapi.inc.php Please don't distribute that as-is. I'm currently revising the whole API...) Cheers, Siggi -------------- next part -------------- Index: apps/app_voicemail2.c ==================================================================RCS file: /usr/cvsroot/asterisk/apps/app_voicemail2.c,v retrieving revision 1.35 diff -u -r1.35 app_voicemail2.c --- apps/app_voicemail2.c 2 Aug 2003 21:10:06 -0000 1.35 +++ apps/app_voicemail2.c 8 Aug 2003 15:55:52 -0000 @@ -58,6 +58,23 @@ #define BASEMAXINLINE 256 #define BASELINELEN 72 +<<<<<<< app_voicemail2.c + +/*############################################*/ +/* MOVE THIS TO CONFIG FILE ASAP! */ +/*############################################*/ +#define FSYS_USER 0 +#define FSYS_GROUP 33 /* www-data */ +#define FILE_MODE 0660 +#define DIR_MODE 0770 + + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +======+>>>>>>> 1.35 #define BASEMAXINLINE 256 #define eol "\r\n" @@ -810,7 +827,7 @@ if (maxtime) time(&start); for (x=0;x<fmtcnt;x++) { - others[x] = ast_writefile(recordfile, sfmt[x], comment, O_TRUNC, 0, 0700); + others[x] = ast_writefile(recordfile, sfmt[x], comment, O_TRUNC, 0, FILE_MODE); ast_verbose( VERBOSE_PREFIX_3 "x=%i, open writing: %s format: %s, %p\n", x, recordfile, sfmt[x], others[x]); if (!others[x]) { @@ -996,14 +1013,14 @@ snprintf(prefile, sizeof(prefile), "voicemail/%s/%s/unavail", vmu->context, ext); make_dir(dir, sizeof(dir), vmu->context, "", ""); /* It's easier just to try to make it than to check for its existence */ - if (mkdir(dir, 0700) && (errno != EEXIST)) + if (mkdir(dir, DIR_MODE) && (errno != EEXIST)) ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno)); make_dir(dir, sizeof(dir), vmu->context, ext, ""); /* It's easier just to try to make it than to check for its existence */ - if (mkdir(dir, 0700) && (errno != EEXIST)) + if (mkdir(dir, DIR_MODE) && (errno != EEXIST)) ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno)); make_dir(dir, sizeof(dir), vmu->context, ext, "INBOX"); - if (mkdir(dir, 0700) && (errno != EEXIST)) + if (mkdir(dir, DIR_MODE) && (errno != EEXIST)) ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dir, strerror(errno)); if (ast_exists_extension(chan, strlen(chan->macrocontext) ? chan->macrocontext : chan->context, "o", 1, chan->callerid)) ecodes = "#0"; @@ -1195,7 +1212,7 @@ ast_log(LOG_WARNING, "Unable to open %s in read-only mode\n", infile); return -1; } - if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, 0600)) < 0) { + if ((ofd = open(outfile, O_WRONLY|O_TRUNC|O_CREAT, FILE_MODE)) < 0) { ast_log(LOG_WARNING, "Unable to open %s in write-only mode\n", outfile); close(ifd); return -1; @@ -1234,7 +1251,7 @@ int x; make_file(sfn, sizeof(sfn), dir, msg); make_dir(ddir, sizeof(ddir), context, username, dbox); - mkdir(ddir, 0700); + mkdir(ddir, DIR_MODE); for (x=0;x<MAXMSG;x++) { make_file(dfn, sizeof(dfn), ddir, x); if (ast_fileexists(dfn, NULL, NULL) < 0) @@ -2614,9 +2631,9 @@ if (valid) { snprintf(vms.curdir, sizeof(vms.curdir), "%s/voicemail/%s", (char *)ast_config_AST_SPOOL_DIR, vmu->context); - mkdir(vms.curdir, 0700); + mkdir(vms.curdir, DIR_MODE); snprintf(vms.curdir, sizeof(vms.curdir), "%s/voicemail/%s/%s", (char *)ast_config_AST_SPOOL_DIR, vmu->context, vms.username); - mkdir(vms.curdir, 0700); + mkdir(vms.curdir, DIR_MODE); /* Retrieve old and new message counts */ open_mailbox(&vms, vmu, 1); vms.oldmessages = vms.lastmsg + 1;