Changes between Version 5 and Version 6 of FAQ


Ignore:
Timestamp:
Sep 25, 2007 4:37:45 PM (17 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v5 v6  
    1717It is common in all projects to have source distribution that is larger than the resulting build. This is because source distribution contains other things such as documentations and scripts. The source tarball of PJSIP v0.7 is significantly larger than v0.5 because in v0.7 we include third party libraries in their original form of distribution, so that they get proper attribution and for easier update, unlike in v.0.5 where we just picked the source files that we like and included them in PJSIP. 
    1818 
    19 === I have downloaded PJSIP source codes, now what shall I do? === #do 
     19=== I have downloaded PJSIP source codes, now what next? === #do 
    2020 
    2121First you'll need to build the sources, by following the instructions in [/using.htm Getting Started] page. 
    2222 
    23 Then you can get yourself familiar with PJSIP features by running [/pjsua.htm pjsua] application. ''pjsua'' is the reference implementation of PJSIP and PJSUA-LIB, although it doesn't have all the PJSIP features, it contains most of them. Please find ''pjsua'' documentation in [/pjsua.htm pjsua Manual] page. It is also good to get familiar with ''pjsua'' since if you'll ever get any problems with PJSIP, most likely we will ask to reproduce it with ''pjsua'', to determine whether the problem is PJSIP problem or the problem with the implementation.  
     23Then you can get yourself familiar with PJSIP features by running [/pjsua.htm pjsua] application. ''pjsua'' is the reference implementation of PJSIP and PJSUA-LIB. Although it doesn't have all the PJSIP features, it contains most of them, so it's quite useful. Please find ''pjsua'' documentation in [/pjsua.htm pjsua Manual] page. It is also good to get familiar with ''pjsua'' since if you'll ever get any problems with PJSIP, most likely we will ask to reproduce it with ''pjsua'', to determine whether the problem is PJSIP problem or the problem with the implementation. So please try this out. You may even be able to impress your mates by doing SIP calls, conference, IM, and presence from a command line application! 
    2424 
    2525Next, I assume that you want to develop some sort of SIP applications, yes? 
    2626 
    27 Prepare your project, by following the instructions in [/using.htm#using Getting Started | Using PJSIP for Applications] documentation. The details would depend on what platform you're working on. 
    28  
    29 Then you'll fill up the application features, by following the [/docs.htm Documentation] or by looking at [/pjsip/docs/html/page_pjsip_samples.htm PJSIP samples] or [/pjmedia/docs/html/page_pjmedia_samples.htm PJMEDIA samples]. 
    30  
    31 Good luck! 
     27At this point, you'll need to decide which API abstractions to use. If building client applications, [/pjsip/docs/html/group__PJSUA__LIB.htm PJSUA-LIB API] may be the better option to use, since this library has easy to use but yet powerful API. On the other hand, since it's a high level API, it may not provide all the flexibilities that are required by the application. Nor the [#pjsua-lib-perf performance], perhaps. Or it may just contain too many features! In this case, perhaps using [/pjsip/docs/html/index.htm PJSIP] and [/pjmedia/docs/html/index.htm PJMEDIA] directly would be a better option. They will be "slightly" more difficult to use, but they will provide the utmost flexibility, performance, and size. 
     28 
     29Then prepare the application project, by following the instructions in [/using.htm#using Getting Started | Using PJSIP for Applications] documentation. The details would depend on what platform you're working on. 
     30 
     31Then fill up the application features, by following the [/docs.htm Documentation] or by looking at [/pjsip/docs/html/page_pjsip_samples.htm PJSIP samples] or [/pjmedia/docs/html/page_pjmedia_samples.htm PJMEDIA samples]. In case you're using PJSIP and PJMEDIA directly, you can have a look at PJSUA-LIB source code for reference. 
     32 
     33If you'll ever get into any troubles, we're ready to help in [http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org PJSIP mailing list]. So good luck then! 
    3234 
    3335=== What SIP products are compatible with PJSIP? === #compatible 
     
    6466 
    6567Alternatively, we can discuss alternative licensing for PJSIP, please contact support@pjsip.org for details. 
     68 
     69 
     70=== What are the licensing requirements of the third party libraries used by PJSIP? === #third-party 
     71 
     72Apart from the licensing requirements of PJSIP, please be aware that some third party libraries used by PJSIP put additional requirements to the end product (that is, the application using PJSIP). In particular, libraries such as these require some attribution to be put in the end product and/or the accompanying documentation: 
     73 - [http://www.openh323.org/ VAD by OpenH323 project] (MPL license) 
     74 - [http://www.portaudio.com/ PortAudio] (BSD-ish license) 
     75 - [http://kbs.cs.tu-berlin.de/~jutta/toast.html GSM] codec (BSD-ish license) 
     76 - [http://localhost/licensing.htm Speex] codec (BSD-ish license) 
     77 
     78(the list above are not exhaustive, please see [/licensing.htm PJSIP Licensing page] for the complete list). 
     79 
     80In addition, the use of iLBC is governed by [http://www.ilbcfreeware.org/documentation/gips_iLBClicense.pdf iLBC license]. Please contact [http://www.ilbcfreeware.org/ GIPS] for details! 
    6681 
    6782 
     
    175190 
    176191  pjsua_call_get_info(call_id, &ci); 
    177   pjsua_conf_connect(ci.conf_slot, cd->toneslot); 
     192  pjsua_conf_connect(cd->toneslot, ci.conf_slot); 
    178193 
    179194  pjsua_call_set_user_data(call_id, (void*) cd); 
     
    301316 
    302317 
    303 === Does PJSIP support G.723 or G.729 codec? === #g729-g723 
     318=== Does PJSIP support G.723 or G.729 codecs? === #g729-g723 
    304319 
    305320Yes and no.  
    306321 
    307 No, because there is no ready to use G.723/G.729 codec implementation in PJMEDIA. We specifically don't include G.723/G.729 support in our code because G.723/G.729 are both patented and royalty based codecs, so we are quite nervous with the possibility that some lawyers may contact us should we include them in PJMEDIA. So our decision is to include only free and open source codec in PJMEDIA. 
    308  
    309 But yes, because we can always add more codecs in PJMEDIA. Please see [#adding-codec Adding a new codec] question below for more info. 
    310  
    311 === How to add new codec to PJMEDIA? === #adding-codec 
    312  
    313 First of all, read the [/pjmedia/docs/html/group__PJMEDIA__CODEC.htm Codec Framework] documentation. Then, the easiest is to take other codec source file in {{{pjmedia-codec}}} directory (such as [/trac/browser/pjproject/trunk/pjmedia/src/pjmedia-codec/gsm.c gsm.c]), and replace GSM specific function calls with the functions that are provided by your codec library. 
    314  
    315 Once it's finished, you should end up with just two public APIs exported by the codec: the initialization function, and the deinitialization function. 
    316  
    317 Then register your codec to PJMEDIA in the application by calling the codec initialization function. After this, the codec should be picked up automagically by the rest of PJMEDIA framework (that is, PJSIP should advertise the codec in outgoing SDP and negotiate it with remote's SDP). 
     322No, because there is no ready to use G.723/G.729 codec implementation in PJMEDIA. We specifically don't include G.723/G.729 support in our code because G.723/G.729 are both patented and royalty based codecs, so we are quite nervous with the possibility that some lawyers may contact us should we include them in PJMEDIA. So our decision is to include only free and open source codecs in PJMEDIA (such as G.711, GSM, and Speex). 
     323 
     324But yes, because you can always add more codecs in PJMEDIA. Please see [#adding-codec Adding a new codec] question below for more info. 
     325 
     326=== How can I add new codec to PJMEDIA? === #adding-codec 
     327 
     328First of all, read the [/pjmedia/docs/html/group__PJMEDIA__CODEC.htm Codec Framework] documentation. Then, the easiest is to take other codec source file in {{{pjmedia-codec}}} directory, such as [/trac/browser/pjproject/trunk/pjmedia/src/pjmedia-codec/gsm.c gsm.c], and replace GSM specific function calls with the functions that are provided by your codec library. 
     329 
     330There are two "classes" to implement: 
     331 - The codec factory ([/pjmedia/docs/html/structpjmedia__codec__factory.htm pjmedia_codec_factory]) - Codec factory will be queried by PJMEDIA to see if it can instantiate a codec instance based on a codec descriptor ([/pjmedia/docs/html/structpjmedia__codec__info.htm pjmedia_codec_info]). Codec factory also provides information about what particular codecs it supports, so that PJMEDIA can list these codecs in the local SDP capability descriptor. 
     332 - The codec itself ([/pjmedia/docs/html/structpjmedia__codec.htm pjmedia_codec]) - The codec instance provides functions to parse, encode and decode audio frames. Optionally it may provide a function to recover lost frames (known as ''Packet Lost Concealment'' feature, or PLC). 
     333 
     334Once it's finished, you should end up with just two public APIs exported by the implementation: an initialization function, and a deinitialization function. The initialization function's primary task is to register the codec factory to PJMEDIA's codec manager, so that PJMEDIA knows about this new codec. While the deinitialization function is to unregister the codec factory, and to release resources, if any. 
     335 
     336Then call the codec initialization function in the application. After this, the codec should be picked up automagically by the rest of PJMEDIA framework (that is, PJSIP should advertise the codec in outgoing SDP and negotiate it with remote's SDP, and encode/decode audio frames with the codec, if the codec is selected for the session). 
    318337 
    319338