Aoba Voice Call Signaling API 1.0.0

WebRTC voice call signaling over XMPP IQ stanzas.

Purpose

This API provides WebRTC call setup and management via XMPP, including:

  • Call initiation and acceptance
  • SDP offer/answer exchange
  • ICE candidate exchange
  • Call termination and status updates

Transport

Voice call signals are transmitted via XMPP IQ stanzas using the custom namespace urn:xmpp:call:0. This allows call signaling to share the existing XMPP WebSocket connection used for chat messaging.

Call Flow

Caller                                          Callee
  │                                                │
  │  1. call:initiate                             │
  │  ─────────────────────────────────────────►   │
  │                                                │
  │  2. call:accept (or call:reject/call:busy)    │
  │  ◄─────────────────────────────────────────   │
  │                                                │
  │  3. call:offer (SDP)                          │
  │  ─────────────────────────────────────────►   │
  │                                                │
  │  4. call:answer (SDP)                         │
  │  ◄─────────────────────────────────────────   │
  │                                                │
  │  5. call:ice-candidate (multiple, both ways)  │
  │  ◄────────────────────────────────────────►   │
  │                                                │
  │  [WebRTC media connection established]         │
  │                                                │
  │  6. call:mute-change (optional, both ways)    │
  │  ◄────────────────────────────────────────►   │
  │                                                │
  │  7. call:hangup                               │
  │  ◄────────────────────────────────────────►   │
  │                                                │

Signal Types

Signal Direction Description
call:initiate Caller → Callee Start a new call
call:accept Callee → Caller Accept incoming call
call:reject Callee → Caller Decline incoming call
call:offer Caller → Callee WebRTC SDP offer
call:answer Callee → Caller WebRTC SDP answer
call:ice-candidate Both ways ICE candidate for NAT traversal
call:hangup Either party End the call
call:busy Callee → Caller Callee is on another call
call:mute-change Both ways Mute state changed

End Reasons

When a call ends (via call:hangup), the reason is included:

  • completed: Normal hangup after connected call
  • rejected: Callee declined the call
  • timeout: No answer within timeout period (30 seconds)
  • busy: Callee was on another call
  • failed: ICE/network connection failed
  • cancelled: Caller cancelled before callee answered

Servers

  • ws://localhost:8082/wsdevelopment

    Local development server

  • wss://staging.aoba.chat/wssstaging

    Staging server (TLS required)

  • wss://api.aoba.chat/wssproduction

    Production server (TLS required)

Operations

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Initiate a voice call

    Start a new voice call with another user. The callee will receive the initiate signal and can respond with accept, reject, or busy.

    Operation IDinitiateCall

    Available only on servers:

    object

    Accepts the following message:

    Call Initiate SignalCallInitiate

    Start a new voice call

    Message IDCallInitiate
    allOf

    Examples

  • RECEIVE /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Receive incoming call

    Receive notification of an incoming voice call. Respond with accept, reject, or busy within the timeout period (30 seconds).

    Operation IDreceiveCallInitiate

    Available only on servers:

    object

    Accepts the following message:

    Call Initiate SignalCallInitiate

    Start a new voice call

    Message IDCallInitiate
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Accept incoming call

    Accept an incoming call. The caller will then send an SDP offer.

    Operation IDacceptCall

    Available only on servers:

    object

    Accepts the following message:

    Call Accept SignalCallAccept

    Accept an incoming call

    Message IDCallAccept
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Reject incoming call

    Decline an incoming call.

    Operation IDrejectCall

    Available only on servers:

    object

    Accepts the following message:

    Call Reject SignalCallReject

    Decline an incoming call

    Message IDCallReject
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Send busy signal

    Indicate that you're already on another call.

    Operation IDsendBusy

    Available only on servers:

    object

    Accepts the following message:

    Call Busy SignalCallBusy

    Recipient is on another call

    Message IDCallBusy
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Send SDP offer

    Send WebRTC SDP offer after call is accepted. This contains the caller's media capabilities.

    Operation IDsendOffer

    Available only on servers:

    object

    Accepts the following message:

    SDP Offer SignalCallOffer

    WebRTC SDP offer

    Message IDCallOffer
    allOf

    Examples

  • RECEIVE /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Receive SDP offer

    Receive the caller's SDP offer.

    Operation IDreceiveOffer

    Available only on servers:

    object

    Accepts the following message:

    SDP Offer SignalCallOffer

    WebRTC SDP offer

    Message IDCallOffer
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Send SDP answer

    Send WebRTC SDP answer in response to offer. This contains the callee's media capabilities.

    Operation IDsendAnswer

    Available only on servers:

    object

    Accepts the following message:

    SDP Answer SignalCallAnswer

    WebRTC SDP answer

    Message IDCallAnswer
    allOf

    Examples

  • RECEIVE /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Receive SDP answer

    Receive the callee's SDP answer.

    Operation IDreceiveAnswer

    Available only on servers:

    object

    Accepts the following message:

    SDP Answer SignalCallAnswer

    WebRTC SDP answer

    Message IDCallAnswer
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Send ICE candidate

    Send an ICE candidate for NAT traversal. Multiple candidates may be sent in both directions during connection establishment.

    Operation IDsendIceCandidate

    Available only on servers:

    object

    Accepts the following message:

    ICE Candidate SignalCallIceCandidate

    ICE candidate for NAT traversal

    Message IDCallIceCandidate
    allOf

    Examples

  • RECEIVE /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Receive ICE candidate

    Receive an ICE candidate from the other party.

    Operation IDreceiveIceCandidate

    Available only on servers:

    object

    Accepts the following message:

    ICE Candidate SignalCallIceCandidate

    ICE candidate for NAT traversal

    Message IDCallIceCandidate
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    End the call

    Terminate the call. Include the reason and optional duration if the call was connected.

    Operation IDsendHangup

    Available only on servers:

    object

    Accepts the following message:

    Call Hangup SignalCallHangup

    End the call

    Message IDCallHangup
    allOf

    Examples

  • RECEIVE /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Receive hangup

    Receive notification that the other party ended the call.

    Operation IDreceiveHangup

    Available only on servers:

    object

    Accepts the following message:

    Call Hangup SignalCallHangup

    End the call

    Message IDCallHangup
    allOf

    Examples

  • SEND /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Send mute state change

    Notify the other party of your mute state change.

    Operation IDsendMuteChange

    Available only on servers:

    object

    Accepts the following message:

    Mute Change SignalCallMuteChange

    Mute state changed

    Message IDCallMuteChange
    allOf

    Examples

  • RECEIVE /xmpp

    Voice call signaling via XMPP IQ stanzas.

    Namespace: urn:xmpp:call:0 Authentication: JWT token must be present in auth_token cookie.

    Voice call signals are embedded in XMPP IQ stanzas and share the same WebSocket connection as chat messages. The signal payload is JSON-encoded within the IQ stanza.

    IQ Stanza Format:

    <iq type="set" to="{recipientJID}" id="{messageId}">
      <call xmlns="urn:xmpp:call:0">
        {JSON signal payload}
      </call>
    </iq>
    

    Receive mute state change

    Receive notification of the other party's mute state.

    Operation IDreceiveMuteChange

    Available only on servers:

    object

    Accepts the following message:

    Mute Change SignalCallMuteChange

    Mute state changed

    Message IDCallMuteChange
    allOf

    Examples

Messages

  • #1Call Initiate SignalCallInitiate

    Start a new voice call

    Message IDCallInitiate
    allOf
  • #2Call Accept SignalCallAccept

    Accept an incoming call

    Message IDCallAccept
    allOf
  • #3Call Reject SignalCallReject

    Decline an incoming call

    Message IDCallReject
    allOf
  • #4SDP Offer SignalCallOffer

    WebRTC SDP offer

    Message IDCallOffer
    allOf
  • #5SDP Answer SignalCallAnswer

    WebRTC SDP answer

    Message IDCallAnswer
    allOf
  • #6ICE Candidate SignalCallIceCandidate

    ICE candidate for NAT traversal

    Message IDCallIceCandidate
    allOf
  • #7Call Hangup SignalCallHangup

    End the call

    Message IDCallHangup
    allOf
  • #8Call Busy SignalCallBusy

    Recipient is on another call

    Message IDCallBusy
    allOf
  • #9Mute Change SignalCallMuteChange

    Mute state changed

    Message IDCallMuteChange
    allOf

Schemas

  • SignalType
    string

    Type of call signal

      Allowed values:
    • "call:initiate"
    • "call:accept"
    • "call:reject"
    • "call:offer"
    • "call:answer"
    • "call:ice-candidate"
    • "call:hangup"
    • "call:busy"
    • "call:mute-change"
  • EndReason
    string

    Reason for call ending

      Allowed values:
    • "completed"
    • "rejected"
    • "timeout"
    • "busy"
    • "failed"
    • "cancelled"
  • object

    Base schema for all call signals

  • object

    Payload for call:initiate signal

  • object

    Payload for SDP offer/answer signals

  • object

    Payload for ICE candidate signal

  • object

    Payload for call:hangup signal

  • object

    Payload for call:mute-change signal

  • object

    Empty payload for signals that don't need additional data

  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf