<html><div style='background-color:'><P>Sir, I cant use this script. i know that this script parse the contents of voicemail.conf file, now i m telling u what my snerio is.</P>
<P>I have php script which creates username.conf files after reading username info from database, like jamshed.conf, riz.conf for each voicemail box configuration and these files are created in the /etc/asterisk/voicemail folder. i include the path of this folder in default context of voicemail.conf like this #include /etc/asterisk/voicemail/*.conf. so when i change my voicemail password through commedian mail then change will not be appeared in username.conf file but asterisk set the new entered password. so i want that password to process it. i dont know asterisk sets which variable against 123456=>vm_password,mailbox,jamshed_z@hotmail.com etc... </P>
<P>i want to know that variable which is set by asterisk when password change occurs through commedian mail and how do i access this variable through php or perl code ?????????</P>
<P>i guess u got my point.<BR><BR><IMG height=2 src="http://graphics.hotmail.com/greypixel.gif" width="100%" vspace=9></P>
<DIV><PRE class=quote><FONT face="Courier New, Courier, Monospace" color=#000033 size=2>Syed Jamshed Zaidi
<BR>Asterisk Admin/Developer
<BR>@ Axvoice +92-0321-4087492
<BR>(JAMY-VIRUS)</FONT></PRE><PRE class=quote><PRE class=quote><FONT face="Courier New, Courier, Monospace" color=#000033 size=2>"Shoot for the moon. Even if you miss, you'll land among the stars"</FONT></PRE></PRE></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
From: <I>Philipp Kempgen <philipp.kempgen@amooma.de></I><BR>Reply-To: <I>Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users@lists.digium.com></I><BR>To: <I>Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users@lists.digium.com></I><BR>Subject: <I>Re: [asterisk-users] How to access Voicemail Passwordin Asteriskwithout using V</I><BR>Date: <I>Sat, 10 Mar 2007 17:04:01 +0100</I><BR>>jamshed zaidi wrote:<BR>><BR>> > sir, i have configured voicemail already but the problem is i want a<BR>> > variable which holds a value of password just like ${VM_CALLERID} variable<BR>> > holds Voicemail Caller ID (Person leaving vm). i want to process password<BR>> > set by the user through comedian mail. my snerio does not allow me to pick<BR>> > password value from voicemail.cof file???? How do i come up with
this<BR>> > situation????<BR>><BR>>If all else fails you might use an AGI script like this (put it<BR>>in /var/lib/asterisk/agi-bin/):<BR>><BR>><BR>>#!/usr/bin/php -q<BR>><?php<BR>>$mailbox = @$argv[1];<BR>>$pass = '';<BR>>if (preg_match( '/^\d*$/', $mailbox )) {<BR>> $vmConf = file_get_contents( '/etc/asterisk/voicemail.conf' );<BR>> if (preg_match( '/^'.$mailbox.'\s*=>\s*(\d*)/m', $vmConf, $m )) {<BR>> $pass = $m[1];<BR>> }<BR>>}<BR>>echo 'SET VARIABLE vm_pass ', $pass, "\n";<BR>>fFlush(STDOUT);<BR>>?><BR>><BR>><BR>>and call the script from within the dial plan:<BR>><BR>>exten => 123,1,Set(my_mailbox=555)<BR>>exten => 123,n,AGI(get-vm-password.php|${my_mailbox})<BR>>exten => 123,n,SayDigits(${vm_pass})<BR>><BR>><BR>>But maybe there is a better solution to
this.<BR>><BR>>Regards,<BR>> Philipp<BR>><BR>>--<BR>>amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de<BR>> Let's use IT to solve problems and not to create new ones.<BR>> Asterisk? -> http://www.das-asterisk-buch.de<BR>><BR>>Geschäftsführer: Stefan Wintermeyer<BR>>Handelsregister: Neuwied B 14998<BR>>_______________________________________________<BR>>--Bandwidth and Colocation provided by Easynews.com --<BR>><BR>>asterisk-users mailing list<BR>>To UNSUBSCRIBE or update options visit:<BR>> http://lists.digium.com/mailman/listinfo/asterisk-users<BR></FONT></BLOCKQUOTE></div><br clear=all><hr>FREE pop-up blocking with the new MSN Toolbar <a href="http://g.msn.com/8HMAEN/2752??PS=47575" target="_top">MSN Toolbar</a> Get it now!</html>