CUSAX with Jitsi

The CUSAX specification (RFC7081) describes suggested practices for the Combined Use of SIP And XMPP (hence the name). Such practices aim to provide a single fully featured real-time communication service by using each of the two protocols for what its best suited: SIP for audio/video calls. XMPP for everything else (e.g. IM, presence, server stored contact lists, avatars, file transfer, etc.)

This tutorial is probably going to grow in the future but setting up CUSAX with Jitsi is actually quite simple. You basically just need to:

  • Setup an authenticated provisioning service that will provide clients with their SIP and XMPP accounts. (You don’t need this part for the early testing stages)
  • Make sure that the XMPP accounts in Jitsi would have their calling features disabled. The property that does this is called “CALLING_DISABLED” and you need to set it to “true”. You would normally have this done through provisioning but you can obviously also do it manually. Note that this is an account property and it has to appear together with the other properties for your account. Here’s an example:
 net.java.sip.communicator.impl.protocol.jabber.acc139=acc139
 net.java.sip.communicator.impl.protocol.jabber.acc139.ACCOUNT_UID=Jabber\:emcho@jit.si@jit.si
 net.java.sip.communicator.impl.protocol.jabber.acc139.ENCRYPTED_PASSWORD=AoaUPNasdasttc\=\=
 net.java.sip.communicator.impl.protocol.jabber.acc139.SERVER_ADDRESS=jit.si
 net.java.sip.communicator.impl.protocol.jabber.acc139.USER_ID=emcho@jit.si
 net.java.sip.communicator.impl.protocol.jabber.acc139.CALLING_DISABLED=true
  • Make sure every XMPP user’s vCard in your XMPP installation contains a phone (and potentially a video) number for the corresponding SIP account.

Optional:

  • Tell Jitsi that your XMPP account is associated with your SIP account. You can do this by setting the “cusax.XMPP_ACCOUNT_ID” property of your SIP account. If for example, you’d like to setup a SIP account for the XMPP account that we’ve used above, the line that establishes the association would look like this:
 net.java.sip.communicator.impl.protocol.sip.accsip1.cusax.XMPP_ACCOUNT_ID=acc139
  • In order for Jitsi to be able to match incoming calls from SIP to an XMPP contact you need to make sure that the SIP INVITEs that Jitsi will receive, will have a properly initialized Call-Info header as explained by the CUSAX specification. For example, if sip:alice@example.com is making a call her INVITE should contain this:
 From: Alice <sip:alice@example.com>;tag=1928301774
 Call-Info: <xmpp:alice@xmpp.example.com> ;purpose=impp