XMPP server : Account created but attributes not getting saved

Hello friends,

I am creating new user on ejabberd server.The user gets created. In the code below

ejabberd server has access rule is : [register, [{allow,all}]]

However, the attributes that i pass along with createAccount(), do not get saved on the ejabberd server.

libraries used - asmack-android-8-4.0.7, dnsjava-2.1.7.

XMPP server - ejabberd 2.1.11

The last 2 lines of code posted below, return null value. I do not know what am i missing to correctly create account with attributes too getting saved.

Code is

ConnectionConfiguration config = new ConnectionConfiguration(“myserver.co”);
conn1 = new XMPPTCPConnection(config);

AccountManager accMan = AccountManager.getInstance(conn1);
Map<String, String> attributes = new HashMap<String, String>();
attributes.put(“phone”, “237”);
attributes.put(“misc”, “123”);
accMan.createAccount(“918”, “hellopass”, attributes);
conn1.login(“918”, “hellopass”);
accMan = AccountManager.getInstance(conn1);
Log.d(TAG, "acc IMEI " + accMan.getAccountAttribute(“misc”)); // null returned here
Log.d(TAG, "acc phone " + accMan.getAccountAttribute(“phone”)); // null returned here