Class Index | File Index

Classes


Class SIPml.Session.Call


Extends SIPml.Session.

Defined in: SIPml.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SIPml.Session.Call(session, configuration)
SIP audio/video/screenshare call session class.
Method Summary
Method Attributes Method Name and Description
 
acceptTransfer(configuration)
Accepts incoming transfer request.
 
call(to, configuration)
Makes audio/video call.
 
dtmf(digit, configuration)
Sends a SIP DTMF digit.
 
hangup(configuration)
Terminates the audio/video call.
 
hold(configuration)
Holds the audio/video call.
 
info(content, contentType, configuration)
Sends SIP INFO message.
 
mute(media, mute)
Mutes or unmutes a media.
 
rejectTransfer(configuration)
Rejects incoming transfer request.
 
resume(configuration)
Resumes the audio/video call.
 
startBfcpShare(configuration)
Starts sharing your entire desktop or an App using BFCP(rfc4582).
 
stopBfcpShare(configuration)
Stops sharing your entire desktop or an App using BFCP(rfc4582).
 
transfer(to, configuration)
Transfers the call to a new destination.
Methods borrowed from class SIPml.Session:
accept, getId, getRemoteFriendlyName, getRemoteUri, reject, setConfiguration
Methods borrowed from class SIPml.EventTarget:
addEventListener, removeEventListener
Class Detail
SIPml.Session.Call(session, configuration)
SIP audio/video/screenshare call session class. You should never create an instance of this class by yourself. Please use stack.newSession() function to create a new audio/video/screenshare session.
var listenerFunc = function(e){
    console.info('session event = ' + e.type);
}
var session = stack.newSession('call-audiovideo', {
            video_local: document.getElementById('video-local'), // <video id="video-local" .../>
            video_remote: document.getElementById('video-remote'), // <video id="video-remote" .../>
            audio_remote: document.getElementById('audio-remote'), // <audio id="audio-remote" .../>
            events_listener: { events: '*', listener: listenerFunc },
            sip_caps: [
                            { name: '+g.oma.sip-im' },
                            { name: '+sip.ice' },
                            { name: 'language', value: '\"en,fr\"' }
                        ]
        });
Parameters:
{tsip_session} session
Private wrapped session object
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_INVALID_PARAMETER_VALUE}
ERR_INVALID_PARAMETER_VALUE
Method Detail
{Integer} acceptTransfer(configuration)
Accepts incoming transfer request.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_NOT_READY}
ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} call(to, configuration)
Makes audio/video call.
var listenerFunc = function(e){
    console.info('session event = ' + e.type);
}
var session = stack.newSession('call-audiovideo');
session.call('johndoe', {
            video_local: document.getElementById('video-local'), // <video id="video-local" .../>
            video_remote: document.getElementById('video-remote'), // <video id="video-remote" .../>
            audio_remote: document.getElementById('audio-remote'), // <audio id="audio-remote" .../>
            events_listener: { events: '*', listener: listenerFunc },
            sip_caps: [
                            { name: '+g.oma.sip-im' },
                            { name: '+sip.ice' },
                            { name: 'language', value: '\"en,fr\"' }
                        ]
        });
Parameters:
{String} to
Destination name, uri, phone number or identifier (e.g. 'sip:johndoe@example.com' or 'johndoe' or '+33600000000').
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_INVALID_PARAMETER_VALUE | ERR_NOT_READY}
ERR_INVALID_PARAMETER_VALUE | ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} dtmf(digit, configuration)
Sends a SIP DTMF digit.
session.dtmf('#');
Parameters:
{Char} digit Optional
The digit to send.
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_INVALID_PARAMETER_VALUE | ERR_NOT_READY}
ERR_INVALID_PARAMETER_VALUE | ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} hangup(configuration)
Terminates the audio/video call.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_NOT_READY}
ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} hold(configuration)
Holds the audio/video call.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_NOT_READY}
ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} info(content, contentType, configuration)
Sends SIP INFO message.
session.info('Device orientation: portrait', 'doubango/device-orientation.xml');
Parameters:
{Object|String} content Optional
SIP INFO request content.
{String} contentType Optional
Content Type.
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_NOT_READY}
ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} mute(media, mute)
Mutes or unmutes a media.
Parameters:
{String} media
Media to mute. Must be audio, video.
{Boolean} mute
Whether to mute (true) or unmute (false) the media.
Since:
version 2.0.0
Throws:
{ERR_INVALID_ARGUMENT | ERR_NOT_SUPPORTED}
ERR_INVALID_ARGUMENT | ERR_NOT_SUPPORTED
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} rejectTransfer(configuration)
Rejects incoming transfer request.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_NOT_READY}
ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} resume(configuration)
Resumes the audio/video call.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_NOT_READY}
ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} startBfcpShare(configuration)
Starts sharing your entire desktop or an App using BFCP(rfc4582). Requires webrt4all plugin.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Since:
version 2.0.0
Throws:
{ERR_NOT_READY | ERR_NOT_SUPPORTED}
ERR_NOT_READY | ERR_NOT_SUPPORTED
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} stopBfcpShare(configuration)
Stops sharing your entire desktop or an App using BFCP(rfc4582). Requires webrt4all plugin.
Parameters:
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Since:
version 2.0.0
Throws:
{ERR_NOT_READY | ERR_NOT_SUPPORTED}
ERR_NOT_READY | ERR_NOT_SUPPORTED
Returns:
{Integer} 0 if successful; otherwise nonzero

{Integer} transfer(to, configuration)
Transfers the call to a new destination.
session.transfer('johndoe');
Parameters:
{String} to
Transfer destination name, uri, phone number or identifier (e.g. 'sip:johndoe@example.com' or 'johndoe' or '+33600000000').
{SIPml.Session.Configuration} configuration Optional
Configuration value.
Throws:
{ERR_INVALID_PARAMETER_VALUE | ERR_NOT_READY}
ERR_INVALID_PARAMETER_VALUE | ERR_NOT_READY
Returns:
{Integer} 0 if successful; otherwise nonzero

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 09 2015 11:59:45 GMT+0100 (CET)