Class Index | File Index

## Classes

- _global_
- SIPml
- SIPml.Event
- SIPml.EventTarget
- SIPml.Session
- SIPml.Session.Call
- SIPml.Session.Configuration
- SIPml.Session.Event
- SIPml.Session.Message
- SIPml.Session.Publish
- SIPml.Session.Registration
- SIPml.Session.Subscribe
- SIPml.Stack
- SIPml.Stack.Configuration
- SIPml.Stack.Event

# 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.
| rejectTransfer(configuration) Rejects incoming transfer request.
| resume(configuration) Resumes the audio/video call.
| 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} 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} 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 Sep 25 2013 03:40:14 GMT+0200 (CEST)