Namespace: Call

Call

Represents sip call.
Source:
See:

Members

(inner) call

Answer incoming call.
Source:

(inner) call

Initiate outgoing call.
Source:

Methods

(inner) callee() → {string}

Get callee id.
Source:
Returns:
Callee id
Type
string

(inner) caller() → {string}

Get caller id.
Source:
Returns:
Caller id
Type
string

(inner) getStats(callbackFn, nativeStats) → {Object}

Get statistics
Parameters:
Name Type Description
callbackFn callbackFn The callback that handles response
nativeStats Boolean If true, use native browser statistics
Source:
Returns:
Call audio\video statistics
Type
Object

(inner) getVolume() → {number}

Get current volume
Source:
Returns:
Volume or -1 if audio is not available
Type
number

(inner) hangup()

Hangup call.
Source:

(inner) hold()

Place call on hold
Source:

(inner) holdForTransfer()

Place call on hold for transfer
Source:

(inner) id() → {string}

Get call id.
Source:
Returns:
Call id
Type
string

(inner) isAudioMuted() → {boolean}

Check outgoing audio mute state
Source:
Returns:
True if audio is muted or not available
Type
boolean

(inner) isVideoMuted() → {boolean}

Check outgoing video mute state
Source:
Returns:
True if video is muted or not available
Type
boolean

(inner) muteAudio()

Mute outgoing audio
Source:

(inner) muteVideo()

Mute outgoing video
Source:

(inner) on(event, callback) → {Call}

Add call event callback.
Parameters:
Name Type Description
event string One of Flashphoner.constants.CALL_STATUS events
callback Call~eventCallback Callback function
Source:
Throws:
  • Error if event is not specified
    Type
    TypeError
  • Error if callback is not a valid function
    Type
    Error
Returns:
Call callback was attached to
Type
Call

(inner) sendDTMF(number, typeopt)

Send DTMF
Parameters:
Name Type Attributes Description
number number Number
type string <optional>
DTMF Type (RFC2833, INFO, INFO_RELAY)
Source:

(inner) setAudioOutputId(id)

Set other oupout audio device
Parameters:
Name Type Description
id string Id of output device
Source:

(inner) setAudioOutputId(id)

Set other oupout audio device
Parameters:
Name Type Description
id string Id of output device
Source:

(inner) setVolume(volume)

Set volume of remote media
Parameters:
Name Type Description
volume number Volume between 0 and 100
Source:

(inner) status() → {string}

Get call status.
Source:
Returns:
Type
string

(inner) switchCam()

Switch camera in real-time. Works only with WebRTC
Source:
Throws:
Error if call status is not Flashphoner.constants.CALL_STATUS.ESTABLISHED and not Flashphoner.constants.CALL_STATUS.HOLD
Type
Error

(inner) switchMic()

Switch mic in real-time. Works only with WebRTC
Source:
Throws:
Error if call status is not Flashphoner.constants.CALL_STATUS.ESTABLISHED and not Flashphoner.constants.CALL_STATUS.HOLD
Type
Error

(inner) switchToCam()

Switch to cam in real-time. Works only with WebRTC
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) switchToScreen(source, woExtension)

Switch to screen in real-time. Works only with WebRTC
Parameters:
Name Type Description
source String Screen sharing source (for firefox)
woExtension Boolean Screen sharing without extension (for chrome)
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) transfer(traget)

Transfer call
Parameters:
Name Type Description
traget String Transfer target
Source:

(inner) unhold()

Unhold the call
Source:

(inner) unmuteAudio()

Unmute outgoing audio
Source:

(inner) unmuteVideo()

Unmute outgoing video
Source:

(inner) visibleName() → {string}

Get caller visible name.
Source:
Returns:
Caller visible name
Type
string

Type Definitions

eventCallback(call)

Call event callback.
Parameters:
Name Type Description
call Call Call that corresponds to the event
Source: