2. XMPP
Extensible Messaging and Presence Protocol (XMPP) is an open XML technology for real-time communication
Key XMPP technologies:
Core — information about the core XMPP technologies for XML streaming
Jingle — SIP-compatible multimedia signalling for voice, video, file transfer, and other applications
Multi-User Chat — flexible, multi-party communication
PubSub — alerts and notifications for data syndication, rich presence, and more
BOSH — an HTTP binding for XMPP (and other) traffic
3. How it works
Interleaved XML document streams:
Client and server streams form an XML document.
● First level tag: <stream>
● 3 types of second levels tags:
– message: asynchronous communications
– iq: Synchronous communications
– presence: presence and status data
6. Ejabberd server
● ejabberd is an Erlang-based XMPP implementation.
● It has been designed to support clustering, fault-tolerance and high availability.
● It supports many features and extensions of xmpp protocol:
– Built-in Multi-User Chat service
– Distributed database (Mnesia)
– Built-in IRC transport
– Built-in Publish-Subscribe service
10. installation
Link to installation notes
Requirements in https://docs.ejabberd.im/admin/installation/
git clone git://github.com/processone/ejabberd.git ejabberd
cd ejabberd
./autogen.sh
./configure
make install
11. Starting ejabberd
prompt> ejabberdctl start
prompt> ejabberdctl status
The node ejabberd@localhost is started with status: started
ejabberd is running in that node
prompt> ejabberdctl stop
12. configurations
Add user
ejabberdctl register admin1 example.org FgT5bk3
Enable Admin Account - go to /etc/ejabberd/ejabberd.yml
acl:
admin:
user:
- "admin1": "example.org"
access:
configure:
admin: allow
17. integrate the enabled module via API
##
## Modules enabled in all ejabberd virtual hosts.
##
modules:
mod_snatch_custom: {}
mod_adhoc: {}
mod_admin_extra: {}
18. How to save chat on server or update message
read/unread count
XEP-0313: Message Archive Management
https://blog.process-one.net/ejabberd-15-06/