Added non-loading webphone options and API agent call and webphone url functions

git-svn-id: svn://192.168.202.10@1852 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2012-08-20 15:08:18 +00:00
parent 0eafeb9033
commit 34f55397cb
10 changed files with 358 additions and 32 deletions
+3
View File
@@ -86,6 +86,9 @@ OTHER CHANGES:
12. Added callback user transfer page, linked from Admin Utilities in Reports
13. Added non-loading webphone options and API agent call and webphone url
functions
+14
View File
@@ -73,6 +73,7 @@
# 120213-1405 - Added vicidial_daily_ra_stats rolling
# 120512-2332 - Added loopback dialaround for ringing of calls
# 120706-1325 - Added Call Menu qualify SQL option
# 120820-1026 - Added clearing of vicidial_session_data table at end of day
#
$DB=0; # Debug flag
@@ -919,6 +920,19 @@ if ($timeclock_end_of_day_NOW > 0)
if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
$stmtA = "delete from vicidial_session_data where login_time < \"$TDSQLdate\";";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA);
if($DB){print STDERR "\n|$affected_rows vicidial_session_data old records deleted|\n";}
$stmtA = "optimize table vicidial_session_data;";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
##### BEGIN max stats end of day process #####
+61 -1
View File
@@ -1,4 +1,4 @@
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2012-08-10
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2012-08-19
This document describes the functions of an API(Application Programming Interface)
for the VICIDIAL Agent screen. This functionality will be rather limited at first
@@ -28,6 +28,8 @@ park_call - sends command to park customer or grab customer from park or ivr
logout - logs the agent out of the agent interface
recording - sends a recording start/stop signal or status of agent recording
webserver - display webserver information, very useful for load balanced setups
webphone_url - display the webphone url for the current agent's session
call_agent - send a call to connect the agent to their session
New scripts:
@@ -674,6 +676,64 @@ NOTICE: recording active - 6666|121242|20120810-012008__6666_|192.168.1.5|2012-0
--------------------------------------------------------------------------------
webphone_url -
DESCRIPTION:
display or launch the webphone url for the current agent's session
VALUES:
value -
REQUIRED, choices are below:
DISPLAY - displays only the URL for the webphone if enabled
LAUNCH - redirects the url to the webphone url to launch it
EXAMPLE URLS:
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=webphone_url&value=DISPLAY
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=webphone_url&value=LAUNCH
RESPONSES:
<if function is successful, the URL will be displayed or launched>
ERROR: no user found - 6666
ERROR: agent_user is not logged in - 6666
ERROR: webphone_url not valid - 6666|DISPLAY
ERROR: webphone_url error - webphone url is empty - 6666
ERROR: webphone_url error - no session data - 6666
--------------------------------------------------------------------------------
call_agent -
DESCRIPTION:
send a call to connect the agent to their session
VALUES:
value -
REQUIRED, choices are below:
CALL - places call from the agent session to the agent's phone
NOTES:
this function is not designed to work with on-hook agents
EXAMPLE URLS:
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=call_agent&value=CALL
RESPONSES:
ERROR: no user found - 6666
ERROR: agent_user is not logged in - 6666
ERROR: call_agent not valid - 6666|CALL
ERROR: call_agent error - entry is empty - 6666
ERROR: call_agent error - no session data - 6666
SUCCESS: call_agent function sent - 6666
--------------------------------------------------------------------------------
@@ -73,7 +73,7 @@ phone_context VARCHAR(20) default 'default',
phone_ring_timeout SMALLINT(3) default '60',
conf_secret VARCHAR(20) default 'test',
delete_vm_after_email ENUM('N','Y') default 'N',
is_webphone ENUM('Y','N') default 'N',
is_webphone ENUM('Y','N','Y_API_LAUNCH') default 'N',
use_external_server_ip ENUM('Y','N') default 'N',
codecs_list VARCHAR(100) default '',
codecs_with_template ENUM('0','1') default '0',
@@ -2661,6 +2661,18 @@ custom_table VARCHAR(20) DEFAULT NULL,
custom_variables TEXT
);
CREATE TABLE vicidial_session_data (
session_name VARCHAR(40) UNIQUE NOT NULL,
user VARCHAR(20),
campaign_id VARCHAR(8),
server_ip VARCHAR(15) NOT NULL,
conf_exten VARCHAR(20),
extension VARCHAR(100) NOT NULL,
login_time DATETIME NOT NULL,
webphone_url TEXT,
agent_login_call TEXT
);
ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY;
@@ -2817,7 +2829,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer;
CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log;
CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route);
UPDATE system_settings SET db_schema_version='1324',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1325',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+15
View File
@@ -31,3 +31,18 @@ ALTER TABLE system_settings ADD admin_list_counts ENUM('0','1') default '1';
UPDATE system_settings SET db_schema_version='1324',db_schema_update_date=NOW() where db_schema_version < 1324;
ALTER TABLE phones MODIFY is_webphone ENUM('Y','N','Y_API_LAUNCH') default 'N';
CREATE TABLE vicidial_session_data (
session_name VARCHAR(40) UNIQUE NOT NULL,
user VARCHAR(20),
campaign_id VARCHAR(8),
server_ip VARCHAR(15) NOT NULL,
conf_exten VARCHAR(20),
extension VARCHAR(100) NOT NULL,
login_time DATETIME NOT NULL,
webphone_url TEXT,
agent_login_call TEXT
);
UPDATE system_settings SET db_schema_version='1325',db_schema_update_date=NOW() where db_schema_version < 1325;
@@ -15,6 +15,7 @@ Qualify SQL||
This field allows you to input SQL - Structured Query Language - database fragments, like with Filters, to determine whether this call menu should play for the caller or not. This feature only works if the call has the callerIDname set prior to being sent to this call menu, either as an outbound survey transfer, or through the use of a drop call menu for an In-Group call. If there is a match, the call will proceed as normal. If there is no match, the call will go to the D option or the invalid option if no D option is set. You cannot use single-quotes in this field, only double-quotes if they are needed. Default is empty for disabled||
Admin List Counts||
This setting allows you to disable the list counts that appear on the Lists listing and the Campaign modify screens. Default is 1 for enabled||
The Y_API_LAUNCH option can be used with the agent API to launch the webphone in a separate Iframe or window||
############################################################ CLIENT
+204 -2
View File
@@ -60,10 +60,11 @@
# 120529-1551 - Fixed callback_datetime filter
# 120731-1206 - Allow dot in vendor_id
# 120809-2338 - Added recording and webserver functions
# 120819-1758 - Added webphone_url and call_agent functions
#
$version = '2.6-26';
$build = '120809-2338';
$version = '2.6-27';
$build = '120819-1758';
$startMS = microtime();
@@ -886,6 +887,207 @@ if ($function == 'recording')
################################################################################
### BEGIN - webphone_url - display or launch the webphone url for the current agent's session
################################################################################
if ($function == 'webphone_url')
{
if ( ( ($value!='DISPLAY') and ($value!='LAUNCH') ) or ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) )
{
$result = 'ERROR';
$result_reason = "webphone_url not valid";
echo "$result: $result_reason - $value|$agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
if (strlen($alt_user)>1)
{
$stmt = "select count(*) from vicidial_users where custom_three='$alt_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_user = $row[0];
}
else
{
$result = 'ERROR';
$result_reason = "no user found";
echo "$result: $result_reason - $alt_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
$stmt = "select count(*) from vicidial_live_agents where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select webphone_url from vicidial_session_data where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$rl_ct = mysql_num_rows($rslt);
if ($rl_ct > 0)
{
$row=mysql_fetch_row($rslt);
$webphone_url = $row[0];
if (strlen($webphone_url) > 5)
{
if ($value=='DISPLAY')
{
$result = 'NOTICE';
$result_reason = "webphone_url active and displayed";
echo "$webphone_url";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
$result = 'NOTICE';
$result_reason = "webphone_url active and launched";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
echo"<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$webphone_url\">\n";
echo"</HEAD>\n";
echo"<BODY BGCOLOR=#FFFFFF marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
echo"<a href=\"$webphone_url\">click here to continue. . .</a>\n";
echo"</BODY>\n";
}
}
else
{
$result = 'ERROR';
$result_reason = "webphone_url error - webphone url is empty";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = 'ERROR';
$result_reason = "webphone_url error - no session data";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = 'ERROR';
$result_reason = "agent_user is not logged in";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
}
################################################################################
### END - webphone_url
################################################################################
################################################################################
### BEGIN - call_agent - send a call to connect the agent to their session
################################################################################
if ($function == 'call_agent')
{
if ( ($value!='CALL') or ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) )
{
$result = 'ERROR';
$result_reason = "call_agent not valid";
echo "$result: $result_reason - $value|$agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
if (strlen($alt_user)>1)
{
$stmt = "select count(*) from vicidial_users where custom_three='$alt_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_user = $row[0];
}
else
{
$result = 'ERROR';
$result_reason = "no user found";
echo "$result: $result_reason - $alt_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
$stmt = "select count(*) from vicidial_live_agents where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select agent_login_call from vicidial_session_data where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$rl_ct = mysql_num_rows($rslt);
if ($rl_ct > 0)
{
$row=mysql_fetch_row($rslt);
$agent_login_call = $row[0];
if (strlen($agent_login_call) > 5)
{
$call_agent_string = preg_replace("/\|/","','",$agent_login_call);
$stmt="INSERT INTO vicidial_manager values('$call_agent_string');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$result = 'SUCCESS';
$result_reason = "call_agent function sent";
echo "$result: $result_reason - $agent_user\n";
$data = "$epoch";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
$result = 'ERROR';
$result_reason = "call_agent error - entry is empty";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = 'ERROR';
$result_reason = "call_agent error - no session data";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = 'ERROR';
$result_reason = "agent_user is not logged in";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
}
################################################################################
### END - call_agent
################################################################################
################################################################################
### BEGIN - external_dial - place a manual dial phone call
################################################################################
+34 -17
View File
@@ -382,12 +382,13 @@
# 120512-0849 - Added In-Group Manual Dial functions
# 120518-1225 - Added transfer call to answering machine message with hotkey (LTMG or XFTAMM)
# 120810-0056 - Added recording api function
# 120819-1747 - Added vicidial_session_data logging for webphone api function
#
$version = '2.6-350c';
$build = '120810-0056';
$version = '2.6-351c';
$build = '120819-1747';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=77;
$mysql_log_count=79;
$one_mysql_log=0;
require("dbconnect.php");
@@ -2499,16 +2500,18 @@ else
$SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate";
}
$WebPhonEurl='';
$webphone_content='';
if ($is_webphone != 'Y')
$TEMP_SIP_user_DiaL = $SIP_user_DiaL;
if ($on_hook_agent == 'Y')
{$TEMP_SIP_user_DiaL = 'Local/8300@default';}
### insert a NEW record to the vicidial_manager table to be processed
$agent_login_data="||$NOW_TIME|NEW|N|$server_ip||Originate|$SIqueryCID|Channel: $TEMP_SIP_user_DiaL|Context: $ext_context|Exten: $session_id|Priority: 1|Callerid: $SIqueryCID|||||";
$agent_login_stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
if ( ($is_webphone != 'Y') and ($is_webphone != 'Y_API_LAUNCH') )
{
$TEMP_SIP_user_DiaL = $SIP_user_DiaL;
if ($on_hook_agent == 'Y')
{$TEMP_SIP_user_DiaL = 'Local/8300@default';}
### insert a NEW record to the vicidial_manager table to be processed
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$agent_login_stmt\n";}
$rslt=mysql_query($agent_login_stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01041',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
echo "<!-- call placed to session_id: $session_id from phone: $SIP_user $SIP_user_DiaL -->\n";
@@ -2582,16 +2585,30 @@ else
$b64_system_key = base64_encode($system_key);
$WebPhonEurl = "$webphone_url?phone_login=$b64_phone_login&phone_login=$b64_phone_login&phone_pass=$b64_phone_pass&server_ip=$b64_server_ip&callerid=$b64_callerid&protocol=$b64_protocol&codecs=$b64_codecs&options=$b64_options&system_key=$b64_system_key";
if ($webphone_location == 'bar')
if ($is_webphone == 'Y')
{
$webphone_content = "<iframe src=\"$WebPhonEurl\" style=\"width:" . $webphone_width . "px;height:" . $webphone_height . "px;background-color:transparent;z-index:17;\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"true\" id=\"webphone\" name=\"webphone\" width=\"" . $webphone_width . "px\" height=\"" . $webphone_height . "px\"> </iframe>";
}
else
{
$webphone_content = "<iframe src=\"$WebPhonEurl\" style=\"width:" . $webphone_width . "px;height:" . $webphone_height . "px;background-color:transparent;z-index:17;\" scrolling=\"auto\" frameborder=\"0\" allowtransparency=\"true\" id=\"webphone\" name=\"webphone\" width=\"" . $webphone_width . "px\" height=\"" . $webphone_height . "px\"> </iframe>";
if ($webphone_location == 'bar')
{
$webphone_content = "<iframe src=\"$WebPhonEurl\" style=\"width:" . $webphone_width . "px;height:" . $webphone_height . "px;background-color:transparent;z-index:17;\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"true\" id=\"webphone\" name=\"webphone\" width=\"" . $webphone_width . "px\" height=\"" . $webphone_height . "px\"> </iframe>";
}
else
{
$webphone_content = "<iframe src=\"$WebPhonEurl\" style=\"width:" . $webphone_width . "px;height:" . $webphone_height . "px;background-color:transparent;z-index:17;\" scrolling=\"auto\" frameborder=\"0\" allowtransparency=\"true\" id=\"webphone\" name=\"webphone\" width=\"" . $webphone_width . "px\" height=\"" . $webphone_height . "px\"> </iframe>";
}
}
}
$stmt="DELETE from vicidial_session_data where user='$VD_login';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01078',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$stmt="INSERT INTO vicidial_session_data SET session_name='$session_name',user='$VD_login',campaign_id='$VD_campaign',server_ip='$server_ip',conf_exten='$session_id',extension='$extension',login_time='$NOW_TIME',webphone_url='$WebPhonEurl',agent_login_call='$agent_login_data';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01079',$VD_login,$server_ip,$session_name,$one_mysql_log);}
##### grab the campaign_weight and number of calls today on that campaign for the agent
$stmt="SELECT campaign_weight,calls_today,campaign_grade FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
+6 -5
View File
@@ -2162,7 +2162,7 @@ if ($non_latin < 1)
$delete_vm_after_email = ereg_replace("[^NY]","",$delete_vm_after_email);
$crm_popup_login = ereg_replace("[^NY]","",$crm_popup_login);
$ignore_list_script_override = ereg_replace("[^NY]","",$ignore_list_script_override);
$is_webphone = ereg_replace("[^NY]","",$is_webphone);
$is_webphone = ereg_replace("[^-_0-9a-zA-Z]","",$is_webphone);
$use_external_server_ip = ereg_replace("[^NY]","",$use_external_server_ip);
$agent_xfer_consultative = ereg_replace("[^NY]","",$agent_xfer_consultative);
$agent_xfer_dial_override = ereg_replace("[^NY]","",$agent_xfer_dial_override);
@@ -3140,12 +3140,13 @@ else
# 120706-1255 - Added Max stats date range and call menu qualify_sql options
# 120713-2123 - Added max stats download link and extended_vl option
# 120810-1018 - Added Admin List Counts system settings option
# 120820-1104 - Added is_webphone option Y_API_LAUNCH
#
# 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.6-373a';
$build = '120810-1018';
$admin_version = '2.6-374a';
$build = '120820-1104';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -7362,7 +7363,7 @@ if ($ADD==99999)
<BR>
<A NAME="phones-is_webphone">
<BR>
<B>Set As Webphone -</B> Setting this option to Y will attempt to load a web-based phone when the agent logs into their agent screen. Default is N.
<B>Set As Webphone -</B> Setting this option to Y will attempt to load a web-based phone when the agent logs into their agent screen. Default is N. The Y_API_LAUNCH option can be used with the agent API to launch the webphone in a separate Iframe or window.
<BR>
<A NAME="phones-webphone_dialpad">
@@ -28370,7 +28371,7 @@ if ($ADD==31111111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Screen Login: </td><td align=left><input type=text name=login size=15 maxlength=15 value=\"$row[6]\">$NWB#phones-login$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Login Password: </td><td align=left><input type=text name=pass size=10 maxlength=10 value=\"$row[7]\">$NWB#phones-pass$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Registration Password: </td><td align=left style=\"display:table-cell; vertical-align:middle;\"><input type=text id=reg_pass name=conf_secret size=20 maxlength=20 value=\"$row[72]\" onkeyup=\"return pwdChanged('reg_pass','reg_pass_img');\">$NWB#phones-conf_secret$NWE &nbsp; &nbsp; Strength: <IMG id=reg_pass_img src='images/pixel.gif' style=\"vertical-align:middle;\" onLoad=\"return pwdChanged('reg_pass','reg_pass_img');\"></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Set As Webphone: </td><td align=left><select size=1 name=is_webphone><option>Y</option><option>N</option><option selected>$row[74]</option></select>$NWB#phones-is_webphone$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Set As Webphone: </td><td align=left><select size=1 name=is_webphone><option>Y</option><option>N</option><option>Y_API_LAUNCH</option><option selected>$row[74]</option></select>$NWB#phones-is_webphone$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Webphone Dialpad: </td><td align=left><select size=1 name=webphone_dialpad><option>Y</option><option>N</option><option>TOGGLE</option><option>TOGGLE_OFF</option><option SELECTED>$row[78]</option></select>$NWB#phones-webphone_dialpad$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Webphone Auto-Answer: </td><td align=left><select size=1 name=webphone_auto_answer><option>Y</option><option>N</option><option SELECTED>$row[80]</option></select>$NWB#phones-webphone_auto_answer$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Use External Server IP: </td><td align=left><select size=1 name=use_external_server_ip><option>Y</option><option>N</option><option selected>$row[75]</option></select>$NWB#phones-use_external_server_ip$NWE</td></tr>\n";
@@ -11,10 +11,11 @@
# 120104-2023 - Added webphone options
# 120209-1545 - Added phone context option
# 120223-2249 - Removed logging of good login passwords if webroot writable is enabled
# 120820-1026 - Added webphone option Y_API_LAUNCH
#
$admin_version = '2.4-5';
$build = '120223-2249';
$admin_version = '2.6-6';
$build = '120820-1026';
require("dbconnect.php");
@@ -76,7 +77,7 @@ if ($non_latin < 1)
$alias_suffix = ereg_replace("[^0-9a-zA-Z]","",$alias_suffix);
$protocol = ereg_replace("[^-_0-9a-zA-Z]","",$protocol);
$local_gmt = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$local_gmt);
$is_webphone = ereg_replace("[^NY]","",$is_webphone);
$is_webphone = ereg_replace("[^-_0-9a-zA-Z]","",$is_webphone);
$webphone_dialpad = ereg_replace("[^-_0-9a-zA-Z]","",$webphone_dialpad);
$webphone_auto_answer = ereg_replace("[^NY]","",$webphone_auto_answer);
$use_external_server_ip = ereg_replace("[^NY]","",$use_external_server_ip);
@@ -229,7 +230,7 @@ if ($action == "HELP")
<BR>
<A NAME="is_webphone">
<BR>
<B>Set As Webphone -</B> Setting this option to Y will attempt to load a web-based phone when the agent logs into their agent screen. Default is N.
<B>Set As Webphone -</B> Setting this option to Y will attempt to load a web-based phone when the agent logs into their agent screen. Default is N. The Y_API_LAUNCH option can be used with the agent API to launch the webphone in a separate Iframe or window.
<BR>
<A NAME="webphone_dialpad">
@@ -318,7 +319,7 @@ if ($action == "BLANK")
echo "<tr bgcolor=#B6D3FC><td align=right>Client Protocol: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option></select> $NWB#protocol$NWE </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Local GMT: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option selected>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option></select> (Do NOT Adjust for DST) $NWB#gmt$NWE </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Phone Context: </td><td align=left><input type=text name=phone_context size=20 maxlength=20> $NWB#phone_context$NWE </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Set As Webphone: </td><td align=left><select size=1 name=is_webphone><option>Y</option><option selected>N</option></select>$NWB#is_webphone$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Set As Webphone: </td><td align=left><select size=1 name=is_webphone><option>Y</option><option selected>N</option><option>Y_API_LAUNCH</option></select>$NWB#is_webphone$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Webphone Dialpad: </td><td align=left><select size=1 name=webphone_dialpad><option selected>Y</option><option>N</option><option>TOGGLE</option><option>TOGGLE_OFF</option></select>$NWB#webphone_dialpad$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Webphone Auto-Answer: </td><td align=left><select size=1 name=webphone_auto_answer><option selected>Y</option><option>N</option></select>$NWB#webphone_auto_answer$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Use External Server IP: </td><td align=left><select size=1 name=use_external_server_ip><option>Y</option><option selected>N</option></select>$NWB#use_external_server_ip$NWE</td></tr>\n";