i started to using converse js,first of all,i am using converse.js 3.2.1 and for the xmpp server i am using ejabberd 17.04,and what i want is:
with so much effort on googling and read the documentation,i reached the conclusion that i must using keepalive,prebind,prebind url and provide the jid,and i must add serverside prebinding,and i found this xmpp library
but when i try the prebinding i got some kind of error :
Fatal error: Uncaught XmppPrebindConnectionException: Child not found in response from server. in /var/www/html/converse.js/bind/lib/XmppPrebind.php:170 Stack trace: #0 /var/www/html/converse.js/bind/bind.php(19): XmppPrebind->connect('admin3@localhos...', 'xxxxxx') #1 {main} thrown in /var/www/html/converse.js/bind/lib/XmppPrebind.php on line 170
this is my serverside code
$xmppPrebind = new XmppPrebind('localhost', 'http://localhost:5280/http-bind/', '5280', false, false);
$xmppPrebind->connect('admin3@localhost', 'xxxxx');
$xmppPrebind->auth();
$sessionInfo = $xmppPrebind->getSessionInfo(); // array containing sid, rid and jid
echo $sessionInfo;
and this is my converse.init :
converse.initialize({
prebind: true,
prebind_url: "bind/bind.php",
allow_muc_invitations : true,
allow_logout: true,
jid : "admin3@localhost",
debug: true,
bosh_service_url: 'http://localhost:5280/http-bind/',
keepalive : true,
authentification: 'prebind',
prebind : true,
auto_list_rooms: true,
auto_subscribe: false,
hide_muc_server: false,
i18n: locales.id, // Refer to ./locale/locales.js to see which locales are supported
show_controlbox_by_default: true,
xhr_user_search: false,
play_sounds: true,
sounds_path : "http://localhost/converse.js/sounds/",
message_storage : 'local',
message_archiving: 'always',
default_domain : "localhost"
});