Claim your Biolink Click Here
0 like 0 dislike
342 views
I want to do CTI integration in OTRS with asterisk and vicidial  so does anybody have any idea?
in Education & Reference by (4.6k points) | 342 views

1 Answer

1 like 0 dislike
Best answer
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>
by (1.6k points)
selected by

Related questions

0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 14, 2020 in Education & Reference by Marc (4.6k points) | 400 views
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked Oct 25, 2017 in Education & Reference by Krish (1.1k points) | 8.3k views
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,308 questions
1,469 answers
568 comments
4,809 users