cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
2971
Views
0
Helpful
8
Replies

Jabber Web SDK Login Problem

Hi All,

I'm trying to test basic chat demo in my environment with username same as email and act as Directory URI in CUP End User.

For example my user name = email = Directory URI = "hendy.waskito@mydomain.com"

But when i try to login, it shows error "invalid character found", but when i use hendy.waskito only, it shows "not authorized" error.

Is there any workaround for getting this success?

My Environment:

CUP version 10.5

CUCM version 10.5

Thanks

Hendy Waskito

8 REPLIES 8
npetrele
Cisco Employee

This is difficult to diagnose without actually seeing your code.  However, I am guessing that hendy.waskito is the correct login name, and the "not authorized" error probably has to do with configuration or the way you're authenticating in Javascript. 

Make sure the user hendy.waskito exists in both CUCM and CUP, and that the CTI and IM/P options are checked in CUCM. Also make sure you're using the correct BOSH URL for connecting. 

If you can post browser console error messages, that might help. 

Thanks.

Hi Nicholas,

Please find attached screenshots and code that i use.

Thanks

Hendy Waskito

Hi Hendy,

the problem is with your User ID, because it contains '@domain.co.xx'. It looks like CUCM treat your User ID as 'joe.doe@domain.co.xx' and not as a 'joe.doe'. CAXL in this example does not allow '@' character in username. When you type 'joe.doe@domain.co.xx' it reports invalid character and when you type 'joe.doe' there is no such user defined on CUCM.

Please change your User ID to 'joe.doe' and it will work fine.

Regards, Milos.

Hi Milos,

For User ID, i cannot change without "@" , because there is implementation requirement from my customer to have user id in such format.

Is there any workaround to have this kind of user ID work on Jabber Web SDK?

Thanks

Hendy Waskito 

Hi Hendy,

unfortunately there is no workaround that I know.

IM/P Web SDK is an implementation of XMPP standard and it uses Jabber Identifiers (JIDs) to uniquely identify clients (and other enteties). JID is restricted not to allow '@' in node identifier (node id == User ID).

For more info about JID please have a look at XEP-0029: Definition of Jabber Identifiers (JIDs).

Regards, Milos.

just additional comment:

when you set the User ID to first.last@domain.com and when you are trying to connect, 'first.last@domain.com@domain.com' is what would be sent to server actually (in case that @ is allowed). If you set User ID on CUCM to 'first.last', you can still log-in with first.last@domain.com in your web sdk application.

In basic-chat.html you should only change this line:

client.connect(jabberwerx.$("#username").val() + "@" + demoConfig.domain,

                                jabberwerx.$("#password").val(), arg);


with:

client.connect(jabberwerx.$("#username").val(),

                                jabberwerx.$("#password").val(), arg);


Regards, Milos.

Hi Milos,

I tried your suggestion in my script and testing it to two CUP servers.

In CUP server #1, it is success, please find the attached screenshots.

But on the CUP server #2, it is failed, please find the attached screenshots.

I used the same script, i only change the BOSH url. Both server are CUP version 10.5, implement same format of username which is username = email, the difference is only domain name.

Any advise for this kind of case?

Thanks

Hendy Waskito

Hi Hendy,

could you please login to CUP and print screen on page System->Presence Topology->users ('IM address' column is important).

If IM address is user.name@domain.com it could work, but if address is user.name@domain.com@domain.com that is a problem.

Best Regards,

Milos.

Create
Recognize Your Peers
Content for Community-Ad