diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl index 63552440..3e2aa281 100644 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl +++ b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl @@ -24,6 +24,7 @@ # 90519-1018 - Added upload file trigger for prompt recording if defined as voicemail server and voicemail/prompt recording extensions auto-generated # 90529-0652 - Added phone_context and fixed calledid and voicemail for phones entries # 90614-0753 - Added in-group routing to call menu feature +# 90617-0821 - Added phone ring timeout and call menu custom dialplan entry # $DB=0; # Debug flag @@ -797,7 +798,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r ##### Get the IAX phone entries ##### - $stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context FROM phones where server_ip='$server_ip' and protocol='IAX2' and active='Y' order by extension;"; + $stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context,phone_ring_timeout FROM phones where server_ip='$server_ip' and protocol='IAX2' and active='Y' order by extension;"; # print "$stmtA\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -806,18 +807,19 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r while ($sthArows > $i) { @aryA = $sthA->fetchrow_array; - $extension[$i] = "$aryA[0]"; - $dialplan[$i] = "$aryA[1]"; - $voicemail[$i] = "$aryA[2]"; - $pass[$i] = "$aryA[3]"; - $template_id[$i] = "$aryA[4]"; - $conf_override[$i] ="$aryA[5]"; - $email[$i] = "$aryA[6]"; - $template_id[$i] = "$aryA[7]"; - $conf_override[$i] ="$aryA[8]"; - $outbound_cid[$i] = "$aryA[9]"; - $fullname[$i] = "$aryA[10]"; - $phone_context[$i] ="$aryA[11]"; + $extension[$i] = "$aryA[0]"; + $dialplan[$i] = "$aryA[1]"; + $voicemail[$i] = "$aryA[2]"; + $pass[$i] = "$aryA[3]"; + $template_id[$i] = "$aryA[4]"; + $conf_override[$i] = "$aryA[5]"; + $email[$i] = "$aryA[6]"; + $template_id[$i] = "$aryA[7]"; + $conf_override[$i] = "$aryA[8]"; + $outbound_cid[$i] = "$aryA[9]"; + $fullname[$i] = "$aryA[10]"; + $phone_context[$i] = "$aryA[11]"; + $phone_ring_timeout[$i] = "$aryA[12]"; $i++; } $sthA->finish(); @@ -867,7 +869,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $Piax .= "auth=md5\n"; $Piax .= "host=dynamic\n"; } - $Pext .= "exten => $dialplan[$i],1,Dial(IAX2/$extension[$i])\n"; + $Pext .= "exten => $dialplan[$i],1,Dial(IAX2/$extension[$i]|$phone_ring_timeout[$i]|)\n"; $Pext .= "exten => $dialplan[$i],2,Voicemail($voicemail[$i]|u)\n"; $Pext .= "exten => $dialplan[$i],3,Hangup\n"; @@ -878,7 +880,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r ##### Get the SIP phone entries ##### - $stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context FROM phones where server_ip='$server_ip' and protocol='SIP' and active='Y' order by extension;"; + $stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context,phone_ring_timeout FROM phones where server_ip='$server_ip' and protocol='SIP' and active='Y' order by extension;"; # print "$stmtA\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -887,18 +889,19 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r while ($sthArows > $i) { @aryA = $sthA->fetchrow_array; - $extension[$i] = "$aryA[0]"; - $dialplan[$i] = "$aryA[1]"; - $voicemail[$i] = "$aryA[2]"; - $pass[$i] = "$aryA[3]"; - $template_id[$i] = "$aryA[4]"; - $conf_override[$i] ="$aryA[5]"; - $email[$i] = "$aryA[6]"; - $template_id[$i] = "$aryA[7]"; - $conf_override[$i] ="$aryA[8]"; - $outbound_cid[$i] = "$aryA[9]"; - $fullname[$i] = "$aryA[10]"; - $phone_context[$i] ="$aryA[11]"; + $extension[$i] = "$aryA[0]"; + $dialplan[$i] = "$aryA[1]"; + $voicemail[$i] = "$aryA[2]"; + $pass[$i] = "$aryA[3]"; + $template_id[$i] = "$aryA[4]"; + $conf_override[$i] = "$aryA[5]"; + $email[$i] = "$aryA[6]"; + $template_id[$i] = "$aryA[7]"; + $conf_override[$i] = "$aryA[8]"; + $outbound_cid[$i] = "$aryA[9]"; + $fullname[$i] = "$aryA[10]"; + $phone_context[$i] = "$aryA[11]"; + $phone_ring_timeout[$i] = "$aryA[12]"; $i++; } $sthA->finish(); @@ -947,7 +950,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $Psip .= "type=friend\n"; $Psip .= "host=dynamic\n"; } - $Pext .= "exten => $dialplan[$i],1,Dial(SIP/$extension[$i])\n"; + $Pext .= "exten => $dialplan[$i],1,Dial(SIP/$extension[$i]|$phone_ring_timeout[$i]|)\n"; $Pext .= "exten => $dialplan[$i],2,Voicemail($voicemail[$i]|u)\n"; $Pext .= "exten => $dialplan[$i],3,Hangup\n"; @@ -961,7 +964,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r ##### Get the Call Menu entries ##### - $stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac FROM vicidial_call_menu order by menu_id;"; + $stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry FROM vicidial_call_menu order by menu_id;"; # print "$stmtA\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -980,6 +983,8 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $menu_time_check[$i] = "$aryA[7]"; $call_time_id[$i] = "$aryA[8]"; $track_in_vdac[$i] = "$aryA[9]"; + $custom_dialplan_entry[$i]= "$aryA[10]"; + if ($track_in_vdac[$i] > 0) {$track_in_vdac[$i] = 'YES'} else @@ -1163,6 +1168,12 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $call_menu_ext .= "\n"; $call_menu_ext .= "$call_menu_options_ext"; $call_menu_ext .= "\n"; + if (length($custom_dialplan_entry[$i]) > 4) + { + $call_menu_ext .= "; custom dialplan entries\n"; + $call_menu_ext .= "$custom_dialplan_entry[$i]\n"; + $call_menu_ext .= "\n"; + } if (length($call_menu_timeout_ext) < 1) { diff --git a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample index 34da5ea7..ae7a9e69 100644 --- a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample +++ b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample @@ -81,12 +81,12 @@ exten => 401,2,Hangup ;exten => _3[0-5]X,1,Dial(IAX2/cc${EXTEN},20,to) ; extensions if using a T1 channelbank -exten => _19XX,1,Dial(Zap/${EXTEN:2},30,o) -exten => _19XX,2,Hangup +;exten => _19XX,1,Dial(Zap/${EXTEN:2},30,o) +;exten => _19XX,2,Hangup ; Extension 4001 rings Zap phone (this example for FXS on Zap port 1) -exten => 4001,1,Dial(Zap/1,30,o) ; ring Zap device 1 -exten => 4001,2,Voicemail,u4001 ; Send to voicemail... +;exten => 4001,1,Dial(Zap/1,30,o) ; ring Zap device 1 +;exten => 4001,2,Voicemail,u4001 ; Send to voicemail... ; # timeout invalid rules @@ -96,31 +96,6 @@ exten => t,1,Goto(#,1) ; If they take too long, give up exten => i,1,Playback(invalid) ; "That's not valid, try again" -; Inbound call from BINFONE -; exten => 1112223333,1,AGI(agi://127.0.0.1:4577/call_log) -; exten => 1112223333,2,Dial(sip/gs102,55,o) -; exten => 1112223333,3,Hangup - -; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery -exten => 7275551212,1,Ringing -exten => 7275551212,2,Wait(1) -exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID}-----${CALLERIDNUM}-----${CALLERIDNAME}) -exten => 7275551212,4,Answer -exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To) -exten => 7275551212,6,Voicemail,u2000 - -; dial a long distance outbound number to the UK -; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, -exten => _901144XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _901144XXXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},55,To) -exten => _901144XXXXXXXXXX,3,Hangup - -; dial a long distance outbound number to Australia -; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, -exten => _901161XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _901161XXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) -exten => _901161XXXXXXXXX,3,Hangup - ; Extensions for performance testing exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) exten => _91999NXXXXXX,2,Dial(${TRUNKloop}/${EXTEN:2},,tTo) @@ -129,36 +104,6 @@ exten => 999999999999,1,AGI(agi://127.0.0.1:4577/call_log) exten => 999999999999,2,Dial(${TRUNKloop}/${EXTEN:1},,tTo) exten => 999999999999,3,Hangup -; dial an 800 outbound number -exten => _91800NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91800NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91800NXXXXXX,3,Hangup -exten => _91888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91888NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91888NXXXXXX,3,Hangup -exten => _91877NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91877NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91877NXXXXXX,3,Hangup -exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91866NXXXXXX,3,Hangup - -; dial a local outbound number (modified because of only LD T1) -exten => _9NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _9NXXXXXX,2,Dial(${TRUNK}/1727${EXTEN:1},,To) -exten => _9NXXXXXX,3,Hangup - -; dial a local 727 outbound number with area code -exten => _9727NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _9727NXXXXXX,2,Dial(${TRUNK}/1${EXTEN:1},,To) -exten => _9727NXXXXXX,3,Hangup - -; dial a long distance outbound number -; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls -exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) -exten => _91NXXNXXXXXX,3,Hangup - ; This is a loopback dialaround to allow for hearing of ringing for 3way calls exten => _881NXXNXXXXXX,1,Answer exten => _881NXXNXXXXXX,2,Dial(${TRUNKloop}/9${EXTEN:2},,To) @@ -168,6 +113,50 @@ exten => _881NXXNXXXXXX,3,Hangup exten => _9118XXXXXXXX,1,Dial(${TRUNKblind}/9998818112,55,to) exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) + +; CARRIER DIALING EXTENSIONS, USE THE ADMIN INTERFACE TO PROGRAM THESE +; dial an 800 outbound number +;exten => _91800NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91800NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91800NXXXXXX,3,Hangup +;exten => _91888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91888NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91888NXXXXXX,3,Hangup +;exten => _91877NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91877NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91877NXXXXXX,3,Hangup +;exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91866NXXXXXX,3,Hangup + +; dial a long distance outbound number +; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls +;exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) +;exten => _91NXXNXXXXXX,3,Hangup + +; dial a local outbound number (modified because of only LD T1) +;exten => _9NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _9NXXXXXX,2,Dial(${TRUNK}/1727${EXTEN:1},,To) +;exten => _9NXXXXXX,3,Hangup + +; dial a local 727 outbound number with area code +;exten => _9727NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _9727NXXXXXX,2,Dial(${TRUNK}/1${EXTEN:1},,To) +;exten => _9727NXXXXXX,3,Hangup + +; dial a long distance outbound number to the UK +; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, +;exten => _901144XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _901144XXXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},55,To) +;exten => _901144XXXXXXXXXX,3,Hangup + +; dial a long distance outbound number to Australia +; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, +;exten => _901161XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _901161XXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) +;exten => _901161XXXXXXXXX,3,Hangup + ; dial a long distance outbound number through BINFONE ; exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) ; exten => _91NXXNXXXXXX,2,Dial(${TRUNKIAX}/${EXTEN:1},55,To) @@ -199,6 +188,19 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) ; exten => _91XXXXXXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to) ; exten => _91XXXXXXXXXXXXX,3,Hangup +; Inbound call from BINFONE +; exten => 1112223333,1,AGI(agi://127.0.0.1:4577/call_log) +; exten => 1112223333,2,Dial(sip/gs102,55,o) +; exten => 1112223333,3,Hangup + +; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery +;exten => 7275551212,1,Ringing +;exten => 7275551212,2,Wait(1) +;exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID}-----${CALLERIDNUM}-----${CALLERIDNAME}) +;exten => 7275551212,4,Answer +;exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To) +;exten => 7275551212,6,Voicemail,u2000 + ; parameters for call_inbound.agi (7 fields separated by five dashes "-----"): ; 1. the extension of the phone to ring as defined in the asterisk.phones table ; 2. the phone number that was called, for the live_inbound/_log entry @@ -208,19 +210,19 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) ; Extension 3429 - Inbound 800 number (1-800-555-3429) example of RBS T1 ; with 10 digit ANI and 4 digit DNIS star separated -exten => _**3429,1,Ringing -exten => _**3429,2,AGI(agi://127.0.0.1:4577/call_log) -exten => _**3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) -exten => _**3429,4,Answer -exten => _**3429,5,Dial(sip/spa2000&sip/spa2001,30,to) -exten => _**3429,6,Voicemail,u2000 +;exten => _**3429,1,Ringing +;exten => _**3429,2,AGI(agi://127.0.0.1:4577/call_log) +;exten => _**3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) +;exten => _**3429,4,Answer +;exten => _**3429,5,Dial(sip/spa2000&sip/spa2001,30,to) +;exten => _**3429,6,Voicemail,u2000 ; Extension 3429 - with ANI [callerID] -exten => _*NXXNXXXXXX*3429,1,Ringing -exten => _*NXXNXXXXXX*3429,2,AGI(agi://127.0.0.1:4577/call_log) -exten => _*NXXNXXXXXX*3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) -exten => _*NXXNXXXXXX*3429,4,Answer -exten => _*NXXNXXXXXX*3429,5,Dial(sip/spa2000&sip/spa2001,30,to) -exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000 +;exten => _*NXXNXXXXXX*3429,1,Ringing +;exten => _*NXXNXXXXXX*3429,2,AGI(agi://127.0.0.1:4577/call_log) +;exten => _*NXXNXXXXXX*3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) +;exten => _*NXXNXXXXXX*3429,4,Answer +;exten => _*NXXNXXXXXX*3429,5,Dial(sip/spa2000&sip/spa2001,30,to) +;exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000 ; parameters for agi-VDAD_ALL_inbound.agi (9 fields separated by five dashes "-----"): @@ -251,9 +253,9 @@ exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000 ; 10. the campaign_id to search within lists if CIDLOOKUPRC ; 11. the user to queue the call to for AGENTDIRECT in-group calls ; inbound VICIDIAL call with CID delivery through T1 PRI -exten => 1234,1,Answer ; Answer the line -exten => 1234,2,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----CL_GALLERIA-----7274515134-----Closer-----park----------999-----1) -exten => 1234,3,Hangup +;exten => 1234,1,Answer ; Answer the line +;exten => 1234,2,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----CL_GALLERIA-----7274515134-----Closer-----park----------999-----1) +;exten => 1234,3,Hangup ; inbound VICIDIAL transfer calls [can arrive through PRI T1 crossover, IAX or SIP channel] exten => _90009.,1,Answer ; Answer the line diff --git a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4 b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4 index bb4e8b12..779fc075 100644 --- a/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4 +++ b/agc_2-X/trunk/docs/conf_examples/extensions.conf.sample-1.4 @@ -81,12 +81,12 @@ exten => 401,2,Hangup ;exten => _3[0-5]X,1,Dial(IAX2/cc${EXTEN},20,to) ; extensions if using a T1 channelbank -exten => _19XX,1,Dial(Zap/${EXTEN:2},30,o) -exten => _19XX,2,Hangup +;exten => _19XX,1,Dial(Zap/${EXTEN:2},30,o) +;exten => _19XX,2,Hangup ; Extension 4001 rings Zap phone (this example for FXS on Zap port 1) -exten => 4001,1,Dial(Zap/1,30,o) ; ring Zap device 1 -exten => 4001,2,Voicemail,u4001 ; Send to voicemail... +;exten => 4001,1,Dial(Zap/1,30,o) ; ring Zap device 1 +;exten => 4001,2,Voicemail,u4001 ; Send to voicemail... ; # timeout invalid rules @@ -96,31 +96,6 @@ exten => t,1,Goto(#,1) ; If they take too long, give up exten => i,1,Playback(invalid) ; "That's not valid, try again" -; Inbound call from BINFONE -; exten => 1112223333,1,AGI(agi://127.0.0.1:4577/call_log) -; exten => 1112223333,2,Dial(sip/gs102,55,o) -; exten => 1112223333,3,Hangup - -; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery -exten => 7275551212,1,Ringing -exten => 7275551212,2,Wait(1) -exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)}) -exten => 7275551212,4,Answer -exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To) -exten => 7275551212,6,Voicemail,u2000 - -; dial a long distance outbound number to the UK -; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, -exten => _901144XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _901144XXXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},55,To) -exten => _901144XXXXXXXXXX,3,Hangup - -; dial a long distance outbound number to Australia -; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, -exten => _901161XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _901161XXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) -exten => _901161XXXXXXXXX,3,Hangup - ; Extensions for performance testing exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) exten => _91999NXXXXXX,2,Dial(${TRUNKloop}/${EXTEN:2},,tTo) @@ -129,36 +104,6 @@ exten => 999999999999,1,AGI(agi://127.0.0.1:4577/call_log) exten => 999999999999,2,Dial(${TRUNKloop}/${EXTEN:1},,tTo) exten => 999999999999,3,Hangup -; dial an 800 outbound number -exten => _91800NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91800NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91800NXXXXXX,3,Hangup -exten => _91888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91888NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91888NXXXXXX,3,Hangup -exten => _91877NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91877NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91877NXXXXXX,3,Hangup -exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) -exten => _91866NXXXXXX,3,Hangup - -; dial a local outbound number (modified because of only LD T1) -exten => _9NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _9NXXXXXX,2,Dial(${TRUNK}/1727${EXTEN:1},,To) -exten => _9NXXXXXX,3,Hangup - -; dial a local 727 outbound number with area code -exten => _9727NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _9727NXXXXXX,2,Dial(${TRUNK}/1${EXTEN:1},,To) -exten => _9727NXXXXXX,3,Hangup - -; dial a long distance outbound number -; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls -exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) -exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) -exten => _91NXXNXXXXXX,3,Hangup - ; This is a loopback dialaround to allow for hearing of ringing for 3way calls exten => _881NXXNXXXXXX,1,Answer exten => _881NXXNXXXXXX,2,Dial(${TRUNKloop}/9${EXTEN:2},,To) @@ -168,6 +113,50 @@ exten => _881NXXNXXXXXX,3,Hangup exten => _9118XXXXXXXX,1,Dial(${TRUNKblind}/9998818112,55,to) exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) + +; CARRIER DIALING EXTENSIONS, USE THE ADMIN INTERFACE TO PROGRAM THESE +; dial an 800 outbound number +;exten => _91800NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91800NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91800NXXXXXX,3,Hangup +;exten => _91888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91888NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91888NXXXXXX,3,Hangup +;exten => _91877NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91877NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91877NXXXXXX,3,Hangup +;exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91866NXXXXXX,3,Hangup + +; dial a long distance outbound number +; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls +;exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) +;exten => _91NXXNXXXXXX,3,Hangup + +; dial a local outbound number (modified because of only LD T1) +;exten => _9NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _9NXXXXXX,2,Dial(${TRUNK}/1727${EXTEN:1},,To) +;exten => _9NXXXXXX,3,Hangup + +; dial a local 727 outbound number with area code +;exten => _9727NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _9727NXXXXXX,2,Dial(${TRUNK}/1${EXTEN:1},,To) +;exten => _9727NXXXXXX,3,Hangup + +; dial a long distance outbound number to the UK +; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, +;exten => _901144XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _901144XXXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},55,To) +;exten => _901144XXXXXXXXXX,3,Hangup + +; dial a long distance outbound number to Australia +; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls, +;exten => _901161XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _901161XXXXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To) +;exten => _901161XXXXXXXXX,3,Hangup + ; dial a long distance outbound number through BINFONE ; exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) ; exten => _91NXXNXXXXXX,2,Dial(${TRUNKIAX}/${EXTEN:1},55,To) @@ -199,6 +188,19 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) ; exten => _91XXXXXXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to) ; exten => _91XXXXXXXXXXXXX,3,Hangup +; Inbound call from BINFONE +; exten => 1112223333,1,AGI(agi://127.0.0.1:4577/call_log) +; exten => 1112223333,2,Dial(sip/gs102,55,o) +; exten => 1112223333,3,Hangup + +; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery +;exten => 7275551212,1,Ringing +;exten => 7275551212,2,Wait(1) +;exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)}) +;exten => 7275551212,4,Answer +;exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To) +;exten => 7275551212,6,Voicemail,u2000 + ; parameters for call_inbound.agi (7 fields separated by five dashes "-----"): ; 1. the extension of the phone to ring as defined in the asterisk.phones table ; 2. the phone number that was called, for the live_inbound/_log entry @@ -208,19 +210,19 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) ; Extension 3429 - Inbound 800 number (1-800-555-3429) example of RBS T1 ; with 10 digit ANI and 4 digit DNIS star separated -exten => _**3429,1,Ringing -exten => _**3429,2,AGI(agi://127.0.0.1:4577/call_log) -exten => _**3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) -exten => _**3429,4,Answer -exten => _**3429,5,Dial(sip/spa2000&sip/spa2001,30,to) -exten => _**3429,6,Voicemail,u2000 +;exten => _**3429,1,Ringing +;exten => _**3429,2,AGI(agi://127.0.0.1:4577/call_log) +;exten => _**3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) +;exten => _**3429,4,Answer +;exten => _**3429,5,Dial(sip/spa2000&sip/spa2001,30,to) +;exten => _**3429,6,Voicemail,u2000 ; Extension 3429 - with ANI [callerID] -exten => _*NXXNXXXXXX*3429,1,Ringing -exten => _*NXXNXXXXXX*3429,2,AGI(agi://127.0.0.1:4577/call_log) -exten => _*NXXNXXXXXX*3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) -exten => _*NXXNXXXXXX*3429,4,Answer -exten => _*NXXNXXXXXX*3429,5,Dial(sip/spa2000&sip/spa2001,30,to) -exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000 +;exten => _*NXXNXXXXXX*3429,1,Ringing +;exten => _*NXXNXXXXXX*3429,2,AGI(agi://127.0.0.1:4577/call_log) +;exten => _*NXXNXXXXXX*3429,3,AGI(call_inbound.agi,spa2000-----8005553429-----Inbound 800-----x-----y-----z-----w) +;exten => _*NXXNXXXXXX*3429,4,Answer +;exten => _*NXXNXXXXXX*3429,5,Dial(sip/spa2000&sip/spa2001,30,to) +;exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000 ; parameters for agi-VDAD_ALL_inbound.agi (9 fields separated by five dashes "-----"): @@ -251,9 +253,9 @@ exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000 ; 10. the campaign_id to search within lists if CIDLOOKUPRC ; 11. the user to queue the call to for AGENTDIRECT in-group calls ; inbound VICIDIAL call with CID delivery through T1 PRI -exten => 1234,1,Answer ; Answer the line -exten => 1234,2,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----CL_GALLERIA-----7274515134-----Closer-----park----------999-----1) -exten => 1234,3,Hangup +;exten => 1234,1,Answer ; Answer the line +;exten => 1234,2,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----CL_GALLERIA-----7274515134-----Closer-----park----------999-----1) +;exten => 1234,3,Hangup ; inbound VICIDIAL transfer calls [can arrive through PRI T1 crossover, IAX or SIP channel] exten => _90009.,1,Answer ; Answer the line diff --git a/agc_2-X/trunk/extras/upgrade_2.2.0.sql b/agc_2-X/trunk/extras/upgrade_2.2.0.sql index 2a6790ff..798bf0db 100644 --- a/agc_2-X/trunk/extras/upgrade_2.2.0.sql +++ b/agc_2-X/trunk/extras/upgrade_2.2.0.sql @@ -177,3 +177,15 @@ UPDATE system_settings SET db_schema_version='1150'; ALTER TABLE vicidial_live_agents ADD agent_log_id INT(9) UNSIGNED default '0'; UPDATE system_settings SET db_schema_version='1151'; + + + + + +ALTER TABLE system_settings ADD allow_custom_dialplan ENUM('0','1') default '0'; + +ALTER TABLE vicidial_call_menu ADD custom_dialplan_entry TEXT; + +ALTER TABLE phones ADD phone_ring_timeout SMALLINT(3) default '60'; + +UPDATE system_settings SET db_schema_version='1152'; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index ef5a5677..6f38690b 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -165,6 +165,12 @@ Carrier Logging Active|| This setting allows you to log all hangup return codes for any outbound list dialing calls that you are placing. Default is N.|| Drop Lockout Time|| This is a number of hours that DROP abandon calls will be prevented from being dialed, to disable set to 0. This setting is very useful in countries like the UK where there are regulations preventing the attempted calling of customers within 72 hours of an Abandon, or DROP. Default is 0|| +Phone Ring Timeout|| +This is the amount of time, in seconds, that the phone will ring in the dialplan before sending the call to voicemail. Default is 60 seconds|| +Allow Custom Dialplan Entries|| +This option allows you to enter custom dialplan lines into Call Menus. Default is 0 for inactive|| +Custom Dilplan Entry|| +This field allows you to enter in any dialplan elements that you want for the Call Menu|| add-file: user_territories.php diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index ae0fd361..5ef9f9c8 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1034,6 +1034,12 @@ if (isset($_GET["carrier_logging_active"])) {$carrier_logging_active=$_GET["c elseif (isset($_POST["carrier_logging_active"])) {$carrier_logging_active=$_POST["carrier_logging_active"];} if (isset($_GET["drop_lockout_time"])) {$drop_lockout_time=$_GET["drop_lockout_time"];} elseif (isset($_POST["drop_lockout_time"])) {$drop_lockout_time=$_POST["drop_lockout_time"];} +if (isset($_GET["allow_custom_dialplan"])) {$allow_custom_dialplan=$_GET["allow_custom_dialplan"];} + elseif (isset($_POST["allow_custom_dialplan"])) {$allow_custom_dialplan=$_POST["allow_custom_dialplan"];} +if (isset($_GET["custom_dialplan_entry"])) {$custom_dialplan_entry=$_GET["custom_dialplan_entry"];} + elseif (isset($_POST["custom_dialplan_entry"])) {$custom_dialplan_entry=$_POST["custom_dialplan_entry"];} +if (isset($_GET["phone_ring_timeout"])) {$phone_ring_timeout=$_GET["phone_ring_timeout"];} + elseif (isset($_POST["phone_ring_timeout"])) {$phone_ring_timeout=$_POST["phone_ring_timeout"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1226,6 +1232,8 @@ if ($non_latin < 1) $sounds_central_control_active = ereg_replace("[^0-9]","",$sounds_central_control_active); $user_territories_active = ereg_replace("[^0-9]","",$user_territories_active); $vicidial_recording_limit = ereg_replace("[^0-9]","",$vicidial_recording_limit); + $allow_custom_dialplan = ereg_replace("[^0-9]","",$allow_custom_dialplan); + $phone_ring_timeout = ereg_replace("[^0-9]","",$phone_ring_timeout); ### DIGITS and COLONS $shift_length = ereg_replace("[^\:0-9]","",$shift_length); @@ -1565,6 +1573,9 @@ if ($non_latin < 1) $globals_string = ereg_replace(";","",$globals_string); $dialplan_entry = ereg_replace(";","",$dialplan_entry); $dialplan_entry = ereg_replace("\r","",$dialplan_entry); + $custom_dialplan_entry = ereg_replace("\\\\","",$custom_dialplan_entry); + $custom_dialplan_entry = ereg_replace(";","",$custom_dialplan_entry); + $custom_dialplan_entry = ereg_replace("\r","",$custom_dialplan_entry); ### VARIABLES TO BE mysql_real_escape_string ### # $web_form_address @@ -1797,11 +1808,12 @@ else # 90608-0944 - Added Drop Lockout Time feature to Campaign Detail Modification screen # 90612-0909 - Added audio prompt selection feature to survey screen # 90614-0827 - Added In-Group routing to Call Menu screen, Added pull-down Call Menu option to DID screen +# 90617-0733 - Added phone ring timeout and call menu custom dialplan entries # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-196'; -$build = '90614-0827'; +$admin_version = '2.2.0-197'; +$build = '90617-0733'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1849,7 +1861,7 @@ if ($force_logout) ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active FROM system_settings;"; +$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); @@ -1860,6 +1872,7 @@ while ($i < $qm_conf_ct) $non_latin = $row[0]; $SSauto_dial_limit = $row[1]; $SSuser_territories_active = $row[2]; + $SSallow_custom_dialplan = $row[3]; $i++; } ##### END SETTINGS LOOKUP ##### @@ -4149,6 +4162,11 @@ if ($SSqc_features_active > 0)
Option Route Value Context - This field is optional and only used for EXTENSION Option Routes. +
+ +
+Custom Dilplan Entry - This field allows you to enter in any dialplan elements that you want for the Call Menu. + @@ -4585,6 +4603,11 @@ if ($SSoutbound_autodial_active > 0)
Local GMT - The difference from Greenwich Mean time, or ZULU time where the phone is located. DO NOT ADJUST FOR DAYLIGHT SAVINGS TIME. This is used by the VICIDIAL campaign to accurately display the time and customer time. +
+
+
+Phone Ring Timeout - This is the amount of time, in seconds, that the phone will ring in the dialplan before sending the call to voicemail. Default is 60 seconds. +

@@ -5299,6 +5322,11 @@ FR_SPAC 00 00 00 00 00 - France space separated phone number

Max FILL Calls per Second - This setting determines the maximum number of calls that can be placed by the auto-FILL outbound auto-dialing script on for all servers, per second. Must be from 1 to 200. Default is 40. +
+
+
+Allow Custom Dialplan Entries - This option allows you to enter custom dialplan lines into Call Menus. Default is 0 for inactive. +

@@ -8500,7 +8528,7 @@ if ($ADD==2611) } else { - $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac) SELECT \"$menu_id\",\"$menu_name\",menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac from vicidial_call_menu where menu_id=\"$source_menu\";"; + $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry) SELECT \"$menu_id\",\"$menu_name\",menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry from vicidial_call_menu where menu_id=\"$source_menu\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_call_menu_options (menu_id,option_value,option_description,option_route,option_route_value,option_route_value_context) SELECT \"$menu_id\",option_value,option_description,option_route,option_route_value,option_route_value_context from vicidial_call_menu_options where menu_id='$source_menu';"; @@ -11194,7 +11222,7 @@ if ($ADD==4511) { echo "
CALL MENU MODIFIED: $menu_id\n"; - $stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac' where menu_id='$menu_id';"; + $stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac',custom_dialplan_entry='$custom_dialplan_entry' where menu_id='$menu_id';"; $rslt=mysql_query($stmt, $link); $h=0; @@ -11235,7 +11263,7 @@ if ($ADD==4511) $option_value = ereg_replace("[^-\_0-9A-Z]","",$option_value); $option_description = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$option_description); $option_route = ereg_replace("[^-_0-9a-zA-Z]","",$option_route); - $option_route_value = ereg_replace("[^-\_\#\*\,\.\_0-9a-zA-Z]","",$option_route_value); + $option_route_value = ereg_replace("[^-\/\_\#\*\,\.\_0-9a-zA-Z]","",$option_route_value); $option_route_value_context = ereg_replace("[^,-_0-9a-zA-Z]","",$option_route_value_context); } @@ -11757,7 +11785,7 @@ if ($ADD==41111111111) { echo "
PHONE MODIFIED: $extension\n"; - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context' where extension='$old_extension' and server_ip='$old_server_ip';"; + $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout' where extension='$old_extension' and server_ip='$old_server_ip';"; $rslt=mysql_query($stmt, $link); $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; @@ -12144,7 +12172,7 @@ if ($ADD==411111111111111) echo "
VICIDIAL SYSTEM SETTINGS MODIFIED\n"; - $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active';"; + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -17872,7 +17900,7 @@ if ($ADD==3511) echo "\n"; + } + else + { + echo "\n"; + } + echo "\n"; echo "
\n"; echo ""; - $stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac from vicidial_call_menu where menu_id='$menu_id';"; + $stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry from vicidial_call_menu where menu_id='$menu_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $menu_name = $row[0]; @@ -17884,6 +17912,7 @@ if ($ADD==3511) $menu_time_check = $row[6]; $call_time_id = $row[7]; $track_in_vdac = $row[8]; + $custom_dialplan_entry= $row[9]; echo "
MODIFY A CALL MENU RECORD: $menu_id
\n"; @@ -18095,6 +18124,15 @@ if ($ADD==3511) $j++; } + if ($SSallow_custom_dialplan > 0) + { + echo "
Custom Dialplan Entry:
$NWB#vicidial_call_menu-custom_dialplan_entry$NWE
Custom Dialplan Entry: Disabled $NWB#vicidial_call_menu-custom_dialplan_entry$NWE
\n"; echo "

\n"; @@ -18922,6 +18960,7 @@ if ($ADD==31111111111) echo "Old Messages: $row[15]$NWB#phones-old_messages$NWE\n"; echo "Client Protocol: $NWB#phones-protocol$NWE\n"; echo "Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE\n"; + echo "Phone Ring Timeout: $NWB#phones-phone_ring_timeout$NWE\n"; echo "Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE\n"; echo "Manager Secret: $NWB#phones-ASTmgrSECRET$NWE\n"; echo "VICIDIAL Default User: $NWB#phones-login_user$NWE\n"; @@ -19729,7 +19768,7 @@ if ($ADD==311111111111111) echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -20316,9 +20358,9 @@ echo "
\n"; echo ""; - $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active from system_settings;"; + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan from system_settings;"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $version = $row[0]; @@ -19773,6 +19812,7 @@ if ($ADD==311111111111111) $active_voicemail_server = $row[38]; $auto_dial_limit = $row[39]; $user_territories_active = $row[40]; + $allow_custom_dialplan = $row[41]; echo "
MODIFY VICIDIAL SYSTEM SETTINGS
\n"; echo "\n"; @@ -19910,6 +19950,8 @@ if ($ADD==311111111111111) echo "
Max FILL Calls per Second: $NWB#settings-outbound_calls_per_second$NWE
Allow Custom Dialplan Entries: $NWB#settings-allow_custom_dialplan$NWE
User Territories Active: $NWB#settings-user_territories_active$NWE
QC Features Active: $NWB#settings-qc_features_active$NWE
\n"; if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} if ($user_group) {$SQL .= " user_group = '$user_group' and";} $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} + if (strlen($SQL)>5) {$SQL = "and $SQL";} - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; + $stmt="SELECT * from vicidial_users where user_level <= $LOGuser_level $SQL order by full_name desc;"; # echo "\n|$stmt|\n"; $rslt=mysql_query($stmt, $link); $people_to_print = mysql_num_rows($rslt); @@ -20552,7 +20594,7 @@ if ($ADD==0) } else { - $SQLstatus = "where active='Y'"; + $SQLstatus = "and active='Y'"; echo "   show all users\n"; } @@ -20569,7 +20611,7 @@ if ($ADD==0) if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT user,full_name,user_level,user_group,active from vicidial_users $SQLstatus $SQLorder"; + $stmt="SELECT user,full_name,user_level,user_group,active from vicidial_users where user_level <= $LOGuser_level $SQLstatus $SQLorder"; $rslt=mysql_query($stmt, $link); $people_to_print = mysql_num_rows($rslt);