[asterisk-users] problem to get MWI working

Asghar Mohammad asghar144 at gmail.com
Sun Sep 29 10:12:50 CDT 2013


Hi Asmaa,
Have you enabled debug to console in logger.conf?
enable debug in logger.conf console => notice,warning,error,debug and
reload Asterisk.


On Sun, Sep 29, 2013 at 4:48 PM, Asmaa Ahmed <asabatgirl at hotmail.com> wrote:

> Hi Asghar,
>
> Thanks a lot for your proposed solution!
> MWI is turned on or off by the presence of a msgxxx.txt file in the INBOX
> directory for a given voicemail box. The "externnotify=" option in
> voicemail.conf allows to run a program or script whenever a voicemail is
> received and also when someone exits the VoiceMailMain() application. When
> "externnotify" is processed it passes the context, extension and number of
> messages to the program or script you specify.
>
> My problem is that I don't understand why I can't get it activated
> (externnotify). I don't see it being called at all!
> My second issue is that I don't see debug logs even with increasing the
> verbosity and debugging to 10, Is there something else needed to be done. I
> can only see in Asterisk logs warning and notice levels!
>
> Thanks.
>
> ------------------------------
> Date: Sun, 29 Sep 2013 12:41:55 +0200
> From: asghar144 at gmail.com
> To: asterisk-users at lists.digium.com
> Subject: Re: [asterisk-users] problem to get MWI working
>
>
> HI Asmaa,
> I don't know how MWI works in Voicemail but as i understand it just create
> a .call file and put in /var/spool/asterisk/outgoing and asterisk execute
> that file.
> i am using similar method for sending fax to from email.
>
> i show you some examples from my php scripts.
>
> 1. in voicemail   context
> exten =>_X.1,VoicemailMain()
> exten =>h,1,exten => h,n,System(/usr/bin/php path to php script
>  ${CDR(accountcode)} ${FAXEDNUM} ${CALLERID(num)} ${FAXSTATUS}
> ${CDR(duration)} ${UNIQUEID} ${CALLCOUNT} ${TIFF})
>
> pass variables to script as you need.
> **************************************Part of php************************
> 2. script do some checks on saved VM of Fax if it is too short or
> incomplete just delete it or do want you want.
> in script collect variables pass to it.
>  $argv;
> $accountcode = $argv[1];
> $callednum = $argv[2];
> $callerid = $argv[3];
> $faxstatus = $argv[4];
> $billtime = $argv[5];
> $unid = $argv[6];
> $callcount = $argv[7];
> $faxtiff = $argv[8];
>
> Create .call file somewhere but not in /var/spool/asterisk/outgoing
>
> $filename = "path to call file/$accountcode-$unid.call";
>
> Remove old call file with same if any.
>
> system ("rm -f $filename");
>
> Create Contents of file as you need
>
> $Content = "Channel: $providertech/$callednum@$providerip\nCallerID:
> $callerid\nWaitTime: 180\nMaxRetries: 0\nRetryTime: 300\nContext:
> fax-out\nExtension: $callednum \nArchive: false\nPriority: 1\nSetVar:
> SENDER=$callerid \nSetVar: TIFF=$faxtiff \nAccount: $accountcode \nSetVar:
> CALLCOUNT=2";
>
> Open file and fill it.
>
> $handle = fopen($filename, 'x+');
> fwrite($handle, $Content);
> fclose($handle);
>
> if you want execute call file after some delay change timestamp.
>
> system ("touch -d '3 minutes 11 seconds' $filename");
>
> Move file to /var/spool/asterisk/outgoing
>
> Note: don't copy the file but MOVE the file. if you copy the file asterisk
> may execute partial file.
>
> system ("/bin/mv $filename /var/spool/asterisk/outgoing");
>
> you can use any scripting language.
>
> Hope this will help you
>
>
>
>
>
> On Sun, Sep 29, 2013 at 2:01 AM, Asmaa Ahmed <asabatgirl at hotmail.com>wrote:
>
> Hello,
>
> It looks that I got this in the logs while running the scripts manually by
> mistake, so back to the starting point I can't figure why externnotify
> doesn't run? My target is  to have MWI (Message waiting indicator)
> running.
> Also still can see the debug logs in CLI/asterisk logs even with
> increasing the verbosity and debug level!
>
> Thanks.
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
> -- _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New
> to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE
> or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130929/685d7873/attachment.html>


More information about the asterisk-users mailing list