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.

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,[EMAIL PROTECTED] etc...

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 ?????????

i guess u got my point.

Syed Jamshed Zaidi

Asterisk Admin/Developer
@ Axvoice +92-0321-4087492
(JAMY-VIRUS)
"Shoot for the moon. Even if you miss, you'll land among the stars"

From: Philipp Kempgen <[EMAIL PROTECTED]>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion<[email protected]>
To: Asterisk Users Mailing List - Non-Commercial Discussion<[email protected]>
Subject: Re: [asterisk-users] How to access Voicemail Passwordin Asteriskwithout using V
Date: Sat, 10 Mar 2007 17:04:01 +0100
>jamshed zaidi wrote:
>
> > sir, i have configured voicemail already but the problem is i want a
> > variable which holds a value of password just like ${VM_CALLERID} variable
> > holds Voicemail Caller ID (Person leaving vm). i want to process password
> > set by the user through comedian mail. my snerio does not allow me to pick
> > password value from voicemail.cof file???? How do i come up with this
> > situation????
>
>If all else fails you might use an AGI script like this (put it
>in /var/lib/asterisk/agi-bin/):
>
>
>#!/usr/bin/php -q
><?php
>$mailbox = @$argv[1];
>$pass = '';
>if (preg_match( '/^\d*$/', $mailbox )) {
> $vmConf = file_get_contents( '/etc/asterisk/voicemail.conf' );
> if (preg_match( '/^'.$mailbox.'\s*=>\s*(\d*)/m', $vmConf, $m )) {
> $pass = $m[1];
> }
>}
>echo 'SET VARIABLE vm_pass ', $pass, "\n";
>fFlush(STDOUT);
>?>
>
>
>and call the script from within the dial plan:
>
>exten => 123,1,Set(my_mailbox=555)
>exten => 123,n,AGI(get-vm-password.php|${my_mailbox})
>exten => 123,n,SayDigits(${vm_pass})
>
>
>But maybe there is a better solution to this.
>
>Regards,
> Philipp
>
>--
>amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
> Let's use IT to solve problems and not to create new ones.
> Asterisk? -> http://www.das-asterisk-buch.de
>
>Geschäftsführer: Stefan Wintermeyer
>Handelsregister: Neuwied B 14998
>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>asterisk-users mailing list
>To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users


FREE pop-up blocking with the new MSN Toolbar MSN Toolbar Get it now!
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to