07-10-2003 01:22 AM - edited 03-13-2019 12:40 AM
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
07-10-2003 07:28 AM
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.
07-17-2003 12:40 AM
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.
08-29-2003 03:29 AM
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:
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://
HttpURLConnection connection = (HttpURLConnection) hp.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(connection.getOutputStream());
// encode the message
String 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:
====================================================
Any help will be greatly appreciated..
09-03-2003 07:01 AM
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.
09-09-2003 08:14 AM
A hard restart of the IP Phone helped.
Thanks a lot
Regards
Shyamal
09-03-2003 07:04 AM
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.
09-03-2003 01:47 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide