Extension can be found at https://github.com/LiveHelperChat/xmpp-chat
Few short notices
There is two ways to have it working. Either use nodejs as client and API server or use RPC and strophejs as client from visitors. Personally i suggest do not use nodejs and let visitors connect directly to ejabberd. This way it's just easier to maintaint all the services. Like the only required thing is ejabberd and LHC itself. If you are using RPC also make sure that only LHC can make RPC request. E.g using firewall, or setting listening IP to localhost if ejabberd is on the same server as LHC itself.
## For security reasons you can force to listen only on localhost also
## if you are made it public you can setup auth method for this service
## ip: "127.0.0.1"
## access_commands:
## xmlrpc_access:
## commands: all
## options: {}
If you are using access_commands part you also have to edit "access" by adding
xmlrpc_access:
admin: allow
all: deny
mod_lhc:
## Used in automated hosting enviroment
ahenviroment: false
basedomain: "example.com"
ahprotocol: "http://"
## Used in standalone enviroment
message_address: "http://example.com/xmppservice/processmessage"
login_address: "http://example.com/xmppservice/operatorstatus"
logout_address: "http://example.com/xmppservice/operatorstatus"
mod_lhcping:
send_pings: true
ping_interval: 180
timeout_action: kill
## Used in automated hosting enviroment
ahenviroment: false
basedomain: "livehelperchat.com"
ahprotocol: "http://"
## Used in standalone enviroment
ping_address: "http://example.com/xmppservice/operatorstatus"
mod_lhc:
## Used in automated hosting enviroment
ahenviroment: true
basedomain: "example.com"
ahprotocol: "http://"
## Used in standalone enviroment
message_address: "http://example.com/xmppservice/processmessage"
login_address: "http://example.com/xmppservice/operatorstatus"
logout_address: "http://example.com/xmppservice/operatorstatus"
mod_lhcping:
send_pings: true
ping_interval: 180
timeout_action: kill
## Used in automated hosting enviroment
ahenviroment: true
basedomain: "livehelperchat.com"
ahprotocol: "http://"
## Used in standalone enviroment
ping_address: "http://example.com/xmppservice/operatorstatus"
That's all with ejabberd part.
<?php
return array(
'ahosting' => false, // Is it automated hosting enviroment? At the moment keep it false untill automated hosting will be supported
'secret_key' => ''<secret_key>", // Secret key, node will accept commands only if this key is provided. It must match in nodejs settings defined secret key.
'subdomain' => '', // Just keep it empty. It get's filled automatically in automated hosting enviroment
'enabled' => true, // Is this module enabled
'online_visitors_tracking' => true, // Should each online visitor get it's own xmpp account?
'xmpp_host' => 'xmpp.livehelperchat.com', // E.g xmpp.livehelperchat.com
'node_api_server' => 'http://127.0.0.1:4567', // E.g http://127.0.0.1:4567', Address where nodejs server is running
'host_login' => 'localhost', // Host where node server should login as user
'debug' => false, // Write exceptions in cache/default.log use it for debuging purposes
'handler' => 'node',
'rpc_server' => '',
'bosh_service' => '',
'use_notification' => "false",
'prebind_host' => ''
);?>
<?php
return array(
'ahosting' => true, // Is it automated hosting enviroment? At the moment keep it false untill automated hosting will be supported
'secret_key' => ''<secret_key>", // Secret key, node will accept commands only if this key is provided. It must match in nodejs settings defined secret key.
'subdomain' => '', // Just keep it empty. It get's filled automatically in automated hosting enviroment
'enabled' => true, // Is this module enabled
'online_visitors_tracking' => true, // Should each online visitor get it's own xmpp account?
'xmpp_host' => 'xmpp.livehelperchat.com', // E.g xmpp.livehelperchat.com
'node_api_server' => 'http://127.0.0.1:4567', // E.g http://127.0.0.1:4567', Address where nodejs server is running
'host_login' => 'localhost', // Host where node server should login as user
'debug' => false, // Write exceptions in cache/default.log use it for debuging purposes
'handler' => 'node',
'rpc_server' => '',
'bosh_service' => ''',
'use_notification' => "false",
'prebind_host' => ''
);?>
<?php
return array(
'ahosting' => false, // Is it automated hosting enviroment? At the moment keep it false untill automated hosting will be supported
'secret_key' => ''<secret_key>", // Secret key, node will accept commands only if this key is provided. It must match in nodejs settings defined secret key.
'subdomain' => '', // Just keep it empty. It get's filled automatically in automated hosting enviroment
'enabled' => true, // Is this module enabled
'online_visitors_tracking' => true, // Should each online visitor get it's own xmpp account?
'xmpp_host' => 'xmpp.livehelperchat.com', // E.g xmpp.livehelperchat.com
'node_api_server' => 'http://127.0.0.1:4567', // E.g http://127.0.0.1:4567', Address where nodejs server is running
'host_login' => 'localhost', // Host where node server should login as user
'debug' => false, // Write exceptions in cache/default.log use it for debuging purposes
'handler' => 'rpc',
'rpc_server' => 'http://example.com:4560',
'bosh_service' => ''ws://'.$_SERVER['HTTP_HOST'].'/websocket'',
'use_notification' => "false",
'prebind_host' => ''
);?>
<?php
return array(
'ahosting' => true, // Is it automated hosting enviroment? At the moment keep it false untill automated hosting will be supported
'secret_key' => ''<secret_key>", // Secret key, node will accept commands only if this key is provided. It must match in nodejs settings defined secret key.
'subdomain' => '', // Just keep it empty. It get's filled automatically in automated hosting enviroment
'enabled' => true, // Is this module enabled
'online_visitors_tracking' => true, // Should each online visitor get it's own xmpp account?
'xmpp_host' => 'xmpp.livehelperchat.com', // E.g xmpp.livehelperchat.com
'node_api_server' => '', // E.g http://127.0.0.1:4567', Address where nodejs server is running
'host_login' => 'localhost', // Host where node server should login as user
'debug' => false, // Write exceptions in cache/default.log use it for debuging purposes
'handler' => 'rpc',
'rpc_server' => '',
'bosh_service' => '',
'use_notification' => "false",
'prebind_host' => ''
);?>
In automated hosting enviroment you have to do the following things also. Make sure that nodejs server for ejabberd is running.
This is the final part of installation and NodeJS is required to act as gateway between ejabberd and XMPP Service extension. I suggest to have it running on the same server where ejabberd is running. It uses "ejabberdctl" to manage accounts. And also act's on behalf of online visitors as client to XMPP.
There is few things you have to do in fresh instance.
I also recommend to read https://github.com/LiveHelperChat/xmpp-chat/blob/master/README.md
Have fun. Please let me know how it goes :)
Developing application takes a lot of time. You can support application by donating. There is no company behind this application and it takes away my free time. Every donation matters and does not matter how small it is!