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.Message

Defined in: SIPml.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| SIPml.Session.Message(session, configuration) SIP MESSAGE (SMS) session class.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| send(to, content, contentType, configuration) Sends a SIP MESSAGE (SMS-like) request.

Class Detail
SIPml.Session.Message(session, configuration)
SIP MESSAGE (SMS) session class. You should never create an instance of this class by yourself. Please use stack.newSession() function to create a messaging/IM session.

    var session = stack.newSession('message');

Parameters:
{tsip_session} session
  Private session object.
{SIPml.Session.Configuration} configuration Optional
  Configuration value.

Method Detail
{Integer} send(to, content, contentType, configuration)
Sends a SIP MESSAGE (SMS-like) request.

    var session = stack.newSession('message');
    session.send('johndoe', 'Pêche à la moule', 'text/plain;charset=utf8',{
        sip_caps: [
                                        { name: '+g.oma.sip-im' },
                                        { name: '+sip.ice' },
                                        { name: 'language', value: '\"en,fr\"' }
                                ],
        sip_headers: [
                                { name: 'What', value: 'Sending SMS' },
                                { name: 'My-Organization', value: 'Doubango Telecom' }
                        ]
    });

Parameters:
{String} to
  Destination name, uri, phone number or identifier (e.g. 'sip:johndoe@example.com' or 'johndoe' or '+33600000000').
{Object|String} content Optional
  The message content.
{String} contentType Optional
  The content type.
{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)