diff --git a/app/call_center/call_center_agent_edit.php b/app/call_center/call_center_agent_edit.php index 1d39a86c50..9674e8c212 100644 --- a/app/call_center/call_center_agent_edit.php +++ b/app/call_center/call_center_agent_edit.php @@ -389,7 +389,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action); - switch_select_destination("call_center_contact", "", "agent_contact", $agent_contact, "", ""); + switch_select_destination("call_center_contact", "", "agent_contact", $agent_contact, "width: 350px;", ""); echo "
\n"; echo $text['description-contact']."\n"; diff --git a/app/call_center/call_center_agents.php b/app/call_center/call_center_agents.php index c1db3e0ba5..e967c5904a 100644 --- a/app/call_center/call_center_agents.php +++ b/app/call_center/call_center_agents.php @@ -119,7 +119,7 @@ else { //echo th_order_by('agent_busy_delay_time', $text['label-busy_delay_time'], $order_by, $order); echo ""; if (permission_exists('call_center_agent_add')) { - echo "$v_link_label_add"; + echo "".$v_link_label_add.""; } echo "\n"; echo "\n"; @@ -128,31 +128,48 @@ else { } else { //received results foreach($result as $row) { - $tr_link = (permission_exists('call_center_agent_edit')) ? "href='call_center_agent_edit.php?id=".$row[call_center_agent_uuid]."'" : null; + $tr_link = (permission_exists('call_center_agent_edit')) ? "href='call_center_agent_edit.php?id=".$row['call_center_agent_uuid']."'" : null; echo "\n"; //echo " ".$row[domain_uuid]."\n"; echo " "; if (permission_exists('call_center_agent_edit')) { - echo "".$row[agent_name].""; + echo "".$row['agent_name'].""; } else { - echo $row[agent_name]; + echo $row['agent_name']; } echo " \n"; - echo " ".$row[agent_type]." \n"; - echo " ".$row[agent_call_timeout]." \n"; - echo " ".$row[agent_contact]." \n"; - echo " ".$row[agent_max_no_answer]." \n"; - echo " ".$row[agent_status]." \n"; + echo " ".$row['agent_type']." \n"; + echo " ".$row['agent_call_timeout']." \n"; + echo " "; + // parse out gateway uuid + $bridge_statement = explode('/', $row['agent_contact']); + if ($bridge_statement[0] == 'sofia' && $bridge_statement[1] == 'gateway') { + $gateway_uuid = $bridge_statement[2]; + // retrieve gateway name from db + $sql = "select gateway from v_gateways where gateway_uuid = '".$gateway_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (count($result) > 0) { $gateway_name = $result[0]['gateway']; } + unset ($prep_statement, $sql); + echo str_replace($gateway_uuid, $gateway_name, $row['agent_contact']); + } + else { + echo $row['agent_contact']; + } + echo "  \n"; + echo " ".$row['agent_max_no_answer']." \n"; + echo " ".$row['agent_status']." \n"; //echo " ".$row[agent_wrap_up_time]." \n"; //echo " ".$row[agent_reject_delay_time]." \n"; //echo " ".$row[agent_busy_delay_time]." \n"; echo " \n"; if (permission_exists('call_center_agent_edit')) { - echo "$v_link_label_edit"; + echo "".$v_link_label_edit.""; } if (permission_exists('call_center_agent_delete')) { - echo "$v_link_label_delete"; + echo "".$v_link_label_delete.""; } //echo " \n"; //echo " \n"; @@ -171,7 +188,7 @@ else { echo " $paging_controls\n"; echo " "; if (permission_exists('call_center_agent_add')) { - echo "$v_link_label_add"; + echo "".$v_link_label_add.""; } echo " \n"; echo " \n";