cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
cdnadmin
Advisor
Advisor
This document was generated from CDN thread

Created by: Gionata Navarra on 24-11-2009 04:53:15 PM
Hi,
 
I've configured CTI port on Call Manager V 7.0. Tring to make a call from a registered number to this CTI port I've obtained the following exception:
 
 " Could not meet post conditions of connect() "
 
Checking on CUCM I've found CTI port is not registered (status & IP Address unknown) .
Which is the problem?
 
thank you very much
Gionata Navarra

Subject: RE: Configuring CTI port
Replied by: David Staudt on 24-11-2009 05:28:27 PM
Can you describe what your app is doing with the CTI port?  At minimum it needs to:
 
- Add observers(s), i.e. provider observer, call observer, address observer
- Wait for the Provider in service event for the address
- Register the media terminal (CTI port) with RTP IP/port info
 
 

Subject: RE: Configuring CTI port
Replied by: Joseph Moskie on 24-11-2009 07:50:07 PM
Here's some sample code for what David is talking about. You'll need to add exception handling.

1CiscoMediaCapability[] capabilities = new CiscoMediaCapability[5];
2capabilities[0] = new CiscoG711MediaCapability();
3capabilities[1] = new CiscoG723MediaCapability();
4// ... etc
5
6ciscoRouteTerm.register(capabilities, CiscoRouteTerminal.DYNAMIC_MEDIA_REGISTRATION, null, ciscoRouteTerm.getIPAddressingMode());


Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 25-11-2009 04:50:44 PM
Here's some sample code for what David is talking about. You'll need to add exception handling.

1CiscoMediaCapability[] capabilities = new CiscoMediaCapability[5];
2capabilities[0] = new CiscoG711MediaCapability();
3capabilities[1] = new CiscoG723MediaCapability();
4// ... etc
5
6ciscoRouteTerm.register(capabilities, CiscoRouteTerminal.DYNAMIC_MEDIA_REGISTRATION, null, ciscoRouteTerm.getIPAddressingMode());


 
Ok,
I've followed your suggestions and now I'm able to register on CUCM my CTIPort.
The problem right now is the following. Trying to call a number (registered or external both) I'm able to make a call session, but after 15 seconds the call drops itself.
The idea is to call several numbers from the CTIPort (using it as a bridge) and then to conference every calls.
 
here is my code:
 

            Address bridge=null;
            CiscoMediaCapability[] capabilities = new CiscoMediaCapability[3];
            capabilities[0] = new CiscoG711MediaCapability();
            capabilities[1] = new CiscoG723MediaCapability();
            capabilities[2] = new CiscoG729MediaCapability();

           
            CiscoMediaTerminal ciscoRouteTerm = provider.getMediaTerminal("CTI3001");
           
            ciscoRouteTerm.register(capabilities);
            try {
                bridge = provider.getAddress(callingParticipantName);
            } catch (Exception e) {
                throw new ServiceException("Bridge line not registered on PBX..",null);
            }
            //CiscoAddress called = (CiscoAddress) provider.getAddress(callParticipants.get(0));
            CiscoCall call = (CiscoCall) provider.createCall();

           
            MyObserver obs = new MyObserver(module, this, callSessionId, pbx);
            call.addObserver(obs);
           

            bridge.addCallObserver(obs);
            bridge.addObserver(obs);


            Thread.sleep(500);
            call.connect(bridge.getTerminals()[0], bridge, callParticipants.get(0));  //this is my first party call
 
 
at this point the call runs but after 15 seconds less or more it drops.
 
do you know why it happens?
 
thanks a lot
 

Subject: RE: Configuring CTI port
Replied by: Joseph Moskie on 25-11-2009 07:38:58 PM
1. Are you sure the call is being answered by the calling party? Does the call move out of Ringing/Alerting state?
 
2. Are any errors or exceptions generated?

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 26-11-2009 04:51:53 PM
Hi.
 
Yes, I've followed suggestions you gave me in the other thread "making call with external address", and now to realize a thirdpartycall I use a bridge number.
 
this is the scenario:
 
bridge calls firstparty A
A pick up
 
bridge calls secondParty B
B pick up
 
conference between first call and second call
 
disconnect bridge.
 
My idea is to use a CTI port as bridge as you said me, but after ten seconds I receive a ConnFailedEv event and phone becomes busy.
this is the flow of events: (5000 is my CTI port number and ****7294 first party called)
 
 
CallActiveEv
CallCtlConnDialingEv
[5000:All-Ip-Phone-PT/(P1-jtapiUser) GCID=(1,48594)->ACTIVE]->ESTABLISHED
CallCtlConnEstablishedEv
[5000:All-Ip-Phone-PT/(P1-jtapiUser) GCID=(1,48594)->ACTIVE]->ESTABLISHED
ConnInProgressEv
[****7294:International-PT/(P1-jtapiUser) GCID=(1,48594)->ACTIVE]->OFFERED
CiscoMediaOpenLogicalChannelEv
CiscoRTPOutputStartedEv
CallCtlConnNetworkReachedEv
CallCtlConnNetworkAlertingEv
****[7294:International-PT/(P1-jtapiUser) GCID=(1,48595)->ACTIVE]->NETWORK_ALERTING
 
PICK UP THE PHONE
 
CallCtlConnEstablishedEv
[****7294:International-PT/(P1-jtapiUser) GCID=(1,48595)->ACTIVE]->ESTABLISHED
 
 
AFTER TEN SECONDS I RECEIVE THESE EVENTS:
 
 
CiscoRTPOutputStoppedEv
ConnFailedEv
[5000:All-Ip-Phone-PT/(P1-jtapiUser) GCID=(1,48595)->ACTIVE]->FAILED
ConnDisconnectedEv
[****7294:International-PT/(P1-jtapiUser) GCID=(1,48595)->ACTIVE]->DISCONNECTED
TermConnDroppedEv
 
and the call changes its state to INVALID
 
The same flow for the second party called by bridge.
 
 
 
I've tried also to substitute CTI port with a CTI route point but result is the same.
 
Second problem is that if I try to conference these two calls before they drop I obtain this exception:
 
"CCNException not handled: com.cisco.cti.client.CCNException"
 
but this seems to be a general exception.
Any idea for this exception or suggestion to realize this scenario?
 
Thank you very much.
 

Subject: RE: Configuring CTI port
Replied by: David Staudt on 26-11-2009 11:20:36 PM
Is your CTI port actively accepting the incoming RTP packets and sending outgoing packets?  Continuing ICMP errors - such as if the CTI port is not handling any packets at all - can cause the phone to terminate the call, I believe.
 
If you don't want/need to handle media, you may be able to register the CTI port with IP address as 0.0.0.0 (blackhole.)

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 26-11-2009 11:54:50 PM
Is there a way to understand if CTI Port handle RTP packets?

If cti port must be configured by code to handling RTP I don't think I've done it, I've just registered my CTI as suggested in previous posts. (code remained the same).
 
Any example of how to do that would be appreciated.
 
Thanks a lot.

Subject: RE: Configuring CTI port
Replied by: David Staudt on 27-11-2009 01:14:02 AM
You can try this form of the register() method:
 
register(java.net.InetAddress address, int port, CiscoMediaCapability[] capabilities, int[] algorithmIDs)
 
Providing a java.net.InetAddress of 0.0.0.0 and port of 0.
 
See the JTAPI Developer Guide for more details.
 
I recall a few versions of JTAPI would not allow the 0.0.0.0 address.  If you run into this issue, then I think all you need to do is specify the local address and an available port when you register, then make sure you open it for UDP in your code (no need to handle any resulting events.)

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 27-11-2009 02:53:01 PM
That's right,
 
registering CTI Port with blackhole everything is allright.
 
Thanks to all.

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 01-12-2009 04:41:35 PM
Hi,
using CTIPort to make multiple calls in the same time it seems like it's not possible to do that without answering to every call.
 
My scenario is this:
CTIPort calls first party A
 
if A answers the call, then CTIPort calls a list of other parties (B, C, D, ...) at the same time (each call is a different thread started with a difference of two seconds one by others).
 
But I've seen that if B doesn't answer the call before third call to C starts, call from CTIPort to B drop.
 
So it seems like CTIPort doesn't support multiple phone ringing. Is that true?
 
thanks.
 
 

Subject: RE: Configuring CTI port
Replied by: David Staudt on 01-12-2009 05:04:50 PM
This is true, the CTI port can only have one active call at a time.  If placing a second call after the first completes, you should notice that the first call goes on hold.
 
Depending on what you are trying to accomplish, you may be able to do it with a CTI route point (which can handle multiple calls.)

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 01-12-2009 08:40:14 PM
The idea is to realize a multiparty call using a virtual device (CTIPort or CTI Route Point) as bridge.
 
My scenario:
Bridge (CTI) calls party A
A answers call from bridge
multiple calls start from bridge to each other party involved in multiparty (B, C, D; ...)
when e.g B answers call from bridge I conference this call and the first one (ie bridge --> A)
when D answers call from bridge I conference this call and the previously and so on...
 
As I have a scenario with a call active from CTI to first party and many
phone ringing, I need a bridge that can make multiple calls at the same
time, but with only one in ACTIVE state (from CTI to first party) , and the other phones just
ringing. (I suppose with connection in OFFERING state).
 
Do you think is it possible to realize that using a CTI Route point?
How can I register blackhole with CTI Route Point to skip problems with RTP Packets?
 
 
thank you very much.

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 02-12-2009 11:11:27 AM
Hi,
 
registering a CTI route point with
 
ciscoRouteTerm.register(capabilities, CiscoRouteTerminal.NO_MEDIA_REGISTRATION);
 
I've noticed that it's possible handling multiple calls ringing, but when I try to conference two calls (e.g CTI Route point -> A and  CTI Route point -> B ) I receive a "CCNException not handled: com.cisco.cti.client.CCNException". Maybe CTI Route point doesn't support as feature Conference between two calls?
 
If it's true, I think there is no possibility to manage my scenario, neither if I choose a physical number as bridge.
 
CTI Route point -> no conference
 
CTI Port or ipPhone -> no multiple phones ringing.
 
What do you think?
 
thanks

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 03-12-2009 11:13:34 PM
Can you confirm that?

Subject: RE: Configuring CTI port
Replied by: Mohan Potluri on 04-12-2009 02:36:12 AM
RP doesn't support transfer, confernece features. One solution would be:
 
Make the call from RP. After the call is answered, redirect the call to CTIPort. Answer the call at CTIPort and hold it. After all calls are redirected to CTIPort confernece them.
 
Downside is it may take the same amount of time if conference is done sequentially from CTIPort.

Subject: RE: Configuring CTI port
Replied by: David Staudt on 04-12-2009 02:54:31 AM
I think that's correct.  The scenario would use both types of virtual devices, perhaps something like:
 
- Launch X number of  calls via the CTI RP
- As each call becomes connected, Redirect the call to the CTI port
- Answer the call on the CTI port and hold/add-to-conference
- When the conference is over, drop the primary call at the CTI port

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 14-12-2009 04:48:04 PM
Thanks.

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 14-04-2010 02:27:22 PM
Hi,
 
as you suggested me I'm trying to make a redirect from a route point to a registered number on CUCM 7.1, but I caught the following exception:
 
CCNException not handled: com.cisco.cti.client.CCNException: redirect failure
 
It looks like redirect is not supported by route point.
Here my code:
*************************************************************************

try {
    ciscoRoutePoint = (CiscoRouteTerminal) provider.getTerminal("CTIRP");
   
} catch (Exception e) {
    throw new ServiceException("...", null);
}

    CiscoMediaCapability[] capabilities = new CiscoMediaCapability[3];
    capabilities[0] = new CiscoG711MediaCapability();
    capabilities[1] = new CiscoG723MediaCapability();
    capabilities[2] = new CiscoG729MediaCapability();

 
    try{
        ciscoRoutePoint.register(capabilities, CiscoRouteTerminal.NO_MEDIA_REGISTRATION);
       
    } catch (Exception e) {
        // TODO: handle exception
    }

CiscoCall call = (CiscoCall) provider.createCall();

Address calling = provider.getAddress(callParticipants.get(0)); //my route point DN
String callee = callParticipants.get(1);  //first party number

MyObserver obs = new MyObserver(this, callSessionId, pbx, null);
call.addObserver(obs);
calling.addObserver(obs);
calling.addCallObserver(obs);
provider.getAddress(callParticipants.get(1)).addObserver(obs);
provider.getAddress(callParticipants.get(1)).addCallObserver(obs);
provider.getAddress(callParticipants.get(2)).addObserver(obs);  // second party to which redirect
provider.getAddress(callParticipants.get(2)).addCallObserver(obs);

Thread.sleep(500);
call.connect(calling.getTerminals()[0],calling,callee);

Connection[] conns = call.getConnections();
CiscoConnection conn = (CiscoConnection) conns[0];

conn.redirect("3001"); //this is my second party

************************************************************************
 
 
3001 is a registered number on CUCM.

Any idea of the problem?
Thank you.
 
Gionata Navarra

Subject: RE: Configuring CTI port
Replied by: David Staudt on 14-04-2010 06:24:38 PM
Can you attach the detailed JTAPI logs for this failure scenario?

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 15-04-2010 01:44:58 PM
I haven't a JTAPI client so I can't attach logs.
Anyway I've noticed that conn.redirect runs if first party is in ringing state (conn OFFERED and ALERTING) but not if first party has already answered to call (conn CONNECTED).
Is it possible to redirect a call already answered?
 

Any help would be appreciated.
thanks

Subject: RE: Configuring CTI port
Replied by: Gionata Navarra on 19-04-2010 03:20:56 PM
Hi,
here is my code:
 
*******************************************************************
 
call.connect(calling.getTerminals()[0],calling,callee);

      
Connection[] conns = call.getConnections();
CiscoConnection conn = (CiscoConnection) conns[0];
conn.redirect(callParticipants.get(2)); //second party number
 
*******************************************************************
 
and this is a list of scenarios I've tried with relative exceptions:
 
CtiRoutePoint calls first party A;
first party A answers the call;
redirect CRP connection to second party B
exception: com.cisco.jtapi.PlatformExceptionImpl: CCNException not handled: com.cisco.cti.client.CCNException: redirect failure
 
 
The same if I try to redirect first party A:
 
CtiRoutePoint calls first party A;
first party A answers the call;
redirect A connection to second party B.
exception: com.cisco.jtapi.PlatformExceptionImpl: CCNException not handled: com.cisco.cti.client.CCNException: redirect failure
 
Redirect runs well if working with registered number instead of a CtiRP or in this scenario:
 
CtiRoutePoint calls first party A;
first party A ringing;
redirect CRP connection to second party B
but in this case it looks like a call forwarding and it's not what I need.
 
 
 
Regards
Gionata Navarra
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links