Showing results for 
Search instead for 
Did you mean: 

How to Answer a call on CTI Port

Hello All,


I am working on 1 JTAPI based CTI application.


What I want to achieve is to answer a call and put that on hold on CTI Route Port for n number of minutes.


I am able to accept the call on CTI Route Point but not able to answer. When I try to answer the call JTAPI throw an exception "Not allowed".


So far I created a CTI Route Point and assigned one DN. And Now when I dial this DN I can hear that it's ringing (means call is accepted). But how can I answer the call and put this call on hold?


Please help.



Cisco Employee

The default model for CTI Route Points is for routing calls only, not answering or terminating media - that role is typically reserved for CTI Ports.


However, enhancements have made it possible to handle calls/media at CTI Route Points with some extra steps.  In the JTAPI Developer Guide, see the following sections for details:


* Features Supported by Cisco Unified JTAPI

  * Cisco Media Terminal (much of this is now applicable to CTI RPs)

  * Cisco Unified Communications Manager Media Endpoint Model

  * Media Termination at Route Point

  * Media Termination Extensions

  * Receving and Responding to Media Flow Events


Note, if you don't intend to provide custom audio playback or recording/capture features (i.e. just immediately putting on hold to use the default system MoH treatment), which normally would require you to provide a full RTP media stack, you can just register or respond to events requesting media termination info (codecs, IP addresses) with 'fake' data...


Thanks for your reply!



Is it possible to handle the call only on route point side and play music also without route port?


Actually we want to have minimum configuration.

So far we were using Call Park feature to drop the call for sometime.


But in current requirement we can not use call park because in case only 1 call is allowed on Agent phone and park call try to make call back on parker phone than CUCM dropped the parked call.


What will you recommend?


Is it possible to stop Park call reversal after time expired? 

If it's not possible can we assign any DN in any setting which will handle this call if parker is busy?


If your CUCM is set up to provide generic music on hold, then if you answer the call on a CTI Route Point or CTI Port and put it on hold, the user will hear the music - you would not need to provide any RTP/media/audio services in your app.


It does not seem possible to disable the Call Park reversion timer - it is system wide, so that would probably be a bad idea anyway.

If your agents are members of a Hunt Group and the call came in through the Hunt Pilot, then when the Parked call is reverted the call will go back to the Hunt Group instead of the specific parking agent.


Thanks again for your message!


But still, this question is unanswered "How to answer the call on Route Point side?"


I am able to accept the call, once it's landed on Route Point, but not able to answer and put it on hold. It throws an exception "Not Allowed"


Any configuration in CUCM is needed or any special thing in Code?


No configuration is needed on the CUCM side.  The core steps you need to implement in code are in the 'Media Termination at Route Point' section, one of several sections mentioned previously that may help you understand what to do.  Once the CTIRP has been correctly registered with media, and the RTP media events have been properly responded to, TerminalConnection.answer() should just work as expected.

Media Termination at Route Point

This feature enables multiple active calls at the route point, and applications can terminate media for all active calls by specifying the IP address and port number for each call or whenever media is established.
To use this feature, applications must register the route point by supplying media capabilities. When a call
gets answered at this route point, CiscoMediaOpenLogicalChannelEv gets sent to the applications. This event
gets sent whenever media is established. Applications must react to this event and specify the IP address and port number where they want to terminate media.

A CiscoRouteTerminal represents a special kind of CiscoTerminal that allows applications to terminate RTP
media streams. Unlike a CiscoTerminal, a CiscoRouteTerminal does not represent a physical telephony
endpoint, which is observable and controllable in a third-party manner. Instead, a CiscoRouteTerminal
represents a logical telephony endpoint, which may get associated with any application that intends to route
calls and also terminate media. Unlike CiscoMediaTerminal, CiscoRouteTerminal can have multiple active
calls at the same time. Typically, CiscoRouteTerminals get used to place calls in queue until an agent is
available to service the caller.

Note: Only RoutePoint Terminals appear as CiscoRouteTerminal through JTAPI.

Terminating media comprises a three-step process:

  1. The application registers its media capabilities with this terminal by using the CiscoRouteTerminal.register method.
  2. An application adds an observer that implements CiscoTerminalObserver interface by using the
    Terminal.addObserver method.
  3. The application must add addCallObserver on CiscoRouteTerminal or on CiscoRouteAddress to receive
    CiscoCall object from the provider by using CiscoRTPHandle.

Applications receive CiscoMediaOpenLogicalChannelEv for each call and must supply the IP address and
port number by using the setRTPParams method on CiscoRouteTerminal.

You must modify applications that are written for the CiscoJtapiClient 1.4(x) release or earlier to register with
CiscoRouteTerminal. NO_MEDIA_TERMINATION if the applications are not interested in media termination.
Multiple applications can register with the same route point as long as they are registered with the same media capabilities and registrationType. All applications, if they have registered with
CiscoRouteTerminal.DYNAMIC_MEDIA_REGISTRATION and then add a terminal observer, receive
CiscoMediaOpenLogicalChannelEv, but only one application can invoke setRTPParams.

Note: Applications that terminate media must use the CallControl package for answering and redirecting calls.

Applications that only route calls can use a routing package.


I managed to make it work.


Anyways thanks for your help


Anything you can share with us on how you got this working?  I also need to use a CTI Port to somehow park a call and am struggling with it.


Once you register the CTI Port then this device will activate for receiving calls.

Then redirect the call on CTI Port number, on ringing event answer the call. That's it.