INGROUP
WEBFORM: http://IP/otrs/index.pl?Action=AgentTicketPhoneCTI;CallerID=--A--phone_number--B--;Screen=AgentCustomerInformationCenter
Get Call Launch: WEBFORM
OTRS 5.0.X
The Znuny4OTRS-Repo package needs to be installed.
You will find the package here: http://znuny.com/#!/znuny4otrs
• OTRS 4 or OTRS 5 needs to be installed
• An installed telephone client on your workstation which supports open an URL on incoming calls and optional dial via an URL schemes
• Configure your local CTI client/agent to open a new browser window (OTRS window) on every incoming phone call. For example: YOUR-OTRS-HOST/otrs/index.pl?Action=AgentTicketPhoneCTI;CallerID=XXX
• We added new parameter screen. If you pass "AgentCustomerInformationCenter" to the screen var, you get linked to the customer information center. YOUR-OTRSHOST/otrs/index.pl?Action=AgentTicketPhoneCTI;CallerID=XXX;Screen=AgentCustomerInformationCenter;
• The telephone number needs to be configured as a searchable field (Check Kernel/Config.pm -> CustomerUser -> CustomerUserSearchFields)
If the caller is stored with his caller-id in the local database, the ticket create screen will be opened and the caller will be preselected as customer. If you already have your customerdata in OTRS, the phonenumber might be provided with a URL to start external phonecalls.
Details:
Download Znuny4OTRS-Repo-5.0.55.opm
Upload via package manager
Install Znuny4OTRS-CTI adon
Configuration
/opt/otrs/Kernel/Config/Files/Znuny4OTRSCTI.pm
OR
/opt/otrs/Kernel/Config.pm
Update the value for C2C
[ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', 'http://IP/cti/call.php?phone=[% Data.UserPhone %]&Oid=[% Data.OwnerID %]&agent=[% Env("UserComment") | uri %]', 0, 'AsPopup OTRSPopup_TicketAction' ],
Where Agent has the value in a comment textbox
call.php
<!DOCTYPE html>
<html>
<head>
<title>Call Customer</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<?php
$phone = $_GET['phone'];
$agent = $_GET['agent'];
?>
<div class="container">
<input type="hidden" id="phone" value="<?php echo $phone ?>">
<input type="hidden" id="agent" value="<?php echo $agent ?>">
<button id='call_number' style="position: absolute;bottom: 50%;left: 20%; height: 50px; width: 250px" class="btn btn-primary btn-lg">Call Now</button>
<script>
$(document).ready(function () {
$("#call_number").click(function () {
var phone = $("#phone").val();
var agent = $("#agent").val();
var dataString = 'source=api&user=user&pass=pwd&agent_user='+ agent +'&function=external_dial&value=' + phone + 'login='+ agent +'&phone_code=&search=NO&preview=NO&focus=NO';
var btn = $("#call_number");
$.ajax({
type: "GET",
url: "http://VICI-IP/agent/api.php",
data: dataString,
cache: false,
success: function (result) {
btn.html('Hangup');
btn.css({"background-color": "red"});
console.log(result);
window.close();
}
});
console.log(number);
});
});
</script>
</body>
</html>