WebPhone SDK events
The WebPhoneSDK makes a number of events available to subscribe to. There are
two categories of events:
webPhone events
callSession events
Subscribing to events
Subscribing to events is done using the on method as shown below.
webPhone . on ( "inboundCall" , ( inboundCall : InboundCallSession ) => {
// do something with the inbound call
});
callSession . on ( "disposed" , () => {
// do something when the call session is disposed
});
WebPhone events
CallSession events
Event
Description
answered
Triggered when the call is answered.
disposed
For answered calls, this event is triggered when someone hangs up. For inbound calls, it is triggered if the caller hangs up or if the call is answered on another device.
inboundMessage
Triggered for inbound SIP messages with the same exact Call-ID as this live Call Session.
ringing
This event does exist, but it is effectively implied by the existence of other events.
SIP Client events
Event
Description
inboundMessage
Triggered for every inbound SIP message received by the SIP Client.
outboundMessage
Triggered when the SIP Client sends a SIP message.