Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

How to use Cisco JTAPI extension & is it possible to POST "default" screen

Hello,

I'm writing JTAPI application to monitor incoming calls. I'm using

JTAPI 1.4. I would like to ask how can I use Cisco Jtapi extensions

classes? If I try to use it I get compiler error about types incompatibility.

My second question is following: I have posted XML document

to the IP phone, document is displayed, all is OK . But after few

minutes I want to clear phone display to "default" screen

from my Java application. Does exist any way how to do it?

Thanks

Mirek

7 REPLIES
New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

I can give you a bit of help on the second problem (I think). What I did in order to return to the "default" screen is to push "SoftKey:Exit" as the URI. Hope that helps.

New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

The Softkey:Exit is basically a good idea, and works fine.

However it leads to another problem: What if the user opened some other screens, infos, or services in the meantime? I guess whatever was "on top" would simply be closed. Is there any way of knowing what the user is currently doing on his phone, or what kind of information or url is currently displaying on the phone, so that the app can know whether to send an exit or not?

tom.

New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

Hi Tom,

Can u help me out. I am trying to push an XML file to the IP phone using JAVA. I am facing a typical problem. The text is not displaying on the phone while the Play: working fine.

The response object i am getting from the phone says the Request Busy in the data attribute of the ResponseItem for the xml file.

I am enclosing the java program also here

can u help me out please where it is going wrong..

Thanks in advance

Shyamal Bhowmik

The java Program

===================================================

import java.net.*;

import java.io.*;

import java.net.PasswordAuthentication;

class pushMessage

{

public pushMessage()

{

Authenticator.setDefault (new MyAuthenticator ());

setUrlContent();

}

public void setUrlContent()

{

try {

int c;

URL hp= new URL("http:///CGI/Execute");

HttpURLConnection connection = (HttpURLConnection) hp.openConnection();

connection.setRequestMethod("POST");

connection.setDoOutput(true);

PrintWriter out = new PrintWriter(connection.getOutputStream());

// encode the message

String xml="http:///Notifier/message.xml\"/>";

System.out.println(xml);

xml=URLEncoder.encode(xml,"UTF-8");

// send the encoded message

out.println("XML="+xml);

out.close();

BufferedReader in = new BufferedReader(

new InputStreamReader(connection.getInputStream()));

String line;

while ((line = in.readLine()) != null) {

System.out.println(line);

}

in.close();

}

catch (MalformedURLException e) {

System.out.println ("Invalid URL");

} catch (IOException e) {

System.out.println ("Error reading URL");

}

}

public static void main(String args[]) throws Exception

{

pushMessage abc = new pushMessage();

}

class MyAuthenticator extends Authenticator {

protected PasswordAuthentication getPasswordAuthentication() {

String username= new String();

username="user";

String password= new String();

password="password";

char [] pwd=new char[8];

int len = password.length();

for (int i=0; i

{

pwd[i]=password.charAt(i);

}

return new PasswordAuthentication (username, pwd);

}

}

}

====================================================

and the Response i am getting is as follows:

====================================================

http:///Notifier/notify_naraya.xml"/>

Any help will be greatly appreciated..

New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

I was receiving "request busy" after making a push request to a page that was unavailable (i.e. the wrong page or the server was not running) I'm not sure if that's what's going on with your problem or how long "request busy" remains, but I found that doing a hard restart on the phone fixed the problem.

New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

A hard restart of the IP Phone helped.

Thanks a lot

Regards

Shyamal

New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

I think the first problem may be related to the version of Java that you're compiling/ running with. Apparently you have to use Java 1.2 in order for the cisco jtapi stuff to compile/ run.

New Member

Re: How to use Cisco JTAPI extension & is it possible to POST "d

JTAPI should work with anything prior to Java 1.4.X.

I'm successfully using Sun's 1.3.X JDKs with all version of the 3.X callmanager.

260
Views
0
Helpful
7
Replies
CreatePlease to create content