SIP-XMPP Multiparty Chat¶
This is done by bridging MUC functionality from XMPP with MSRP-Switch functionality using SIP.
- SIP users can create ad-hoc conference rooms using SylkServer MSRP chat and invite users from both SIP and XMPP domains
- XMPP users can create multiparty conferences using SylkServer MUC capability and invite users from both XMPP and SIP worlds
The XMPP gateway application in SylkServer implements mediated invitations, that is, invitations performed through the MUC room itself. This is analogous to how it's performed on the SIP side and how all of the tested XMPP clients operate.
Joining a conference¶
A conference room will be created if it doesn't exist previously. For joining a conference, an XMPP endpoint will send a presence stanza with the URI of the room. SylkServer handles conferences as part of the conference application, so it will create a new SIP session which will join the conference.Usually the SIP INVITE will loop in the proxy and enter SylkServer again, but this time the executed application will be "conference".
The XMPP gateway application will receive SIP NOTIFY requests with RFC 4575 payload specifying the participants in the room, and this will be translated into presence stanza elements. Likewise, all MSRP messages received on the SIP session will be translated into groupchat message stanzas.
Inviting new participants¶
SylkServer allows for XMPP users to invite SIP endpoints or vice versa. This is accomplished in the same fashion as joining a conference: it takes place in the conference application, which is based on SIP. Here is the sequence of actions which are performed for inviting a SIP or XMPP endpoint to a conference room, from an XMPP endpoints view:
- A message stanza with the invite element pointing to the desired user is sent to the room
- SylkServer sends an out of dialog REFER request towards the conference room URI and indicates the user that needs to be invited in a Refer-To header
- When the REFER request arrives back at SylkServer, it will create an outgoing SIP session towards the URI in the Refer-To header, it also indicates that the session comes from a conference server by adding the isfocus contact header parameter
- If the invited user was a SIP endpoint, it will accept the session and join the conference
- If the invited user was a XMPP endpoint, the SIP INVITE will enter SylkServer yet again, but this time it will be handled by the XMPP gateway application
- The XMPP gateway application detects the INVITE as an invitation to join a conference because it contains a Referred-By header and the isfocus contact header parameter
- SylkServer sends a message stanza to the invited user indicating who invited him