Skip to content

Latest commit

 

History

History
104 lines (68 loc) · 4.66 KB

lwpCallControl.md

File metadata and controls

104 lines (68 loc) · 4.66 KB

lwpCallControl

NOTE! It is not expected that an instance of this class be created outside of the libwebphone interals. To access this instance use the libwebphone instance method getCallControl(). If you are unfamiliar with the structure of libwebphone its highly recommended you start here.

Provides call controls such as redial, answer, cancel, hangup, hold/unhold, mute/unmute and transfer.

Methods

redial()

Starts a new call to the last dialed number.

cancel()

Ends the primary call attempt (used for calls not yet established).

hangup()

Ends the primary call (used for established calls).

hold()

Places the primary call on hold.

unhold()

Resumes the primary call if on hold.

mute()

Mutes audio and video being transmitted on the primary call.

unmute()

Unmutes audio and video being transmitted on the primary call.

transfer()

Starts or completes a started transfer on the primary call.

answer()

Answers the primary call.

updateRenders(call)

Name Type Description
call lwpCall The call to consider the primary when rendering the elements

Re-paint / update all render targets.

i18n

Key Default (en) Description
answer Answer Used as the text for the answer action
redial Redial Used as the text for the redial action
cancel Cancel Used as the text for the cancel action
hangup Hung Up Used as the text for the hang up action
hold Hold Used as the text for the hold action
unhold Resume Used as the text for the unhold action
mute Mute Used as the text for the mute action
unmute Unmute Used as the text for the unmute action
transferblind Blind Transfer Used as the text for the start blind transfer action
transferattended Attended Transfer Used as the text for the start attended transfer action
transfercomplete Transfer (complete) Used as the text for the complete transfer action

Configuration

Name Type Default Description
renderTargets array [] See lwpRenderer

Events

Emitted

Event Additional Parameters Description
callControl.created Emitted when the class is instantiated

Consumed

Event Reason
call.promoted Invokes updateRenders() to show call controls relevant to the new primary call
call.primary.progress Invokes updateRenders() to show call controls relevant to the new call state
call.primary.established Invokes updateRenders() to show call controls relevant to the new call state
call.primary.hold Invokes updateRenders() to show call controls relevant to the new call state
call.primary.unhold Invokes updateRenders() to show call controls relevant to the new call state
call.primary.muted Invokes updateRenders() to show call controls relevant to the new call state
call.primary.unmuted Invokes updateRenders() to show call controls relevant to the new call state
call.primary.transfer.collecting Invokes updateRenders() to show call controls relevant to the new call state
call.primary.transfer.completed Invokes updateRenders() to show call controls relevant to the new call state
call.primary.terminated Invokes updateRenders() to show call controls relevant to the new call state
userAgent.call.failed Invokes updateRenders() re-enable any disable HTML elements

Default Template

Data

HTML