Changes between Version 6 and Version 7 of Python_SIP/Basic_Concept


Ignore:
Timestamp:
Jul 24, 2008 3:44:27 PM (16 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python_SIP/Basic_Concept

    v6 v7  
    99 
    1010Take a look for example the [http://www.pjsip.org/python/pjsua.htm#Account-make_call make_call()] method of the [http://www.pjsip.org/python/pjsua.htm#Account Account] class. This function is used to initiate outgoing call to a destination. When this function returns successfully, it does not mean that the call has been established, but rather it means that the call has been '''initiated''' successfully. You will be given the report of the call progress and/or completion in the [http://www.pjsip.org/python/pjsua.htm#CallCallback-on_state on_state()] method of [http://www.pjsip.org/python/pjsua.htm#CallCallback CallCallback] class. 
     11 
     12 
     13== Relationship Between Objects and Handles == 
     14 
     15Since the pjsua Python module is based on [http://www.pjsip.org/pjsip/docs/html/group__PJSUA__LIB.htm PJSUA API], the bulk of the processing is done by PJSUA-LIB, including the management of accounts, calls, and buddies. The PJSUA-API exports these objects as handles, while the pjsua Python module just wraps these handles into classes. 
     16 
     17By convention, deleting the pjsua Python object will not delete the underlying handle. For example, calling these: 
     18 
     19 {{{ 
     20#!python 
     21   del acc 
     22   del call 
     23   del buddy 
     24 }}} 
     25 
     26will not destroy the underlying account, call, and buddy handles in PJSUA, so rather you should do these instead: 
     27 
     28 {{{ 
     29#!python 
     30   acc.delete() 
     31   del acc 
     32   call.hangup() 
     33   del call 
     34   buddy.delete 
     35   del buddy 
     36 }}} 
     37 
    1138 
    1239