[Asterisk-Dev] Call notification from voicemail box

Andrew Lindh asterisk at ntplx.net
Tue Nov 23 13:13:32 MST 2004


I was just looking into something like this, it would be nice if there
were a few more options....

My existing old VM system (nitsuko) will call out to any number (like a
cell phone) and let me know about (and play) new messages. There are options
for time/day and different call numbers, retries, delay between retries, etc.

This avoids having to call into a system and login to the voice mail.

Options could be added to the extensions to improve it. On a callout it
should say there is a voice mail for "your-name" and ask you to press 1
to continue (then optionaly enter PIN)....

Also should the file name be something different each time? If "call"
already exists then it will be removed....it could happen if there
is more than one voicemail and the call is retrying. It might be nice
to name it the same as the mailbox, that way if there is a pending retry
it would only make one call for the same mailbox.

I think it's a simple patch that has value and should be developed more...

>From: "Robin van Leyden" <rvleyden at call4me.nl>
>To: "'Asterisk Developers Mailing List'" <asterisk-dev at lists.digium.com>
>Date: Tue, 23 Nov 2004 20:41:23 +0100
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Thread-Index: AcTRlGnsgPtMIvJjT/2cl4zU2kKyOQ==
>Subject: [Asterisk-Dev] Call notification from voicemail box
>
>Hi all,
>
>I made a small patch to the app_voicemail.c so it will be able to turn call
>notification on or off. The destination that has to be notified can be set.
>
>In the voicemail.conf there is a little addition in the user box
>
>E.q.
>
>1234 => 5678,Company2 User,root at localhost,,callnotify=sip/1234
>
>This will call sip extension 1234 via a outgoing dial command. When
>connected the extension will be directed to a section in extension.conf the
>app_voicemail will pass a parameter called 'vmbox' witch contains the
>voicemail box number who is notifying.
>
>E.q. extension.conf
>
>[voicemail_callnotify]
>exten => a,1,voicemailmain(${vmbox})
>
>This addition is patched in version : Asterisk CVS-v1-0-11/06/04-15:58:54
>
>Find attached the CVS diff.
>
>diff -r1.151.2.6 app_voicemail.c
>142a143,145
>>
>/*21-11-2004----------------------------------------------------------------
>--------------------*/
>>       char callnotify[160];
>>
>/*--------------------------------------------------------------------------
>--------------------*/
>326a330,334
>>
>/*21-11-2004----------------------------------------------------------------
>--------------------*/
>>                       /*notification via a call*/
>>                       } else if (!strcasecmp(var, "callnotify")) {
>>                               strncpy(vmu->callnotify, value,
>sizeof(vmu->callnotify) - 1);
>>
>/*--------------------------------------------------------------------------
>--------------------*/
>2221a2230
>>       FILE *outb;
>2225a2235,2254
>>
>>
>/*21-11-2004----------------------------------------------------------------
>--------------------*/
>>       if(!ast_strlen_zero(vmu->callnotify)) {
>>               ast_verbose( VERBOSE_PREFIX_3 "Preparing call notification
>outbound file\n");
>>               outb = fopen("/var/spool/asterisk/outgoing/call","w");
>>               if (outb) {
>>                       fprintf(outb,"Channel:%s\n",vmu->callnotify);
>>                       fprintf(outb,"MaxRetries:5\n");
>>                       fprintf(outb,"RetryTime:300\n");
>>                       fprintf(outb,"WaitTime:20\n");
>>                       fprintf(outb,"Context:voicemail_callnotify\n");
>>                       fprintf(outb,"Extension:a\n");
>>                       fprintf(outb,"Priority:1\n");
>>                       fprintf(outb,"SetVar:vmbox=%s\n",vmu->mailbox);
>>                       fprintf(outb,"Account:VM_CallNotify\n");
>>                       fclose(outb);
>>               } else
>>                       ast_log(LOG_WARNING, "Error opening outbound file
>for call notification\n");
>>       }
>>
>/*--------------------------------------------------------------------------
>--------------------*/
>
>Succes
>
>
>_______________________________________________
>Asterisk-Dev mailing list
>Asterisk-Dev at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-dev
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list