CallEvents
Constants
ActiveUpdated
Parameters
call:
Call that triggered the event
new:
boolean
Current call's activity status
old:
boolean
Old call's activity status
CallStatsReceived
Event is triggered when the call is CONNECTED at the interval specified by Config.rtcStatsCollectionInterval (defaults to 10 seconds).
Parameters
call:
Call that triggered the event
stats:
Connected
Event is triggered when a reliable connection is established for the call. Depending on network conditions there can be a 2-3 seconds delay between first audio data and this event.
Parameters
call:
Call that triggered the event
headers:
Object
OptionalOptional SIP headers are received with the message
Disconnected
Event is triggered when a call was disconnected
Parameters
call:
Call that triggered the event
headers:
Object
OptionalOptional SIP headers are received with the message
EndpointAdded
Event is triggered when a new Endpoint is created. Endpoint represents another participant in your call or conference.
EndpointRemoved
Failed
Event is triggered due to a call failure Most frequent status codes:
Code | Description |
---|---|
486 | Destination number is busy |
487 | Request terminated |
603 | Call was rejected |
404 | Invalid number |
480 | Destination number is unavailable |
402 | Insufficient funds |
Parameters
call:
Call that triggered the event
code:
number
Call status code (i.e. 486) Most frequent status codes:
Code Description 486 Destination number is busy 487 Request terminated 603 Call was rejected 404 Invalid number 480 Destination number is unavailable 402 Insufficient funds headers:
Object
OptionalOptional SIP headers are received with the message
reason:
string
Status message of a call failure (i.e. Busy Here)
ICECompleted
Event is triggered when an ICE connection is complete
Parameters
call:
Call that triggered the event
ICETimeout
Event is triggered when connection was not established due to a network connection problem between 2 peers
Parameters
call:
Call that triggered the event
InfoReceived
Event is triggered when the INFO message is received
Parameters
body:
string
Content of the message
call:
Call that triggered the event
headers:
Object
OptionalOptional SIP headers are received with the message
mimeType:
string
MIME type of INFO message
MessageReceived
Event is triggered when a text message is received.
Parameters
call:
Call that triggered the event
text:
string
Content of the message
ProgressToneStart
Event is triggered when a progress tone playback starts.
Parameters
call:
Call that triggered the event
ProgressToneStop
Event is triggered when a progress tone playback stops.
Parameters
call:
Call that triggered the event
RTCStatsReceived
Event is triggered every 10 seconds when the call is CONNECTED. Handler function receives RTCStatsReport dictionary as it is returned by a browser RTCPeerConnection.getStats() method as an argument. RTCStatsReport provides statistics about the specified Call and may differ from one vendor to another.
StateUpdated
Parameters
call:
Call that triggered the event
new:
CallState
Current call's state
old:
CallState
Old call's state
TransferComplete
Event is triggered when a call has been transferred successfully.
Parameters
call:
Call that triggered the event
TransferFailed
Event is triggered when a call transfer failed
Parameters
call:
Call that triggered the event
Updated
Event is triggered when a call was updated. For example, video was added/removed. Handler function receives the EventHandlers.Updated object as an argument.
Parameters
call:
Call that triggered the event
reason:
string
OptionalReason of unsuccessful updating
result:
boolean
True in case of successful updating, false in other cases.