<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ark Mahata on Medium]]></title>
        <description><![CDATA[Stories by Ark Mahata on Medium]]></description>
        <link>https://medium.com/@ark.mahata?source=rss-eea8fad5381c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gsYLf_yyjskC5d1v</url>
            <title>Stories by Ark Mahata on Medium</title>
            <link>https://medium.com/@ark.mahata?source=rss-eea8fad5381c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:01:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ark.mahata/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Voice-Conn: Call Controls]]></title>
            <link>https://tech.makemytrip.com/voice-conn-call-controls-9d89bfe3e90c?source=rss-eea8fad5381c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d89bfe3e90c</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[contact-centre-software]]></category>
            <category><![CDATA[telephony-software]]></category>
            <category><![CDATA[telephony]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ark Mahata]]></dc:creator>
            <pubDate>Mon, 20 May 2019 11:33:25 GMT</pubDate>
            <atom:updated>2019-05-20T11:33:25.135Z</atom:updated>
            <content:encoded><![CDATA[<p>In the couple of posts on Voice-Conn we have covered its Design, Features &amp; Implementation. This post is just to provide you an insight on how to implement the various Telephony Call Controls.</p><p>The Call Control Functions discussed are — <br>1. Answer<br>2. Hold<br>3. Unhold<br>4. Drop<br>5. New Call<br>6. Consultation Call<br>7. Transfer Call<br>8. Conference Call</p><p>Implementation of the Call Control Functions divided into 3 parts -<br>1. INPUT<br>2. PREREQUISITE<br>3. EXECUTION<br>If needed i have pieced together some code snippets.</p><h3>Answer Call:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*BpiOsOt2H3jr8SGA_7o5BA.png" /><figcaption>Figure 7: Agent screen — Incoming Call</figcaption></figure><p><strong>Input: </strong>CallId of the call which is to be answered.</p><p><strong>Prerequisite: </strong>One of the “TerminalConnection” has to be in <strong>RINGING </strong>state.</p><p><strong>Execution:</strong> Once we find the TerminalConnection that is in RINGING state we need to invoke <strong>answer()</strong> method on the <strong>TerminalConnection </strong>object.</p><p><em>For a head start I would provide some code snippet as it wont be much relevant as constructs may vary as per your implementation.</em></p><pre><em>// Get the call Object , using p for provider </em><br>Call call = p.getCall(callId);<br><em>// Get the connections in the call</em><br>Connection[] conns = call.getConnections();</pre><pre>for (Connection c: conns) {<br>  if (!c.getAddress().getName().equals(p.getAgentDeviceID()))<br>    continue;</pre><pre>for (TerminalConnection tConn : c.getTerminalConnections()) {<br>    if (tConn.getTerminal().getName().equals(p.getAgentDeviceID())&amp;&amp;<br>        tConn.getState() == TerminalConnection.RINGING){<br>          return tConn; // Return the Terminal Connection which is RINGING<br>    }  <br>  }<br>}</pre><h3>Drop Call:</h3><p><strong>Input: </strong>CallId of the call which is to be dropped.</p><p><strong>Prerequisite: </strong>One of the “Connection” has to be in either one of these states <strong>CONNECTED, INPROGRESS, ALERTING, FAILED </strong>state.</p><p><strong>Execution:</strong> Once we find the Connection(from Call using callId) is either one of these states — CONNECTED, INPROGRESS, ALERTING, FAILED<strong> </strong>we need to invoke <strong>disconnect()</strong> method on the <strong>Connection </strong>object.</p><h3>Hold Call:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*tQTfN0XbIdFGyHdzQpMn-Q.png" /><figcaption>Figure 8: Agent screen — Active TALKING call</figcaption></figure><p><strong>Input: </strong>CallId of the call which is to be held.</p><p><strong>Prerequisite: </strong>One of the “TerminalConnection” has to be in <strong>TALKING </strong>state.</p><p><strong>Execution:</strong> Once we find the TerminalConnection that is in TALKING state we need to invoke <strong>hold()</strong> method on the <strong>CallControlTerminalConnection </strong>object.</p><h3>Resume Call:</h3><p><strong>Input: </strong>CallId of the call which is to be resumed.</p><p><strong>Prerequisite: </strong>One of the “TerminalConnection” has <strong>HELD</strong> state.</p><p><strong>Execution:</strong> Once we find the TerminalConnection that is in HELD state we need to invoke <strong>unhold()</strong> method on the <strong>CallControlTerminalConnection </strong>object.</p><h3>Call Dialling Options:</h3><h3>New Call:</h3><p><strong>Input: </strong>Number to be dialled (0 to be prefixed in case of external network’s number/mobile number).</p><p><strong>Prerequisite: </strong>Enough Channels are free to dial a new Call.</p><p><strong>Execution:</strong></p><ol><li>Using the JTAPI provider get the telephony Address and telephony Terminal object.</li><li>Then create a telephony Call object using the JTAPI provider.</li><li>Once that is created call the <strong>connect()</strong> method on the <strong>Call </strong>object.</li></ol><pre>/** We need to get the appropriate objects associated with the originating terminal of the telephone call. We arbitrarily choose one of the Terminal from the Address.**/</pre><pre>// p is used to denote provider</pre><pre>try {</pre><pre>// Step - 1 A<br>Address origaddr = <br> p.getJtapiInstance().getAddress(p.getAgent().getTerminalAddress());</pre><pre>// Step - 1 B<br>Terminal origterm = origaddr.getTerminals()[0];</pre><pre>// Step - 2<br>Call mycall = provider.getJtapiInstance().createCall();</pre><pre>// Step - 3<br>mycall.connect(origterm, origaddr, number);</pre><pre>} catch (Exception e) {</pre><h3>Consultation Calls:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*ybcEu4QR2fCSovhDV5-JpQ.png" /><figcaption>Figure 9: Agent Screen — Two Active Calls</figcaption></figure><p>They are special types of telephony calls often created for the purpose of conferencing or transferring with a Call. Thus, consultation calls are always associated with another existing Call.</p><p><strong>Input: </strong>Number to be dialled and callId of an existing call which is in TALKING state.</p><p><strong>Prerequisite: </strong>One existing call in TALKING state and enough Channels are free to dial a new Call.</p><p><strong>Execution:</strong> Find the existing Call object that is in TALKING state.Then create a telephony Call object using the JTAPI provider.Once that is created call the <strong>consult()</strong> method on the <strong>CallControlCall </strong>object.</p><p><em>If consultation call is successful the existing call is put on HOLD and the new call becomes ACTIVE. We use it as the first step of any TRANSFER or CONFERENCE.</em></p><pre>try {</pre><pre>// P for provider</pre><pre>long tCallId = // TALKING CallId;<br>Call tCall = p.getCall(tCallId);<br>Call myCall = p.getJtapiInstance().createCall();</pre><pre>((CallControlCall) myCall).consult(getController(p, tCall), number);<br>} catch (Exception e) {</pre><pre>}</pre><pre>/** How to get the Controller **/</pre><pre>public TerminalConnection getTransferController(Provider p, Call tCall) {</pre><pre>for (Connection c: tCall.getConnections()) {<br>    if (c.getTerminalConnections() == null) {<br>       continue;<br>    }</pre><pre>for (TerminalConnection t : c.getTerminalConnections()) {<br>       if (t instanceof CallControlTerminalConnection &amp;&amp;  <br> t.getTerminal().getName().equals(p.getAgent().getTerminalAddress())          ) {<br>            return t;<br>          }<br>     }<br>  }<br>  return null;<br>}</pre><h3>Transfer Call:</h3><p>This is a way by which we can move one call to a different call.</p><p><strong>Input: </strong>CallId of calls that are participating in the transfer. Though you need not provide those your infra supports only two Channels or there are exactly two ACTIVE calls.</p><p><strong>Prerequisite: </strong>Two active calls one with TerminalConnection state as <strong>HELD</strong> and the other with TerminalConnection State as <strong>RINGING/TALKING</strong>.</p><p><strong>Execution of Transfer:</strong></p><ol><li>In order to execute a transfer, there must be a participant/terminal which acts as the <em>transfer controller</em>. <br><strong><em>Transfer Controller </em></strong><em>is</em><strong><em> </em></strong><em>a TerminalConnection around which the transfer is performed.</em></li><li>We need to find the Call object which has the TerminalConnection in HELD state. This represents the call that would be transferred.</li><li>Find the Call Object which which has a TerminalConnection state as RINGING/TALKING.</li><li>Once we find both the Call Objects we need to invoke the <strong>transfer() </strong>method of <strong>CallControlCall</strong> Class.</li><li>Once Transfer is complete the Transfer Controller is no longer associated with either of the Calls.</li></ol><pre><em>((CallControlCall) talkingCall).transfer(heldCall);</em></pre><h3>Conference:</h3><p>This is a way by which two telephone calls to be “merged”. That is, the two Calls are merged into a single Call with the union of all of the participants of the two Calls.</p><p><strong>Input: </strong>CallId of calls that are participating in the conference. Though you need not provide those your infra supports only two Channels or there are exactly two ACTIVE calls.</p><p><strong>Prerequisite: </strong>Two active calls one with TerminalConnection state as <strong>HELD</strong> and the other with TerminalConnection State as <strong>TALKING</strong>.</p><p><strong>Execution of Conference:</strong></p><ol><li>In order to execute a transfer, there must be a participant/terminal which acts as the <em>conference controller</em>. <br><strong><em>Conference Controller </em></strong><em>is</em><strong><em> </em></strong><em>a TerminalConnection around which the transfer is performed.</em></li><li>We need to find the Call object which has the TerminalConnection in HELD state. This represents the call that would be transferred.</li><li>Find the Call Object which which has a TerminalConnection in TALKING stat.</li><li>Once we find both the Call Objects we need to invoke the <strong>conference() </strong>method of <strong>CallControlCall</strong> Class.</li><li>Once the conference is complete both the calls are merged into a single call.</li></ol><pre><em>((CallControlCall) talkingCall).conference(heldCall);</em></pre><p><em>All necessary functions can you found in telephony jar and the vendor’s package. It was a nightmare for us going through the documentation to figure out the detail on various functions and packages. Thus i believed this summary would save good time and give you a head start when you dive into the unknown.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d89bfe3e90c" width="1" height="1" alt=""><hr><p><a href="https://tech.makemytrip.com/voice-conn-call-controls-9d89bfe3e90c">Voice-Conn: Call Controls</a> was originally published in <a href="https://tech.makemytrip.com/">MakeMyTrip-Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Voice-Conn : Computer telephony integration -Part II]]></title>
            <link>https://tech.makemytrip.com/voice-conn-computer-telephony-integration-part-ii-381bda78d72d?source=rss-eea8fad5381c------2</link>
            <guid isPermaLink="false">https://medium.com/p/381bda78d72d</guid>
            <category><![CDATA[akka]]></category>
            <category><![CDATA[telephony]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[contact-centre-solutions]]></category>
            <category><![CDATA[computer-telephony]]></category>
            <dc:creator><![CDATA[Ark Mahata]]></dc:creator>
            <pubDate>Mon, 20 May 2019 11:28:07 GMT</pubDate>
            <atom:updated>2019-05-20T11:39:02.440Z</atom:updated>
            <content:encoded><![CDATA[<h3>Voice-Conn : Computer telephony integration -Part II</h3><p>This is in continuation of the<a href="https://medium.com/makemytrip-engineering/voice-conn-computer-telephony-integration-part-i-6e35dc63fb00"> <strong>Previous Post (Computer telephony integration -Part I)</strong></a> were we have discussed on the Features &amp; Design of Voice-Conn CTI application. In this post i would discuss implementation details of the features.</p><blockquote><em>To get more context out of the discussion one should be aware of basic telephony related programming jargon’s and packages. You can go through the documentation provided by </em><a href="https://downloads.avaya.com/elmodocs2/AES/4.1/jtapi/javax/telephony/package-summary.html"><em>Avaya</em></a><em>. The documentation would help you build the necessary tech dept to proceed forward.</em></blockquote><h3>Implementation of Call Centre functions -</h3><p>Call Centre functions deals with the life cycle of an of Agent‘s session from log-in to log-out and in between tools to mark itself ‘Ready, Not Ready with different aux modes.</p><h3>Log-In:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*g8ILqClJGXdDDfFuLgmBOg.png" /><figcaption>Figure 3: (Left Image) Voice-Conn login (Right Image)Agent Ready State-After Login</figcaption></figure><p>Agent can login to his/her terminal using his agent id, terminal address (extension number) and password. In addition to these we have a SSO authentication layer that would authenticate the agent and extract organisation level details which are internally used in other business processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IfgbUJwYJq713x1CHyJFiQ.png" /><figcaption>Figure 4: Log-in Sequence</figcaption></figure><ol><li>Incoming request is received by Session Manager(Actor). It gets initialised by the Message Delegator (Figure 2) on the basis of agent’s id and terminal. <br><strong><em>Message Delegator</em></strong><em> either creates/initialises a new Session Manager Actor or delegates to the correct shard region is which the Session Manager Actor is present.<br></em>Then it calls the SSO Application to authenticate the user’s auth-token.</li><li>On successful authentication, the Session Manager requests the MMT-Provider to return an instance of the actual provider. MMT-Provider would use the Abstract Factory to return the instance of vendor’s provider. <br><em>In our case the JTAPI peer object is created and a provider is returned. (using the AES link which has the provider, address, communication protocol and the username and password for authentication)</em></li><li>Then Session Manager instantiates the Agent which is representation of the LucentAgent object.</li><li>On instantiation of the Agent, it attempts to login the agent. In order to do so the provider is asked to return an instance of LucentTerminal using the terminal address provided in request. Once the LucentTerminal is returned we just add the agent to the terminal in MANUAL-IN mode using the agent Id and password.</li><li>After login we start monitoring the terminal address in order to receive all events on the terminal. In order to do the same we create a TerminalConnectionProxy object for the terminal and ask the Provider to add the same as a Call Listener. We also start a Timer Task to poll the state of Agent at regular intervals.<br><em>Terminal Connection Proxy extends and provides implementation of functions for Avaya’s CallControlTerminalConnectionListenerAdapter. This delegates connection/connection terminal events which are handled by the Event Handler which is responsible to handle the same.</em></li><li>Once the agent is successfully created the Session Manager creates couple of child actor -<br><strong>- AgentSessionState Manager:</strong> To maintain the state of agent’s session(call’s being handles by the agent) and observes the changes in Call &amp; Agent’s State (Call &amp; Agent States are Subject). It also handles the Agent’s request from UI.<br><strong>- Publisher: </strong>To maintain the details of connected clients which is later of used by the Broadcast Bus and to bridge notifications to client.</li><li>Once created AgentSessionState Manager subscribes to the Provider and Agent object to handle any change in their states.</li></ol><h3>Logout:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gowut__Mup-iLkqxmrZoCw.png" /><figcaption>Figure 5: Logout Sequence</figcaption></figure><ol><li>The LOGOUT event is received by by SessionManager actor and sends the message to AgentSessionState Manager actor.</li><li>AgentSessionState Manager invokes the logout method of Agent Object.</li><li>The Agent object requests the MMT-Provider to remove the agent which in turn invokes the removeAgent method of over the LucentTerminal which removes the agent from the terminal. After that it unsubscribes the terminal from Call Listener and stops polling the agent’s state.</li><li>Next the AgentSessionState Manager unsubscribes the observers on Agent &amp; Call State and sends the state to the Publisher which relays the same to clients using the Broadcast Bus.</li><li>After sending the message to Broadcast Bus the Publisher send a PoisonPill Message to the Parent Actor (SessionManager) which stops itself &amp; the Child Actors (using PoisonPill).</li></ol><h3>Agent Phone Control &amp; Implementation:</h3><p>The general sequence flow is the same for all Agent Call Controls or events generating from an agent’s UI. So we would discuss the base sequence and then see how the handler uses the Provider to execute the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEsEmMzb6e4uVF-cfOevjA.png" /><figcaption>Figure 6: Action Delegation Sequence</figcaption></figure><ol><li>All Call Control Messages are delivered to the AgentSessionState Manager by the Session Manager. On receiving the same it decorates &amp; encapsulates the event and necessary parameters within a Transaction based on the type of control being executed by the agent.</li><li>After the Transaction is created the same is queued to the Message Handler Service.</li><li>Message Handler Service processes the message by delegating the same to the Event Handler which provides the execution for the action.</li><li>EventHandler pre-processes the request using the passed parameters, terminal &amp; call states. Once the required details are evaluated and input is validates the Handler user the provider to carry out telephony specific functions.</li></ol><blockquote>We won’t discuss the various Call Control Implementation this this post as its more related to telephony &amp; vendors. Though we have tried to provide some detail on how to implement them in <a href="https://medium.com/makemytrip-engineering/voice-conn-call-controls-9d89bfe3e90c"><strong>Voice-Conn: Call Controls</strong></a><strong>.</strong></blockquote><h3>Screen Popup:</h3><ol><li>Whenever a call lands in IVR, <strong>UCID</strong> (Universal Caller ID) is generated. UCID is a unique 20 character number that is given to each call by the Communication server. This used by the communication server or other voice response units to track and identify a call.</li><li>Before the agent transfer is initiated by IVR it saves all customer input like CustomerId, BookingId, TaskId, current node in the IVR call tree, alternate identification number etc in couchbase against the UCID.</li><li>We had the option of using UUI (User to User Information) to pass data with the call but it has the restriction(string value which is 32 characters long) on the about of data that can be passed through it. <br><em>We tried sending a longer string and it seemed all the data is lost.</em></li><li>Before saving the state in couchbase we create a Task in CRM to track all the Call attributes and the same is assigned to Agent’s Queue were the call is Transferred.</li><li>Once Voice-Conn receives an INCOMING call, it retrieves the session’s detail using the UCID and then updates the Task in CRM with the EmployeeId of he agent on which the call has landed.</li><li>Voice-Conn provides the TaskId to CRM application along with the call details. Using the TaskId the CRM application is able to show a personalised CRM view with customer details like ANI, DNIS, Bookings etc.</li></ol><h3>CallObserver: Terminal Connection Proxy</h3><p>As discussed earlier the provider adds the TeminalConnection Proxy as a call listener on the the terminal that is being used by the agent.Thus the TerminalConnection proxy reports all changes to a Call object on the given terminal address. Let’s have a look at how these events are handled by the Voice-Conn and how it eventually reaches the AgentSessionState Manager and via that to the Client/Agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zMC5lPui1dWlxCw6-PkqaA.png" /><figcaption>Figure 10: CallListener event sequence.</figcaption></figure><ol><li>All call related changes on an agent’s terminal are pushed as a transaction of events(Meta Process) to the Proxy which extends CallControlTerminalConnectionListenerAdapter class (jtapi callcontrol package). <br><em>There are 3 types of Meta Process — <br>SingleCallMetaProgress, MultiCallMetaTransfer, MultiCallMetaMerge.</em></li><li>The Proxy receives the Meta-Process and translates them to a Transaction.<br>The Transaction contains a list of events. Meta-Process Start and End events defines the events that are part of the Transaction.</li><li>After defining the Transaction the same is Queued to Message Handler Service.</li><li>The Message Handler Service processes the message by delegating the same to the Event Handler which provides the execution to handle the event.</li><li>The EventHandler processes the request using the Meta-Event &amp; Call passed a parameter. Post which it tags the reason / cause for this event and updates the status of CallState.</li><li>CallState (subject) notifies it subscribers about the change and provides the Call Object as an argument.</li><li>AgentStateSession Manager documents the call object and updates its internal state based on the status of connections etc.</li><li>This update is then propagated to the Agent’s Screen.</li></ol><h3>Requesting Agent State changes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*Nm8HGqdT7mw1ksLhShoZIQ.png" /></figure><p>There are situations when an Agent wishes to modify their state to ensure that, on call completion, no additional calls are forwarded to them as they require additional time to handle after call work, and wishes to override the default action, that would automatically move their Agent State to READY upon call completion, to a WORK NOT READY/BUSY state instead.</p><p>To achieve the same, whenever a call lands on the agents screen by default we request agent state change with “a pending flag” that typically makes sure that the state change is queued and is in effect before the next state transition. Thus on call completion the Agent’s state is changed to WORK NOT READY . The app gives a default time of 30 secs to complete all Call related work post which it would again request a Agent State Change request to make the agent READY. Throughout the course if the Agent wants to make himself/herself available before the default time of 30 sec , they may trigger the state change from the app.</p><h3>User Application</h3><p>To round up the whole discussion, just a few pointers on the User Application which is being server by Voice-Conn.</p><ul><li>Built on <strong>ReactJs.</strong></li><li>Leveraging <strong>Redux </strong>as a store.</li><li>Real-time 2-way communication using <strong>Socket.IO.</strong></li><li>Designed as a <strong>Micro App</strong>, can run within/outside the CRM Application.</li><li>Integrated <strong>Contact Book.</strong></li><li>Simplification of complex telephony through a simple UI paradigm.</li></ul><h3>Conclusion</h3><p><em>Within the organisation there was lot of buzz surrounding Voice-Conn’s roll-out and initial roll-out has just generated more expectations out of it. We can anticipate that going forward its going to be an integral part of our Contact Centre Suite empowering Agents to provide our Customers with even better Service.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=381bda78d72d" width="1" height="1" alt=""><hr><p><a href="https://tech.makemytrip.com/voice-conn-computer-telephony-integration-part-ii-381bda78d72d">Voice-Conn : Computer telephony integration -Part II</a> was originally published in <a href="https://tech.makemytrip.com/">MakeMyTrip-Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Voice-Conn : Computer telephony integration -Part I]]></title>
            <link>https://tech.makemytrip.com/voice-conn-computer-telephony-integration-part-i-6e35dc63fb00?source=rss-eea8fad5381c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e35dc63fb00</guid>
            <category><![CDATA[socketio]]></category>
            <category><![CDATA[telephony-software]]></category>
            <category><![CDATA[telephony]]></category>
            <category><![CDATA[contact-center-software]]></category>
            <category><![CDATA[akka]]></category>
            <dc:creator><![CDATA[Ark Mahata]]></dc:creator>
            <pubDate>Mon, 20 May 2019 11:25:58 GMT</pubDate>
            <atom:updated>2019-05-20T11:48:31.663Z</atom:updated>
            <content:encoded><![CDATA[<h3>Voice-Conn : Computer telephony integration -Part I</h3><p><strong>Voice-Conn</strong> is a <strong>CTI (Computer Telephony Integration)</strong> application build on top of Infrastructure provided by Avaya. It enables Contact Centre to identify and authenticate Customers (<strong><em>Contact Card)</em></strong> and provide common functions of telephony via a Web based Interface.</p><blockquote>Computer telephony integration or CTI, is a common name used for any technology that provides an integrated and coordinated interaction between a telephone and a computer.</blockquote><p>This discussion on Voice-Conn is divided into two parts -<br><strong>Part I :</strong> Discussion about the Motivation, Design &amp; Features.<br><strong>Part II:</strong> Implementation detail on features of Voice-Conn using telephony.</p><p>Along with the them we have tried to provide a summarised detail on implementation of the various <a href="https://medium.com/makemytrip-engineering/voice-conn-call-controls-9d89bfe3e90c"><strong>Call Control Function (Voice-Conn: Call Controls).</strong></a></p><h3><strong>Motivation:</strong></h3><p>In order to provide Customer Contact Card and call controls we use a third-party windows application which has be to be installed in every agent’s desktop. This application uses a local server that facilitates connection with Avaya AES(Application Enablement Services) which is in-turn used to monitor changes / events taking place on a Call or Agents Terminal.</p><p>Our contact centres are geographically distributed across India and major part of operations is outsourced. Time and time again we have faced operational challenges like -</p><ol><li>Coordinating upgrade in the software or any underlying infrastructure.</li><li>Agent on-boarding, as the application needs to be installed in each new system.</li></ol><p>To achieve high Operational Excellence, reduce average call handling time and provide users(Agents/Customer) with a seamless and consistent experience across voice channels we focused on the below points -</p><ol><li>Consolidate functions to a single application to eliminate hops between applications.</li><li>Complete Integration: Provide 360 degree insight of the caller, seamless transition to customers from IVR-to-agent or across agents and bind historical data from other application.</li><li>Mobility: Ability to use an integrated solution from any remote location.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtqqRhIsdpFVqoXD-eSJsg.png" /><figcaption>Figure 1: Voice-Conn - MyDesk-CRM</figcaption></figure><h3><strong>Design:</strong></h3><p>CTI Infrastructure is a hardware intensive and most of the vendors provide on premise solutions.<strong> </strong>There’s a lot of different tech that needs to work seamlessly in order to ensure a seamless integration. There are working components like CTI, IVR, CRM, telephony backbone and agent’s workstations. Particularly for CTI, all of its standards are proprietary so if we want to switch from one vendor to another we need to re-integrate which is a time intensive process .</p><blockquote><strong>JTAPI </strong>or<strong> </strong>Java Telephony Application Programming Interface is a JAVA-based Application Programming Interface for computer telephony applications. JTAPI consists of a set of language packages. The core package provides the basic framework for simple telephony functions such as placing a call, answering a call, and dropping a call.</blockquote><p>We tried to evaluate our design in terms of the below design principle -</p><ol><li><strong>Separation of Concerns:</strong> Even though the front-end was going to be flexible but owing to the dependency on underlying vendor specific packaged services we were aware of the rigidity that could arise in back-end if the same was not properly abstracted. Thus to make it more flexible we had to isolate the provider specific logic and to have a more generic implementation.</li><li><strong>Throughput &amp; Scalability: </strong>We had to ensure that that the back-end had high throughput with low latency. This was important as at any given point of time we would have thousands of agents or active calls which would emit events/actions that would be in range of 10&#39;s to 100&#39;s.</li><li><strong>Concurrency:</strong> Multi-threaded behaviour using traditional low-level concurrency constructs like locks is difficult. Lock limits concurrency, as CPU needs to do the task of suspending and restoring the threads. Moreover when the threads are blocked they cannot perform any other meaningful work. Without sufficient locks the state of our session would be compromised and too many of them would have implications to performance and could eventually lead to “Deadlock” .</li><li><strong>Availability: </strong>Enough said but the application has to respond whenever asked for.</li></ol><p>We had a good experience using <a href="https://doc.akka.io/docs/akka/2.5.3/scala/guide/introduction.html">akka </a>actor system in different applications. Akka basically seems handy to us owing to the below properties / characteristics —</p><ol><li>Actors have their <strong>own state</strong> so we can maintain an agent’s session and <br>their related details.</li><li>Actors uses <strong>asynchronous </strong>mode of communication so we have non blocking threads.</li><li>Actors have their own <strong>mailbox</strong>, messages are queued in the mailbox <br>which are then sequentially processed. It ensures all messages are <br>delivered and in case there is any fault the message is delivered to <strong>dead <br>letter queue </strong>which can be handled.</li><li>Actors exhibit<strong> Location transparency</strong> would eventually help us horizontally scale the system.</li><li>Actor model has <strong>self healing</strong> capability so actors are organised in <br>the supervisor hierarchy such that each component is monitored by <br>another. Thus all nodes in the cluster are monitored and any fault is <br>automatically being accounted.</li></ol><blockquote>Akka enabled us to cover ground in terms of the design as it has most of the capabilities to support a high performing and robust distributed architecture which is reliable, fault tolerant and can deliver high throughput with horizontal scalability.</blockquote><h3><strong>Communication:</strong></h3><p>We wanted a fast and reliable means of event based communication that can acknowledge as well as push real time updates to all clients (single session can be monitored from multiple connected clients as well as events originating from multiple sources could be consolidated). So we choose WebSocket as our preferred means of communication as its fast and can give us more throughput. Though we didn’t do much to verify the notion of <strong>“Fast Reliable and High Throughput”</strong> but we there is enough bench-marking available in internet <a href="https://blog.feathersjs.com/http-vs-websockets-a-performance-comparison-da2533f13a77">(HTTP Vs WebSockets)</a>.</p><p>Our preferred option here was Socket.IO.</p><h3><strong>Broadcast Bus:</strong></h3><p>As the clients can be connected to any node in the cluster and the actor can reside anywhere within the cluster on the same node or other. We had a challenge of relaying the message to the server with which the client is connected as the Client attributes needed to emit the message were local to the node/server where the connection was established. So we had to create a network of all active nodes within the cluster which could communicate between themselves by broadcasting message within their group .</p><h3><strong>Re-connection:</strong></h3><p>Socket.IO has a heartbeat mechanism using which the client and server can detect when either one of them is disconnected and because of the <strong>auto-reconnect</strong> support the client keeps on trying to reconnect to the server or cluster. On top of that we have built a Reconnect feature where the disconnected client can re-instantiate/initialise the Session using the required parameters like AgentId and Terminal so that in case of any catastrophe it provides a seamless behaviour as an when components becomes recovers.</p><h3><strong>Code Layout:</strong></h3><p>Last but not the least we had to ensure that the system has the design that extensible to an extent that we could use the core of our system to integrate any other service provider. To abstract and encapsulate vendor specific components we have used <strong>Abstract Factory</strong> to provide the core engine with instance of the Provider and its available functionalities. <strong>Delegation Pattern</strong> to handle different categories of events(callcontrol/connection/terminal), <strong>Observer Pattern</strong> is also being used where the Call &amp; Agent State are subjects which extend the Observer object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fl2EpYliAbZsPcyoG3GOVg.png" /><figcaption>Figure 2: Voice-Conn Design</figcaption></figure><p>With the design in place we could now work on the features of this application and as and when required we would try to through some light on how the different components within the designs works.</p><h3>Features:</h3><ol><li><strong>Contact Card:</strong> Displays caller’s number (ANI), called number (DNIS) and information (like customer history &amp; contact details) by searching related details in the ecosystem. It also provides automatic authentication of the customer (ANI) against our CRM application.</li><li><strong>Dialling:</strong> Computer-controlled dialling to make outbound and consultation calls.</li><li><strong>Agent Phone control:</strong> Call control’s like answer, hang up, hold, resume etc.</li><li><strong>Transfers:</strong> Call and data transfers between two parties (i.e., pass Screen popup details as Single Step Transfer &amp; Consultation Transfer).</li><li><strong>Conference:</strong> Union of two active calls.</li><li><strong>Call centre:</strong> Allows users to log in as a call centre agent and control their agent state (Ready, Busy, Not ready, Work not ready, etc.) and aux modes.</li></ol><blockquote><strong>Summary:</strong> <br>The application is setup as a cluster build on top of akka-remote with a dynamic group of nodes that provide fully automated features for actor distribution, load balancing, and fail-over. On each node the is an actor system that listens on the network. Due to location transparency an actor might exist locally or remotely with their own mailbox and resources. Events generating for any component are delivered to the specific client using the Broadcast Bus and Socket.IO. Core engine is laid out using design patterns like Abstract Factory to abstract provider and vendor specific code, Delegation Pattern to provide a uniform way to handle omni-channel and diverse events and we have Subjects like Agent &amp; Call State to which client can attach.</blockquote><p>Implementation detail of the various Voice-Conn functions are discussed in the <a href="https://medium.com/makemytrip-engineering/voice-conn-computer-telephony-integration-part-ii-381bda78d72d"><strong>Next Post (Computer telephony integration -Part II)</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e35dc63fb00" width="1" height="1" alt=""><hr><p><a href="https://tech.makemytrip.com/voice-conn-computer-telephony-integration-part-i-6e35dc63fb00">Voice-Conn : Computer telephony integration -Part I</a> was originally published in <a href="https://tech.makemytrip.com/">MakeMyTrip-Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>