Brian Buhrow
2004-Apr-08 21:17 UTC
[Asterisk-Users] Re: [Asterisk-Users]: External access to voicemail
Hello steve. Here is a patch I wrote for app_voicemail.c which does exactly as you describe. When the outgoing message is playing, if the listener hits the "*" key, they're prompted for a mailbox and password, whereupon they can check their voicemail as if they were using the internal phone. I found no other way of doing this. If you patch your app_voicemail.c, I have V1.44 from CVS as of 12/11/2003, with this diff file, and recompile the app_voicemail.so module and install it in /usr/lib/asterisk/modules and then, from the command line of Asterisk, do: unload app_voicemail.so load app_voicemail.so you should have the new feature, all without having to stop and restart asterisk. Good luck, and let me know if it works for you. -Brian --- app_voicemail.c.fcs Thu Dec 11 12:55:25 2003 +++ app_voicemail.c Sat Feb 28 16:21:15 2004 @@ -1083,7 +1083,7 @@ char prefile[256]=""; char fmt[80]; char *context; - char *ecodes = "#"; + char *ecodes = "*#"; char *stringp; time_t start; time_t end; @@ -1117,12 +1117,12 @@ if (mkdir(dir, 0700) && (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"; + ecodes = "*#0"; /* Play the beginning intro if desired */ if (strlen(prefile)) { if (ast_fileexists(prefile, NULL, NULL) > 0) { if (ast_streamfile(chan, prefile, chan->language) > -1) - res = ast_waitstream(chan, "#0"); + res = ast_waitstream(chan, "*#0"); } else { ast_log(LOG_DEBUG, "%s doesn't exist, doing what we can\n", prefile); res = invent_message(chan, vmu->context, ext, busy, ecodes); @@ -1138,6 +1138,10 @@ silent = 1; res = 0; } + if (res == '*') { /*break out to main vm*/ + free_user(vmu); + return(100); + } if (!res && !silent) { res = ast_streamfile(chan, INTRO, chan->language); if (!res) @@ -1156,6 +1160,10 @@ free_user(vmu); return 0; } + if (res == '*') { /*break out to main vm*/ + free_user(vmu); + return(100); + } if (res >= 0) { /* Unless we're *really* silent, try to send the beep */ res = ast_streamfile(chan, "beep", chan->language); @@ -2678,6 +2686,9 @@ } res = leave_voicemail(chan, ext, silent, busy, unavail); LOCAL_USER_REMOVE(u); + if (res == 100) { /*The user requested vm main*/ + res = vm_execmain(chan, NULL); + } return res; }
hi I have got the Intel 537 Modem registered with Asterisk. Now what do i do next ? How do i dial or receive a call or make a call ? what type of channel is a modem ?? A quick response needed !! Thanks Regards Ayaz Gul Aga Brian Buhrow <buhrow@lothlorien.nfbcal.org> wrote: Hello steve. Here is a patch I wrote for app_voicemail.c which does exactly as you describe. When the outgoing message is playing, if the listener hits the "*" key, they're prompted for a mailbox and password, whereupon they can check their voicemail as if they were using the internal phone. I found no other way of doing this. If you patch your app_voicemail.c, I have V1.44 from CVS as of 12/11/2003, with this diff file, and recompile the app_voicemail.so module and install it in /usr/lib/asterisk/modules and then, from the command line of Asterisk, do: unload app_voicemail.so load app_voicemail.so you should have the new feature, all without having to stop and restart asterisk. Good luck, and let me know if it works for you. -Brian --- app_voicemail.c.fcs Thu Dec 11 12:55:25 2003 +++ app_voicemail.c Sat Feb 28 16:21:15 2004 @@ -1083,7 +1083,7 @@ char prefile[256]=""; char fmt[80]; char *context; - char *ecodes = "#"; + char *ecodes = "*#"; char *stringp; time_t start; time_t end; @@ -1117,12 +1117,12 @@ if (mkdir(dir, 0700) && (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"; + ecodes = "*#0"; /* Play the beginning intro if desired */ if (strlen(prefile)) { if (ast_fileexists(prefile, NULL, NULL) > 0) { if (ast_streamfile(chan, prefile, chan->language) > -1) - res = ast_waitstream(chan, "#0"); + res = ast_waitstream(chan, "*#0"); } else { ast_log(LOG_DEBUG, "%s doesn't exist, doing what we can\n", prefile); res = invent_message(chan, vmu->context, ext, busy, ecodes); @@ -1138,6 +1138,10 @@ silent = 1; res = 0; } + if (res == '*') { /*break out to main vm*/ + free_user(vmu); + return(100); + } if (!res && !silent) { res = ast_streamfile(chan, INTRO, chan->language); if (!res) @@ -1156,6 +1160,10 @@ free_user(vmu); return 0; } + if (res == '*') { /*break out to main vm*/ + free_user(vmu); + return(100); + } if (res >= 0) { /* Unless we're *really* silent, try to send the beep */ res = ast_streamfile(chan, "beep", chan->language); @@ -2678,6 +2686,9 @@ } res = leave_voicemail(chan, ext, silent, busy, unavail); LOCAL_USER_REMOVE(u); + if (res == 100) { /*The user requested vm main*/ + res = vm_execmain(chan, NULL); + } return res; } _______________________________________________ Asterisk-Users mailing list Asterisk-Users@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 --------------------------------- Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040426/5ae37193/attachment.htm
--- Brian Buhrow <buhrow@lothlorien.nfbcal.org> wrote:> Hello steve. Here is a patch I wrote for > app_voicemail.c which does > exactly as you describe. When the outgoing message > is playing, if the > listener hits the "*" key, they're prompted for a > mailbox and password, > whereupon they can check their voicemail as if they > were using the internal > phone. I found no other way of doing this. > If you patch your app_voicemail.c, I have V1.44 > from CVS as of > 12/11/2003, with this diff file, and recompile the > app_voicemail.so module > and install it in /usr/lib/asterisk/modules and > then, from the command line > of Asterisk, do: > unload app_voicemail.so > load app_voicemail.so > you should have the new feature, all without having > to stop and restart > asterisk. > Good luck, and let me know if it works for you. > -Brian > > --- app_voicemail.c.fcs Thu Dec 11 12:55:25 2003 > +++ app_voicemail.c Sat Feb 28 16:21:15 2004 > @@ -1083,7 +1083,7 @@ > char prefile[256]=""; > char fmt[80]; > char *context; > - char *ecodes = "#"; > + char *ecodes = "*#"; > char *stringp; > time_t start; > time_t end; > @@ -1117,12 +1117,12 @@ > if (mkdir(dir, 0700) && (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"; > + ecodes = "*#0"; > /* Play the beginning intro if desired */ > if (strlen(prefile)) { > if (ast_fileexists(prefile, NULL, NULL) > 0) { > if (ast_streamfile(chan, prefile, > chan->language) > -1) > - res = ast_waitstream(chan, "#0"); > + res = ast_waitstream(chan, "*#0"); > } else { > ast_log(LOG_DEBUG, "%s doesn't exist, doing > what we can\n", prefile); > res = invent_message(chan, vmu->context, ext, > busy, ecodes); > @@ -1138,6 +1138,10 @@ > silent = 1; > res = 0; > } > + if (res == '*') { /*break out to main vm*/ > + free_user(vmu); > + return(100); > + } > if (!res && !silent) { > res = ast_streamfile(chan, INTRO, > chan->language); > if (!res) > @@ -1156,6 +1160,10 @@ > free_user(vmu); > return 0; > } > + if (res == '*') { /*break out to main vm*/ > + free_user(vmu); > + return(100); > + } > if (res >= 0) { > /* Unless we're *really* silent, try to send the > beep */ > res = ast_streamfile(chan, "beep", > chan->language); > @@ -2678,6 +2686,9 @@ > } > res = leave_voicemail(chan, ext, silent, busy, > unavail); > LOCAL_USER_REMOVE(u); > + if (res == 100) { /*The user requested vm main*/ > + res = vm_execmain(chan, NULL); > + } > return res; > } > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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 __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash
hello I have connected my modem with a panasonic and i can only ring another extension on the pbx if i use pulse dialing in modem.conf. But i am not able to hear any voice. Wat do i need to do next. I dont have any sound card configured on my Linux machine as i use USB PlantronicsDSP400 headsets (Builtin DSP). Wat do i do next to receive or make calls from my modem. Regards Ayaz Gul Aga __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash