diff --git a/UPGRADE b/UPGRADE index 40ac2b58..19595ecc 100644 --- a/UPGRADE +++ b/UPGRADE @@ -29,6 +29,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 7. It is now possible for agents to dial alternate phone numbers using only HotKeys if ALTPH2 and/or ADDR3 are added to a campaign's hotkeys. +8. You can now use BLEND/INBND/*_C/*_B/*_I to define a campaign a a CLOSER + campaign capable of taking inbound calls. diff --git a/www/vicidial/voice_lab.php b/www/vicidial/voice_lab.php index ecec97c2..2ce3a2a9 100644 --- a/www/vicidial/voice_lab.php +++ b/www/vicidial/voice_lab.php @@ -1,12 +1,16 @@ LICENSE: GPLv2 ### # # CHANGES # # 61220-1050 - First Build +# 70115-1246 - Added ability to define an exten to play # require("dbconnect.php"); @@ -16,18 +20,22 @@ $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_SELF=$_SERVER['PHP_SELF']; if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["message"])) {$message=$_GET["message"];} + elseif (isset($_POST["message"])) {$message=$_POST["message"];} if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_GET["NEW_VOICE_LAB"];} - elseif (isset($_POST["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_POST["NEW_VOICE_LAB"];} +if (isset($_GET["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_GET["NEW_VOICE_LAB"];} + elseif (isset($_POST["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_POST["NEW_VOICE_LAB"];} if (isset($_GET["KILL_VOICE_LAB"])) {$KILL_VOICE_LAB=$_GET["KILL_VOICE_LAB"];} elseif (isset($_POST["KILL_VOICE_LAB"])) {$KILL_VOICE_LAB=$_POST["KILL_VOICE_LAB"];} +if (isset($_GET["PLAY_MESSAGE"])) {$PLAY_MESSAGE=$_GET["PLAY_MESSAGE"];} + elseif (isset($_POST["PLAY_MESSAGE"])) {$PLAY_MESSAGE=$_POST["PLAY_MESSAGE"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} + elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); @@ -134,8 +142,16 @@ if ($NEW_VOICE_LAB > 0) { if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) ) { - echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW


\n"; + echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW
\n"; + echo "
or, you can enter an extension that you want played below
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Message Extension\n"; + echo "\n"; + echo "



\n"; $S='*'; $D_s_ip = explode('.', $server_ip); @@ -205,27 +221,68 @@ if ($NEW_VOICE_LAB > 0) } else { -echo "
Start a Voice Lab Session: 8600900
\n"; -echo "\n"; -echo "\n"; -echo "Your Server: \n"; -echo "
\n"; -echo "Campaign: "; -echo "
\n"; -echo "\n"; -echo "



\n"; + if ($PLAY_MESSAGE > 0) + { + if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) && (strlen($message) > 0) ) + { + echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW
\n"; + + echo "
or, you can enter an extension that you want played below
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Message Extension\n"; + echo "\n"; + echo "



\n"; + + $nn='99'; + $n='9'; + + $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','$server_ip','','Originate','VL$FILE_datetime$nn','Channel: $local_DEF$n$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $message','Priority: 1','Callerid: VL$FILE_datetime$nn','','','','','')"; + echo "|$stmt|\n

\n"; + $rslt=mysql_query($stmt, $link); + + echo "MESSAGE $message played at session $session_id on server $server_ip\n"; + + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "



\n"; + } + else + { + echo "ERROR!!!! Not all info entered properly\n

\n"; + echo "|$server_ip| |$session_id| |$campaign_id|\n

\n"; + echo "Back to main voicelab screen\n

\n"; + } + } +else + { + echo "
Start a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "Your Server: \n"; + echo "
\n"; + echo "Campaign: "; + echo "
\n"; + echo "\n"; + echo "



\n"; -echo "
Kill a Voice Lab Session: 8600900
\n"; -echo "\n"; -echo "\n"; -echo "Your Server: \n"; -echo "
\n"; -echo "Campaign: "; -echo "
\n"; -echo "\n"; -echo "



\n"; - + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "Your Server: \n"; + echo "
\n"; + echo "Campaign: "; + echo "
\n"; + echo "\n"; + echo "



\n"; + } }