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
Triggered when the call statistics are received. The collection interval is specified in Config.rtcStatsCollectionInterval (defaults to 10 seconds).
Parameters
call:
Call that triggered the event
stats:
Connected
Trigerred after the call is connected from the signaling perspective. 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
Triggered when a call has been disconnected
Parameters
call:
Call that triggered the event
headers:
Object
OptionalOptional. SIP headers are received with the message
EndpointAdded
Triggered when a new Endpoint is created. Endpoint represents another participant in the call or conference. This event is not triggered if a user connects via joinAsViewer.
EndpointRemoved
Failed
Triggered due to a call failure Most frequent status codes:
Code | Description |
---|---|
486 | Destination number is busy |
487 | Request terminated |
603 | Call has been 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 has been 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
Triggered when an ICE connection is complete
Parameters
call:
Call that triggered the event
ICETimeout
Triggered when connection has not been established due to a network connection problem between 2 peers
Parameters
call:
Call that triggered the event
InfoReceived
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
Triggered when a text message is received.
Parameters
call:
Call that triggered the event
text:
string
Content of the message
ProgressToneStart
Triggered when the Call.ring method is called on the scenario side. Usually, this event is triggered when the call is arrived to its destination. After receiving this event, the application should start playing progress tones.
Parameters
call:
Call that triggered the event
ProgressToneStop
Triggered when the Call.answer or Call.startEarlyMedia method is called on the scenario side. After receiving this event, the application should stop playing progress tones if they have been playing after the ProgressToneStart event.
Parameters
call:
Call that triggered the event
RTCStatsReceived
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
TransferComplete
Triggered when a call has been transferred successfully.
Parameters
call:
Call that triggered the event
Updated
Triggered when a call has been updated. For example, video has been added/removed. Handler function receives the EventHandlers.Updated object as an argument.
Parameters
call:
Call that triggered the event
reason:
string
OptionalOptional. Reason of unsuccessful updating.
result:
boolean
Whether the update is successful.