Changes between Version 3 and Version 4 of Python_SIP/Settings


Ignore:
Timestamp:
Jul 24, 2008 2:55:39 PM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python_SIP/Settings

    v3 v4  
    2525 }}} 
    2626 
    27 Once the library is instantiated, you can retrieve the Lib instance using Lib.instance() static method. 
     27Once the library is instantiated, you can retrieve the Lib instance using [http://www.pjsip.org/python/pjsua.htm#Lib-instance Lib.instance()] static method. 
    2828 
    2929 
    3030=== Initialize the Library === 
    3131 
    32 Initialize the library by calling its {{{init()}}} method: 
     32Initialize the library by calling its [http://www.pjsip.org/python/pjsua.htm#Lib-init init()] method: 
    3333 
    3434 {{{ 
     
    4242The snippet above initializes the library with the default settings. The {{{init()}}} method will raise exception if error occurs, so we need to trap the exception using try/except clause as above. 
    4343 
    44 The {{{init()}}} method takes three optional arguments to specify various core settings: 
     44The [http://www.pjsip.org/python/pjsua.htm#Lib-init init()] method takes three optional arguments to specify various core settings: 
    4545 - [http://www.pjsip.org/python/pjsua.htm#UAConfig UAConfig], to specify core SIP user agent settings 
    4646 - [http://www.pjsip.org/python/pjsua.htm#MediaConfig MediaConfig], to specify various media settings, including ICE and TURN. 
    4747 - [http://www.pjsip.org/python/pjsua.htm#LogConfig LogConfig], to customize logging settings. 
    4848 
    49 To customize the settings, you would do something like this: 
     49To customize the settings, create instance of the above configuration class(es) and specify them to {{{init()}}}, for example: 
    5050 
    5151 {{{ 
     
    7878 }}} 
    7979 
    80 The {{{create_transport()}}} method returns the newly created [http://www.pjsip.org/python/pjsua.htm#Transport Transport] instance and it takes an optional [http://www.pjsip.org/python/pjsua.htm#TransportConfig TransportConfig] object to customize the transport settings like bound address and listening port number. Without this, by default the transport will be bound to "0.0.0.0" and any available port. 
     80The {{{create_transport()}}} method returns the newly created [http://www.pjsip.org/python/pjsua.htm#Transport Transport] instance and it takes an optional [http://www.pjsip.org/python/pjsua.htm#TransportConfig TransportConfig] object to customize the transport settings like bound address and listening port number. Without this, by default the transport will be bound to INADDR_ANY and any available port. 
    8181 
    82 There is no real use of the [http://www.pjsip.org/python/pjsua.htm#Transport Transport] instance, except to create ''account-less'' account (with {{{lib.create_account_for_transport()}}}, as will be explained in later chapter), and perhaps to display list of transport infos to user if the application wants it. 
     82There is no real use of the [http://www.pjsip.org/python/pjsua.htm#Transport Transport] instance, except to create ''userless'' account (with [http://www.pjsip.org/python/pjsua.htm#Lib-create_account_for_transport lib.create_account_for_transport()], as will be explained in later chapter), and perhaps to display the list of transports to user if the application wants it. 
    8383 
    8484 
    8585=== Starting the Library === 
    8686 
    87 Now we're ready to start the library. We need to start the library to finalize the initialization phase, e.g. to complete the initial STUN address resolution, initialize/start the sound device, etc. To start the library: 
     87Now we're ready to start the library. We need to start the library to finalize the initialization phase, e.g. to complete the initial STUN address resolution, initialize/start the sound device, etc. To start the library, call [http://www.pjsip.org/python/pjsua.htm#Lib-start lib.start()] method: 
    8888 
    8989 {{{ 
     
    9898== Shutting Down the Library == 
    9999 
    100 Once the application exits, the library needs to be shutdown so that resources can be released back to the operating system. This is done like this: 
     100Once the application exits, the library needs to be shutdown so that resources can be released back to the operating system. This is done by calling [http://www.pjsip.org/python/pjsua.htm#Lib-destroy lib.destroy()]: 
    101101 
    102102 {{{