⬆️ ⬇️

Customer Response Solutions: extension dial

At work, the task appeared to implement dialing to internal numbers of the organization. We use Cisco CallManager 4.2 as the IP PBX, and Customer Response Solutions 4.0 (IPCC) is used for the call center. The script was written using the Cisco Customer Response Solutions Editor, which comes with CRS. The basis of the script is taken from the package of delivery of the editor - aa.aef.



At the moment, the script is very simple and does not contain any voice greetings, processing of various events (such as a busy signal, an incorrectly dialed number). In the future, I plan to improve it to a full-fledged script with greetings, inquiries and all possible “fool” checks. Now I will describe in detail how to dial the number.





Script writing


Run the editor and create a new script.

image

')

Create two variables: one for storing the number, the other for the query. The request will be empty, because dialogue requires the presence of this parameter in the settings.

image



Now we need to add event handlers for the incoming call. This is the script:

image



Let's go through the main elements in order. The first Start operator is present by default in all scripts and means the beginning. The next two take the call. The next function Get Digit String allows you to receive dialed digits from the subscriber. It needs to be configured. After you have removed it from the object panel to the body of the script, right-click on it and select Properties . On the first General tab in the Result Digit String list, select the variable intNum . Next, on the Prompt tab, in the Prompt list, select the prompt variable. On the Input tab, you can adjust the parameters for receiving numbers from the subscriber. I left everything by default. Finally, on the Filter tab, you need to set the number of digits that will be expected from the subscriber. I put the number 4 in the Input Length field, since I have a four-digit internal numbering plan.



As long as we take into account that the user has entered everything correctly, we add the Call Redirect function to the Successful condition. This function will forward the call to the number that the subscriber has entered. It also needs to be configured. In the Call Redirect properties, in the Destination field, select the intNum variable.



We add the Set Contact Info function to the Successful condition of the Call Redirect function. We click on it right-click and in the plate Attributes opposite the parameter Handled we select - Marked - . After we add the End operator. This will mark the call of the subscriber as "processed" and end the session.



At the end of the script we add Terminate and End . This script is finished. We save it to disk, after which we upload it to the CRS server.



CRS Setup


Open the CRS admin panel, select the Script Management item.

image



image



Before us is a list of scripts present in the system. You need to add your own, just created. Click on the link Upload New Scripts .

image



Select the saved script and click the Upload button. Now that the script is flooded, you need to create an application. The application in CRS defines the script used by JTAPI for call processing, and also sets the initial parameters for the script, if any.

Select the item Application Management .

image



We see a list of available applications in the system:

image



Click Add a New Application . In the window that appears in the list, select the Cisco Script Application .

image



Call the application as you like. I called it CityToInternal. Description - write something that will allow you in the future to remember why this application. ID is set automatically by the system, but you can change it for example to 666, if this is not already taken by another application. Maximum number of sessions - the maximum number of calls simultaneously processed by the application. Script - choose a script, in my case CTI.aef. Click Update .



Now you need to create a Media Termination Dialog Group . Media groups are needed to interact with subscribers, namely, to handle DTMF tones.



Select the item Cisco media .

image



Get the list of groups. Click Add a New CMT Dialog Control Group .

image



On the page that appears, set the Description fields (something to identify the group) and the Maximum Number Of Channels (in my case 10). In fact, for all applications, you can create one group per 100 channels, for example. But I preferred to separate them.

image



Click Add and the group is added (in my screenshot Update, because I have already made a group).



Now select the JTAPI item and left click on the JTAPI Call Control Group . You need to create a call control group. This group will create the required number of CTI ports to which the subscriber’s call will be redirected and the application and our script will be activated from it.

image



Click Add a New JTAPI Call Control Group .

image



Fill in the fields. Group ID - is filled by the system automatically, but again you can put anything but the ones already used. Description - description of the group, put something recognizable. Often, Description fields are used to display items in settings lists, instead of IDs. Number of CTI ports - I installed 10, this is the number of CTI ports that will be created. Starting directory number - this group will require 10 numbers and here you need to specify the number of the first port (in my case 9980). These numbers should not be assigned to subscribers or Hunt-groups. Device name prefix - prefix for naming CTI ports. Device pool - selected Default. Media resource group list - select your primary MRGL. Display - a description of the CTI ports, in fact, what will be displayed next to the number on the phone screen (Alerting name) when the CTI calls you. Click Add .



Now you need to create a trigger. A trigger is a certain number that the subscriber will dial to access our application. The same item JTAPI , select the left JTAPI Triggers . We see the list of triggers in the system.

image



Click Add a New JTAPI Trigger .

image



Directory number - the number on which our application will be activated. To clarify, I have a 7-digit city number. These numbers get on the CCM from the router to which the PRI stream comes in through dial-peer voip. In your case, it can be anything - internal or any other number that falls on the CCM. Application name - select the application (in my case CityToInternal). Maximum number of sessions - the maximum number of sessions, set 10. Call control group - call control group (JTAPI Call control group). Primary dialog group - media group (Media Termination Dialog Group). The Device Name and Description are set automatically based on Prefix (DN) + Directory Number, but you can change them to suit you. Click Add and everything is ready.



Router configuration


Dial-peer on my voice-gateway looks like this:



dial-peer voice 254 voip

description === 1234567 ===

destination-pattern 1234567

session target ipv4:1.2.3.4

dtmf-relay h245-signal h245-alphanumeric

codec g711ulaw



1.2.3.4 - Cisco CallManager IP Address.



Now you can test the application by calling the number specified in the JTAPI trigger.



That's all for now. I hope my article will be useful to you.

Source: https://habr.com/ru/post/126407/



All Articles