Fixed central voicemail conf generation issue
changed voicemail to use phone password as the voicemail password instead of just the voicemail_id git-svn-id: svn://192.168.202.10@1207 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -198,6 +198,10 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
out unused session reservations once a day at the timeclock reset time
|
||||
as set in system_settings.
|
||||
|
||||
50. Changed voicemail config to use phone password as voicemail password instead
|
||||
of just the voicemail ID as the password
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
# 90713-0140 - Changed direct dial phone extensions to failover to voicemail forwarder
|
||||
# 90722-1102 - Added list reset by time option
|
||||
# 90812-0053 - Added clear out non-used vicidial_conferences sessions
|
||||
# 90821-1246 - Fixed central voicemail server conf file, changed voicemail to use phone password
|
||||
#
|
||||
|
||||
$DB=0; # Debug flag
|
||||
@@ -977,7 +978,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
$Pext .= "exten => $dialplan[$i],1,Dial(IAX2/$extension[$i]|$phone_ring_timeout[$i]|)\n";
|
||||
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666666$voicemail[$i],1)\n";
|
||||
|
||||
$vm .= "$voicemail[$i] => $voicemail[$i],$extension[$i] Mailbox,$email[$i]\n";
|
||||
$vm .= "$voicemail[$i] => $pass[$i],$extension[$i] Mailbox,$email[$i]\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
@@ -1058,7 +1059,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
$Pext .= "exten => $dialplan[$i],1,Dial(SIP/$extension[$i]|$phone_ring_timeout[$i]|)\n";
|
||||
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666666$voicemail[$i],1)\n";
|
||||
|
||||
$vm .= "$voicemail[$i] => $voicemail[$i],$extension[$i] Mailbox,$email[$i]\n";
|
||||
$vm .= "$voicemail[$i] => $pass[$i],$extension[$i] Mailbox,$email[$i]\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
@@ -1400,6 +1401,49 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
}
|
||||
|
||||
|
||||
### generate voicemail accounts for all distinct phones on dedicated voicemail server
|
||||
if ($THISserver_voicemail > 0)
|
||||
{
|
||||
$vm='';
|
||||
|
||||
##### Get the distinct phone entries #####
|
||||
$stmtA = "SELECT distinct(voicemail_id) FROM phones where active='Y' order by voicemail_id;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$i=0;
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$voicemail[$i] = "$aryA[0]";
|
||||
$i++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$i=0;
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
##### Get the distinct phone entries #####
|
||||
$stmtA = "SELECT extension,pass,email FROM phones where active='Y' and voicemail_id='$voicemail[$i]';";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsX=$sthA->rows;
|
||||
if ($sthArowsX > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$extension[$i] = "$aryA[0]";
|
||||
$pass[$i] = "$aryA[1]";
|
||||
$email[$i] = "$aryA[2]";
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$vm .= "$voicemail[$i] => $pass[$i],$extension[$i] Mailbox,$email[$i]\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -549,8 +549,8 @@ foreach(@FILES)
|
||||
#"9185551212ROSE SMITHS 155 TIGER MOUNTAIN RD. RR 1 BOX 107 HENRYETTA OK74437-941DEMG 226555 0 "
|
||||
if ( ($format =~ /fixed254/) && ($format_set < 1) )
|
||||
{
|
||||
$phone_number = substr($raw_number, 0, 10);
|
||||
$USarea = substr($raw_number, 0, 3);
|
||||
$phone_number = substr($raw_number, 0, 10); $phone_number =~ s/\D//gi;
|
||||
$USarea = substr($phone_number, 0, 3);
|
||||
$phone_code = '1';
|
||||
$first_name = substr($raw_number, 10, 16); $first_name =~ s/\s+$//gi;
|
||||
$last_name = substr($raw_number, 26, 24); $last_name =~ s/\s+$//gi;
|
||||
|
||||
@@ -23,6 +23,22 @@ exten => _X.,1,AGI(agi-DID_route.agi)
|
||||
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
|
||||
|
||||
|
||||
[loopback-no-log]
|
||||
; This context is to accept calls that have already been logged in another context in Vicidial
|
||||
; and has been sent through one of the loopbacks. This is why this context is missing the h extension.
|
||||
; Do not put any extensions in this context unless you specifically understand what this means.
|
||||
|
||||
;exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
;exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
|
||||
;exten => _91NXXNXXXXXX,3,Hangup
|
||||
|
||||
exten => _999XX11112,1,Wait(2)
|
||||
exten => _999XX11112,2,Answer
|
||||
exten => _999XX11112,3,Playback(ss-noservice)
|
||||
exten => _999XX11112,4,Playback(vm-goodbye)
|
||||
exten => _999XX11112,5,Hangup
|
||||
|
||||
|
||||
|
||||
[default]
|
||||
include => vicidial-auto
|
||||
@@ -162,27 +178,30 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to)
|
||||
; exten => _91NXXNXXXXXX,3,Hangup
|
||||
; special extensions for North America to catch invalid phone numbers
|
||||
; exten => _91XXX[0-1]XXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91XXX[0-1]XXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91XXX[0-1]XXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91XXX[0-1]XXXXXX,3,Hangup
|
||||
; exten => _91[0-1]XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91[0-1]XXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91[0-1]XXXXXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91[0-1]XXXXXXXXX,3,Hangup
|
||||
; exten => _91XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91XXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91XXXXXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91XXXXXXXXX,3,Hangup
|
||||
; exten => _91XXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91XXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91XXXXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91XXXXXXXX,3,Hangup
|
||||
; exten => _91XXXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91XXXXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91XXXXXXXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91XXXXXXXXXXX,3,Hangup
|
||||
; exten => _91XXXXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91XXXXXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91XXXXXXXXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91XXXXXXXXXXXX,3,Hangup
|
||||
; exten => _91XXXXXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91XXXXXXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to)
|
||||
; exten => _91XXXXXXXXXXXXX,2,Dial(${TRUNKloop}/8889990011112,,to)
|
||||
; exten => _91XXXXXXXXXXXXX,3,Hangup
|
||||
|
||||
exten => 8889990011112,1,Goto(loopback-no-log,9990011112,1)
|
||||
|
||||
|
||||
; Inbound call from BINFONE
|
||||
; exten => 1112223333,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => 1112223333,2,Dial(sip/gs102,55,o)
|
||||
|
||||
Reference in New Issue
Block a user