[Asterisk-Dev] Call notification from voicemail box

Matthew Boehm mboehm at cytelcom.com
Tue Nov 23 13:06:06 MST 2004


You need to redo this patch in the correct format (diff -u) and do it for
CVS. From what I have been told, no new features will be developed into 1.0

-Matthew
----- Original Message ----- 
From: "Robin van Leyden" <rvleyden at call4me.nl>
To: "'Asterisk Developers Mailing List'" <asterisk-dev at lists.digium.com>
Sent: Tuesday, November 23, 2004 1:41 PM
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