3
# Copyright (c) 2008 Zivios, LLC.
5
# This file is part of Zivios.
7
# Zivios is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
12
# Zivios is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with Zivios. If not, see <http://www.gnu.org/licenses/>.
21
# @copyright Copyright (c) 2008 Zivios, LLC. (http://www.zivios.org)
22
# @license http://www.zivios.org/legal/license
23
# @version $Id: addattendant 1019 2008-09-08 07:26:34Z gmustafa $
25
use lib "/opt/zivios/asterisk/lib";
29
#command line arguments
30
GetOptions( 'exten=i' => \$exten,
31
'secret:s' => \$secret,
33
'email:s' => \$email);
36
if (!$secret) { $del="y"; }
37
my $vmrc = new Asterisk::config(file=>'/etc/asterisk/voicemail.conf',keep_resource_array=>0);
38
$vmrc->assign_delkey(section=>'default',key=>"$exten");
40
$vmrc->assign_append(point=>'foot',section=>'default',data=>"$exten => $secret,$name,$email");