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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Getting <CiscoIPPhoneError Number="4" />

Hi to all,

I am developing an application for IP Phones which uses JTAPI and JMF.

I can connect to my CCM using my login information as id=crbt and password=cisco.

Also I can monitor the status of IP Phones using the login information.

Now I am using Cisco IP services in Java.

here I am getting

<CiscoIPPhoneError Number="4" /> i.e. Authentcation error.

How can I get This error If my login information is true.

Bello The code is given:

String xml = new String("<CiscoIPPhoneExecute>"+

"<ExecuteItem Priority=\"0\" URL=\"RTPRx:10.5.1.61:20480\"/>"+

"</CiscoIPPhoneExecute>");

String userId = "crbt",

password = "cisco",

basicAuth = "Basic ",

params = "XML=" + URLEncoder.encode(xml, "ISO-8859-1" );

byte[] bytes = params.getBytes();

// Create a URL pointing to the servlet or CGI script and open an HttpURLConnection on that URL

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

HttpURLConnection con = ( HttpURLConnection ) url.openConnection();

// Indicate that you will be doing input and output, that the method is POST, and that the content

// length is the length of the byte array

con.setDoOutput( true );

con.setDoInput( true );

con.setRequestMethod( "POST" );

con.setRequestProperty( "Content-length", String.valueOf( bytes.length ) );

// Create the Basic Auth Header

basicAuth = (String)Base64.encode( ((String)(userId + ":" + password)).getBytes() );

// basicAuth = (String)(userId + ":" + password) ;

System.out.println("Code: " + basicAuth);

//con.setRequestProperty( "Authorization", "Basic " + basicAuth.trim() );

con.setRequestProperty( "Authorization", "Basic " + basicAuth.trim() );

// Write the parameters to the URL output stream

OutputStream output = con.getOutputStream();

output.write( bytes );

output.flush();

// Read the response

BufferedReader input = new BufferedReader( new InputStreamReader( con.getInputStream() ) );

while ( true ) {

String line = input.readLine();

if ( line == null )

break;

System.out.println( line );

}

input.close();

output.close();

con.disconnect();

}

catch(Exception e)

{

e.printStackTrace();

}

where 192.168.1.21 = address of IP Phone 7960

& 10.5.1.61 = address of pc which is transmitting RTP Packets.

Please help me as soon as possible.

Regards,

Ashish

1 REPLY

Re: Getting <CiscoIPPhoneError Number="4" />

Is crbt your login for the CCM administration interface?

The login/password for push needs to be the userid and password for a CCM User that has the rights to control every phone you want to push to...

639
Views
0
Helpful
1
Replies