Changes between Version 5 and Version 6 of pjsip-doc/account


Ignore:
Timestamp:
Feb 6, 2014 12:23:13 PM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pjsip-doc/account

    v5 v6  
    44Accounts 
    55========= 
    6 ​Accounts provide identity (or identities) of the user who is currently using the application. An account has one SIP Uniform Resource Identifier (URI) associated with it. In SIP terms, the identity is used as the From header in outgoing requests. 
     6​Accounts provide identity (or identities) of the user who is currently using the application. An account has one SIP Uniform Resource Identifier (URI) associated with it. In SIP terms, this URI acts as Address of Record (AOR) of the person and is used as the From header in outgoing requests. 
    77 
    8 Account may or may not have client registration associated with it. An account is also associated with route set and some authentication credentials, which are used when sending SIP request messages using the account. An account also has presence online status, which will be reported to remote peer when they subscribe to the account's presence, or which is published to a presence server if presence publication is enabled for the account. 
     8Account may or may not have client registration associated with it. An account is also associated with route set and some authentication credentials, which are used when sending SIP request messages using the account. An account also has presence status, which will be reported to remote peer when they subscribe to the account's presence, or which is published to a presence server if presence publication is enabled for the account. 
    99 
    1010At least one account MUST be created in the application, since any outgoing requests require an account context. If no user association is required, application can create a userless account by calling Account.create(). A userless account identifies local endpoint instead of a particular user, and it corresponds to a particular transport ID. 
    1111 
    12 Also one account must be set as the default account, which will be used as the account identity when pjsua fails to match the request with any accounts using the stricter matching rules. 
     12Also one account must be set as the default account, which will be used as the account identity when pjsua fails to match incoming request with any accounts using the stricter matching rules. 
    1313 
    1414Subclassing the Account class 
    1515--------------------------------- 
    16 To use the Account class, normally application SHOULD create its own subclass, such as:: 
     16To use the Account class, normally application SHOULD create its own subclass, in order to receive notifications for the account. For example: 
     17 
     18.. code-block:: c++ 
    1719 
    1820    class MyAccount : public Account 
     
    3234        { 
    3335            Call *call = new MyCall(*this, iprm.callId); 
    34             // Delete the call, which will also hangup the call 
     36 
     37            // Just hangup for now 
     38            CallOpParam op; 
     39            op.statusCode = PJSIP_SC_DECLINE; 
     40            call->hangup(op); 
     41             
     42            // And delete the call 
    3543            delete call; 
    3644        } 
     
    5664A userless account identifies a particular SIP endpoint rather than a particular user. Some other SIP softphones may call this peer-to-peer mode, which means that we are calling another computer via its address rather than calling a particular user ID. 
    5765 
    58 So for example, we might identify ourselves as "sip:192.168.0.15" (a userless account) rather than, say, "sip:bennylp@pjsip.org". 
     66So for example, we might identify ourselves as "sip:192.168.0.15" (a userless account) rather than, say, "sip:alice@pjsip.org". 
    5967 
    6068In pjsua, a userless account corresponds to a particular transport. Creating userless account is very simple, all we need is the transport ID which is returned by ​Endpoint.transportCreate() method as explained in previous chapter.