cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1113
Views
20
Helpful
5
Replies

Connecting to UCCX with XMPP

lvj00000111
Level 1
Level 1

I have been using Sharp.Xmpp - https://github.com/pgstath/Sharp.Xmpp - to subscribe to events. It works just fine so far...but now I have to connect on the secure port.

I don't know much about certificates, but as far as I can see, we expect a server certificate, and by default the validation function just returns true (all is well). 

 

But when I connect, I'm told that the XMPP connection could not be negotiated, and that

"hexadecimal value 0x15, is an invalid character. Line 1, position 1." as if the XML is bad.

 

I'm wondering if we should encrypt/decrypt the xml going back and forth with the certificate somehow.

 

Anyone who has tried something similar? 

5 Replies 5

dekwan
Cisco Employee
Cisco Employee

Hi,

 

I am not familiar with Sharp.XMPP so I cannot comment on that in particular.

 

But, as far as the secure connection, you need to make sure that the SSL handshake is properly done in order to have a successful connection. I don't believe that you need to encrypt the XML going back and forth.

 

Thanx,

Denise

Do you know of an XMPP interface where this works (maybe I can "steal" something, if the one I use lacks something) ?

While C# is preferred, other languages can be used too.

 

Also: I assume that the tomcat certificate is a server certificate? A silly question perhaps, but I'm not very well versed in the use of certificates, and we all know about assumptions and their progeny...

 

Edit: I get these hex numbers back:

\u0015\u0003\u0003\0\u0002\u0002\u0016

If that sequence tells anything...

 

Edit2:

The first thing we ever send to the UCCX is

<stream:stream xmlns='jabber:client' to='10.10.20.10' version='1.0' xmlns:stream='http://etherx.jabber.org/streams' />

Since you mentioned a handshake, I assume this should be different?

I also tried to add the attribute starttls='urn:ietf:params:xml:ns:xmpp-tls' but that didn't change anything.

 

Hi,

 

Several people in this community use the MatriX library for C#, but it is not free. I think there might be a few code examples here in this community for the connection.

 

I am slightly confused about you sending the XML

<stream:stream xmlns='jabber:client' to='10.10.20.10' version='1.0' xmlns:stream='http://etherx.jabber.org/streams' />. I've never had to send an XML like this. The XMPP library is the one that helps establish the connection.

 

Are you having issues connecting the user to XMPP? Or are you getting an error trying to subscribe to an event after a successful connection?

 

By default, users are automatically subscribed to their user events. So after successfully connecting to the XMPP server, you should be able to get user events without sending a single IQ. Here is a list of the topics that need to be subscribed to and which do not as well as an example on the IQ that needs to be sent for a subscribe: https://developer.cisco.com/docs/finesse/#!subscription-management/subscription-management

 

Thanx,

Denise

The library I use is open source (and free), and I noticed that someone else has had a similar problem (but alas there was no solution from the author).

 

I  followed the code steps, and that was apparently the first thing he did. It works just fine in the non-secure version on port 5222, but when we start using port 5223 and certificates, I get problems.

Hi,

 

Did you make sure to download the tomcat certificate from the server? Are you sure that the SSL verification is successful?

 

Thanx,

Denise