cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
232
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Stephan Steiner on 07-02-2012 09:39:21 AM
While our new guys figure out how to renew developer support I've had an old issue creep up again. Back in CUCM 5 days I had a case open on this... using CiscoTerminal.sendData(String data) resulted in non ASCII characters being mangled on devices.
 
I'm currently porting an app made for CUCM 5 to 8.6 and I've run into the same issue. Here's what I'm sending - with cisco dev support we established that we need to prepend ISO-8859-1 encoding to the XML we're sending.
 
data = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + data;
 
Message we're sending
 
<?xml version="1.0" encoding="ISO-8859-1"?><CiscoIPPhoneText>
<Title>Abwesenheitsmeldung</Title><Text>Der gewünschte Teilnehmer (7203) ist zur Zeit abwesend:
Von: 01.01.2012 08:00
Bis: 07.02.2012 16:00.
Grund: Abwesenheit wegen Fortbildung</Text></CiscoIPPhoneText>"
 
This still works fine on IPC 8.6, but on a 7961 running load 9.2.1 the non ASCII characters get mangled.
 
I believe I've gone through the JTAPI documentation with a fine comb, but I've not found anything with regards to any changes in sendData. I've also tried sendData(byte[] buffer):
 
char[] charr = data.toCharArray();
        byte[] byteArr = new byte[charr.length];
        String error = "Unable to send XML to phone " + term.getName();
        for (int i = 0; i < charr.length; i++)
        {
            byteArr = (byte)charr;
        }
            byte[] resArr = term.sendData(byteArr);
            String res = new String(resArr);
 
where data is the entire message with the xml header prepended - but to no avail. We're now going through some other phone types to see if it's type dependant (should't be the case anymore but you never know.. back in the old days, every phone acted differently).

Subject: RE: CiscoTermina.sendData & non ASCII characters
Replied by: David Staudt on 10-02-2012 05:56:02 PM
I would tend to expect that the transport via JTAPI is not effecting the problem - you can confirm by using HTTP Post and CiscoIPPhoneExecute with the same XML data.  If you do find that result varies for JTAPI vs. HTTP let us know.
 
Assuming it's not JTAPI, then my next suspicion would be some sort of encoding mismatch between what the phone supports/expects and the encoding you are specifying.
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