Changes between Version 5 and Version 6 of Python_SIP/Basic_Concept


Ignore:
Timestamp:
Jul 24, 2008 2:45:03 PM (16 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python_SIP/Basic_Concept

    v5 v6  
    1 = PJSUA Python Module = 
     1= Python PJSUA Concepts = 
    22 
    33[[TracNav(Python_SIP/TOC)]] 
    44 
    5 == Developing Python SIP Application == #develop 
    65 
    7 === Concepts === #concepts 
    8  
    9 ==== Asynchronous Operations ==== 
     6== Asynchronous Operations == 
    107 
    118If you have developed applications with PJSIP, you'll know about this already. In PJSIP, all operations that involve sending and receiving SIP messages are asynchronous, meaning that the function that invokes the operation will complete immediately, and you will be given the completion status as callbacks.  
     
    1411 
    1512 
    16 ==== The Main Classes ==== 
     13== The Main Classes == 
    1714 
    1815The [http://www.pjsip.org/python/pjsua.htm PJSUA Python Module Reference Manual] shows quite many classes there, and it is probably not very easy to spot which are the important classes. But actually the concept is quite simple. Here are the main classes of the library.  
     
    3431 
    3532 
    36 ==== Basic Usage Pattern ==== 
     33== Basic Usage Pattern == 
    3734 
    3835With the methods of the main classes above, you will be able to invoke various operations to the object quite easily. But how can we get events/notifications from these classes? 
     
    4441More will be explained in later chapters. 
    4542 
    46 ==== Error Handling ==== 
     43== Error Handling == 
    4744 
    4845By convention, we use exceptions as means to report error, as this would make the program flows more naturally. Operations which yield error will raise [http://www.pjsip.org/python/pjsua.htm#Error pjsua.Error] exception. Here is a sample: 
     
    6360 
    6461 
    65 ==== Threading and Concurrency ==== 
     62== Threading and Concurrency == 
    6663 
    6764For platforms that require polling, the pjsua module provides it's own worker thread to poll pjsip, so it is not necessary to instantiate own your polling thread. Having said that the application should be prepared to have the callbacks called by different thread than the main thread.