cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
320
Views
0
Helpful
1
Replies

JTAPI implementation based on Call Manager3.1

nikostutt
Level 1
Level 1

hello, everybody

i am programming a JTAPI application based on Call Manager 3.1.

i tried the example in the "Cisco JTAPI developer guide" which is downlaoded from your web site. it is does works. :(

so i tried to make a little programe just to make a call. the source code is like :

__________________________________

import javax.telephony.*;

import javax.telephony.events.*;

import com.cisco.jtapi.*;

import com.cisco.jtapi.extensions.*;

import com.cisco.cti.util.Condition;

public class Makecall implements ProviderObserver{

JtapiPeer peer = null;

Provider pro = null;

Address[] address = null;

Terminal[] ter = null;

Terminal terOne = null;

Call myCall = null;

Call[] calls = null;

Connection[] c = null;

Connection[] callConn = null;

Address callAddress = null;

Terminal callTer = null;

Condition conditionInService = new Condition();

public Makecall() {

try{

peer = JtapiPeerFactory.getJtapiPeer(null);

String source ="1xx.2xx.3x.8x;login=my;passwd=test";

pro = peer.getProvider(source); );

// conditionInService.waitTrue ();

address =pro.getAddresses();

ter = address[1].getTerminals();

myCall = pro.createCall();

calls = pro.getCalls(); );

callAddress = pro.getAddress("5056");

callAddress = (CiscoAddress)callAddress;

callTer = callAddress.getTerminals()[0];

}

catch(Exception e)

{System.out.println("here is a "+e.toString());

}

try{

// conditionInService.set ();

c = myCall.connect(callTer,callAddress,"5052");

}

catch(com.cisco.jtapi.InvalidStateExceptionImpl myex)

{ System.out.println(((InvalidStateException)myex).getObject());

System.out.println(((InvalidStateException)myex).getObjectType());

System.out.println(((InvalidStateException)myex).getState());

System.out.println(InvalidStateException.ADDRESS_OBJECT );

/* once i run the mycall.connect() the exception are thorown. so i caught the exception and find the invalidState object is the "Address" and the state is '0' which means 'UNSPECIFIED = 0'

*/

}

catch(Exception ex)

{System.out.println(ex.getMessage());}

}

public void providerChangedEvent ( ProvEv [] eventList ) { }

public static void main(String[] str)

{ Makecall test = new Makecall();

}

}

1 Reply 1

ssoberlik
Level 4
Level 4

Here is the contact information for CIsco's developer support program. They should be able to assist you with this program.

http://www.cisco.com/univercd/cc/td/doc/product/voice/vpdd/cdd/3_1/tapi/tap_pref.htm#xtocid16