Events

CallEvents.AcceptReInvite

Event triggered when ReInvite message is accepted

Properties
  • body: String

    Content of the message

  • call: Call

    Call that triggered the event

  • headers: Object

    Optional SIP headers received with the message

  • mimeType: String

    MIME type of body data "application/sdp" or "application/json"

  • name: String

    The name of the event - "Call.AcceptReInvite"

CallEvents.AudioStarted

Event triggered after outgoing call starts receiving media from remote peer.

Properties
  • call: Call

    Call that triggered the event

  • headers: Object

    Custom SIP headers received with the message (ones starting with "X-")

  • name: String

    The name of the event - "Call.AudioStarted"

CallEvents.Connected

Event triggered after the call is established.

Properties
  • call: Call

    Call that triggered the event

  • customData: String

    Optional: Custom data that was passed from client with call accept command

  • name: String

    The name of the event - "Call.Connected"

CallEvents.Disconnected

Event triggered when established call was terminated.

Properties
  • call: Call

    Call that triggered the event

  • cost: number

    Call cost in account currency

  • duration: number

    Total call duration in seconds

  • headers: Object

    Custom SIP headers received with the message (ones starting with "X-")

  • name: String

    The name of the event - "Call.Disconnected"

CallEvents.Failed

Event triggered when call was terminated before it was connected.

Most frequent status codes:
CodeDescription
486Destination number is busy
487Request terminated
603Call was rejected
404Invalid number
480Destination number is unavailable
402Insufficient funds
Properties
  • call: Call

    Call that triggered the event

  • code: Number

    Status code of the call (i.e. 486)

  • headers: Object

    Custom SIP headers received with the message (ones starting with "X-")

  • name: String

    The name of the event - "Call.Failed"

  • reason: String

    Status message of call failure (i.e. Busy Here)

CallEvents.FirstVideoPacket

Dispatched after the first video packet received

Properties
  • call: Call

    Call that triggered the event

  • url: string

    Record URL

CallEvents.InfoReceived

Event triggered when INFO message is received

Properties
  • body: String

    Content of the message

  • call: Call

    Call that triggered the event

  • headers: Object

    Optional SIP headers received with the message

  • mimeType: String

    MIME type of INFO message

  • name: String

    The name of the event - "Call.InfoReceived"

CallEvents.MessageReceived

Event triggered when Text Message is received

Properties
  • call: Call

    Call that triggered the event

  • headers: Object

    Optional SIP headers received with the message

  • name: String

    The name of the event - "Call.MessageReceived"

  • text: String

    Content of the message

CallEvents.MicStatusChange

Event triggered when microphone status changed.

Properties
  • active: Boolean

    Activity flag

  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.MicStatusChange"

CallEvents.OffHold

Event triggered when call is taken off hold

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.OffHold"

CallEvents.OnHold

Event triggered when call is put on hold

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.OnHold"

CallEvents.PlaybackFinished

Event triggered when audio playback is finished.

Note that it is not triggered when playback finished because of stopPlayback called
Properties
  • call: Call

    Call that triggered the event

  • error: String

    Optional: Error that occured during the playback

  • name: String

    The name of the event - "Call.PlaybackFinished"

CallEvents.ReInvite

Event triggered when ReInvite message is received

Properties
  • body: String

    Content of the message

  • call: Call

    Call that triggered the event

  • headers: Object

    Optional SIP headers received with the message

  • mimeType: String

    MIME type of body data "application/sdp" or "application/json"

  • name: String

    The name of the event - "Call.ReInvite"

CallEvents.RecordStarted

Event triggered when call recording is started as result of Call.record()

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.RecordStarted"

  • url: String

    HTTP URL of record file.

CallEvents.RecordStopped

Event triggered when call recording is stopped

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.RecordStopped"

  • url: String

    HTTP URL of record file.

CallEvents.Ringing

Event triggered after outgoing call receives progress signal from remote peer.

Properties
  • call: Call

    Call that triggered the event

  • headers: Object

    Custom SIP headers received with the message (ones starting with "X-")

  • name: String

    The name of the event - "Call.Ringing"

CallEvents.Statistic

Event triggered when call statistic changed.

Properties
  • call: Call

    Call that triggered the event

CallEvents.ToneDetected

Event triggered when tone is detected.

Properties
  • ProgressTonŠµ: Boolean

    If set to true, the detected tone is a progress tone.

  • VoicemailTone: Boolean

    If set to true, the detected tone is a voicemail tone.

  • call: Call

    Call thet triggered the event

  • name: String

    The name of the event - "Call.ToneDetected"

CallEvents.ToneReceived

Event triggered when DTMF signal is received.

Note that by default DTMF signals will not trigger this event, this behavior needs to be set explicitly
Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.ToneReceived"

  • tone: String

    Tone received in this event: 0-9,*,# are possible values

CallEvents.TransferComplete

Event triggered when call transfer complete

Properties
  • call: Call

    Call that triggered the event

CallEvents.VideoTrackCreated

Dispatched after the video track created

Properties
  • call: Call

    Call that triggered the event

  • url: string

    Record URL

CallEvents.VoicemailPromptDetected

Event triggered when voicemail prompt is detected. Please note that this method is based on specific audio signal pattern which isn't always in place, so there is no 100% guarantee that it will detect voicemail in all situations.

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.VoicemailPromptDetected"

  • pattern: String

    Pattern which corresponds to media stream, see PromptStreamPattern

CallEvents.VoicemailPromptNotDetected

Event triggered when voicemail prompt is not detected. Please note that this method is based on specific audio signal pattern which isn't always in place, so there is no 100% guarantee that it will detect voicemail in all situations.

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.VoicemailPromptNotDetected"

  • pattern: String

    Pattern which corresponds to media stream, see PromptStreamPattern

CallEvents.VoicemailToneDetected

Event triggered when voicemail tone is detected.

Properties
  • call: Call

    Call that triggered the event

  • frequency: Number

    Tone frequency

  • name: String

    The name of the event - "Call.VoicemailToneDetected"

CallEvents.VoicemailToneNotDetected

Event triggered when voicemail tone is not detected.

Properties
  • call: Call

    Call that triggered the event

  • name: String

    The name of the event - "Call.VoicemailToneNotDetected"