Username with blank space and Active Directory LDAP authentication

Hi,

I’ve an Openfire with Asterisk-IM running with Active Directory LDAP authentication. Some of our users have a blank space in their username, when It’s the case, Asterisk-IM does not seems to work. When a user with no blank space in his username makes a call, his status change correctly. If I change the username (in active directory) and put a blank space, change the phone mapping, It’s not working anymore.

According to the log file, Asterisk-IM seems however to detect the call in both cases:

2008.04.16 21:52:36 Adding channel SIP/210-b6e06710(1208375412.158)

2008.04.16 21:52:36 OnPhoneTask called for user PhoneUser{id=33, username=‘cyrille’}

2008.04.16 21:52:37 Adding channel mISDN/0-u125(1208375412.159)

2008.04.16 21:52:37 OnPhoneTask: Could not find device/jid mapping for device mISDN/0 returning

2008.04.16 21:52:37 SIP/210-b6e06710 dialed mISDN/0-u125

2008.04.16 21:52:40 Removing channel mISDN/0-u125 due to hangup (NORMAL)

2008.04.16 21:52:40 Removing channel SIP/210-b6e06710 due to hangup (NOTDEFINED)

and

2008.04.16 21:55:54 Adding channel SIP/210-b6e07ca0(1208375610.160)

2008.04.16 21:55:54 OnPhoneTask called for user PhoneUser{id=35, username=‘cyrille test’}

2008.04.16 21:55:54 no sessions

2008.04.16 21:55:54 Adding channel mISDN/0-u128(1208375610.161)

2008.04.16 21:55:54 OnPhoneTask: Could not find device/jid mapping for device mISDN/0 returning

2008.04.16 21:55:54 SIP/210-b6e07ca0 dialed mISDN/0-u128

2008.04.16 21:55:59 Linking channels SIP/210-b6e07ca0 and mISDN/0-u128

2008.04.16 21:56:01 Removing channel mISDN/0-u128 due to hangup (NORMAL)

2008.04.16 21:56:01 Removing channel SIP/210-b6e07ca0 due to hangup (NORMAL)

I don’t know what “no sessions” means in the log file but If it means that no client is connected with this username, It’s wrong.

Is there a way to fix it or is it a bug?

Thank you,

Best regards,

Cyrille

Hm what is the jid of the user with a space in it? I think spaces in a JID are not allowed, are they?

Sorry, I think I’ve edited my post with more information after your answer.

JID is “cyrille test”

I don’t know If JID with space is allowed or not, I will check it on google.

Best regards,

Cyrille

Thanks for adding the log snippet.

http://www.xmpp.org/extensions/xep-0106.html says jids with a space must be escaped, i.e. “cyrille\20test”. It seems Asterisk-IM does not do that before it looks for active chat sessions. So it’s a bug.

I’ve opened PHONE-74 to track it.

To make it works before a fix, do you mean that It should work If I escape username in the phone mappings?

You can try to use “cyrille\20test” there. Report back if it works

=Stefan

It seems to work with manual escaping.

Thank you,

Cyrille