<div dir="ltr">Hi Asmaa,<div>Have you enabled debug to console in logger.conf?</div><div>enable debug in logger.conf console => notice,warning,error,debug and reload Asterisk.</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sun, Sep 29, 2013 at 4:48 PM, Asmaa Ahmed <span dir="ltr"><<a href="mailto:asabatgirl@hotmail.com" target="_blank">asabatgirl@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">Hi Asghar,<div><br></div><div>Thanks a lot for your proposed solution!</div><div><span style><font face="Times New Roman" size="3">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.</font></span></div>
<div><span style><font face="Times New Roman" size="3"><br></font></span></div><div><span style><font face="Times New Roman" size="3">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!</font></span></div>
<div><span style><font face="Times New Roman" size="3">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!</font></span></div>
<div><span style><font face="Times New Roman" size="3"><br></font></span></div><div><span style><font face="Times New Roman" size="3">Thanks. </font></span><span style="font-size:13px;font-family:'Trebuchet MS',Trebuchet,Verdana,sans-serif"> </span></div>
<div><br><div><hr>Date: Sun, 29 Sep 2013 12:41:55 +0200<br>From: <a href="mailto:asghar144@gmail.com" target="_blank">asghar144@gmail.com</a><br>To: <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br>
Subject: Re: [asterisk-users] problem to get MWI working<div><div class="h5"><br><br><div dir="ltr">HI Asmaa,<div>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.</div>
<div>i am using similar method for sending fax to from email.</div>
<div><br></div><div>i show you some examples from my php scripts.</div><div><br></div><div>1. in voicemail   context</div><div>exten =>_X.1,VoicemailMain()</div><div>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})</div>

<div><br></div><div>pass variables to script as you need.</div><div>**************************************Part of php************************</div><div>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.</div>

<div>in script collect variables pass to it.</div><div> $argv;</div><div>$accountcode = $argv[1];</div><div>$callednum = $argv[2];</div><div>$callerid = $argv[3];</div><div>$faxstatus = $argv[4];</div><div>$billtime = $argv[5];</div>

<div>$unid = $argv[6];</div><div>$callcount = $argv[7];</div><div>$faxtiff = $argv[8];</div><div><br></div><div>Create .call file somewhere but not in /var/spool/asterisk/outgoing</div><div><br></div><div>$filename = "path to call file/$accountcode-$unid.call";<br>

</div><div><br></div><div>Remove old call file with same if any.</div><div><br></div><div>system ("rm -f $filename");<br></div><div><br></div><div>Create Contents of file as you need</div><div><br></div><div>$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";<br>

</div><div><br></div><div>Open file and fill it.</div><div><br></div><div><div>$handle = fopen($filename, 'x+');</div><div>fwrite($handle, $Content);</div><div>fclose($handle);</div></div><div><br></div><div>if you want execute call file after some delay change timestamp.</div>

<div><br></div><div>system ("touch -d '3 minutes 11 seconds' $filename");<br></div><div><br></div><div>Move file to /var/spool/asterisk/outgoing</div><div><br></div><div>Note: don't copy the file but MOVE the file. if you copy the file asterisk may execute partial file.</div>

<div><br></div><div>system ("/bin/mv $filename /var/spool/asterisk/outgoing");<br></div><div><br></div><div>you can use any scripting language.</div><div><br></div><div>Hope this will help you</div><div> <br></div>

<div><br></div><div> </div></div><div><br><br><div>On Sun, Sep 29, 2013 at 2:01 AM, Asmaa Ahmed <span dir="ltr"><<a href="mailto:asabatgirl@hotmail.com" target="_blank">asabatgirl@hotmail.com</a>></span> wrote:<br>

<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hello,<div><br></div><div>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? <span style="font-size:12pt">My target is  to have MWI (Message waiting indicator) running.</span></div>

<div><span style="font-size:12pt">Also still can see the debug logs in CLI/asterisk logs even with increasing the verbosity and debug level!</span></div><div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">Thanks. </span></div>

                                          </div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>
<br>-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></div></div></div></div>                                          </div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>