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 = "firstname.lastname@example.org"
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?
CUP version 10.5
CUCM version 10.5
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.
the problem is with your User ID, because it contains '@domain.co.xx'. It looks like CUCM treat your User ID as 'email@example.com' and not as a 'joe.doe'. CAXL in this example does not allow '@' character in username. When you type 'firstname.lastname@example.org' 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.
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?
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).
just additional comment:
when you set the User ID to email@example.com and when you are trying to connect, 'firstname.lastname@example.org@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 email@example.com in your web sdk application.
In basic-chat.html you should only change this line:
client.connect(jabberwerx.$("#username").val() + "@" + demoConfig.domain,
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?