Changes between Version 4 and Version 5 of FAQ


Ignore:
Timestamp:
Sep 25, 2007 1:58:23 PM (17 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v4 v5  
    99== General Questions == #general 
    1010 
    11 === Why is PJSIP licensed as GPL, and not (LGPL|MPL|BSD|choose your OSS license here)? === #non-gnu 
    12  
    13 Basically we agree with FSF on this issue. Quoting the [http://www.gnu.org/licenses/gpl-faq.html GPL FAQ]: 
    14  
    15 [http://www.gnu.org/licenses/gpl-faq.html#WhyUseGPL Why should I use the GNU GPL rather than other free software licenses?] 
    16  ''Using the GNU GPL will require that all the [http://www.gnu.org/philosophy/pragmatic.html released improved versions] be free software. This means you can avoid the risk of having to compete with a proprietary modified version of your own work.'' 
    17  
    18 We don't want people to take PJSIP, mess it up (erm, improve it), and keep the improvements as proprietary code. On the contrary, we want everybody to enjoy PJSIP and all its improvements, and the only way to make sure of this is by releasing PJSIP as GPL. 
    19  
    20  
    21 === What about the "viral" nature of the GPL? === #gpl-viral 
    22  
    23 People often think that using GPL-ed software means that other software linked with the GPL software have to be GPL too, hence GPL is considered as viral. '''That is not exactly true''', especially with PJSIP. When linking with PJSIP, only the application (that is based on PJSIP) has to be GPL-ed, since it is considered as derived work. Other libraries linked with PJSIP don't have to be GPL, because we specifically allow linking PJSIP with third party libraries, as long as they are listed in [/licensing.htm Third Party Software] that are allowed to be linked with PJSIP. 
    24  
    25  
    26 === Can I develop closed source products with PJSIP? === #proprietary 
    27  
    28 It depends. We use the standard GPL v2 or later for PJSIP, and GPL does allow using GPL-ed code for closed source development, '''as long as the resulting product is not redistributed''' (for example, it is only used for internal purpose). Please see [http://www.gnu.org/licenses/gpl-faq.html GPL FAQ] for more information about what can/can't be done with GPL software. 
    29  
    30 Alternatively, we can discuss alternative licensing for PJSIP, please contact support@pjsip.org for details. 
     11=== Where can I find the latest release of PJSIP? === #latest 
     12 
     13The latest PJSIP is always the SVN trunk version. Please find the information on how to retrieve PJSIP from SVN in the [/download.htm PJSIP Download] and [/using.htm Getting Started] page. 
     14 
     15=== If PJSIP is said to be small footprint, then why the source is so big? === #src-large 
     16 
     17It 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. 
     18 
     19=== I have downloaded PJSIP source codes, now what shall I do? === #do 
     20 
     21First you'll need to build the sources, by following the instructions in [/using.htm Getting Started] page. 
     22 
     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. 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.  
     24 
     25Next, I assume that you want to develop some sort of SIP applications, yes? 
     26 
     27Prepare 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 
     29Then 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 
     31Good luck! 
    3132 
    3233=== What SIP products are compatible with PJSIP? === #compatible 
     
    3940We have also heard people successfully done interoperability tests with commercial SIP servers or products, but we don't specificly maintain list of these products. Basically the principle stays the same, as long as they follow the standards, we are confident that PJSIP should be able to communicate with them. 
    4041 
    41 === Where can I find the latest release of PJSIP? === #latest 
    42  
    43 The latest PJSIP is always the SVN trunk version. Please find the information on how to retrieve PJSIP from SVN in the [/download.htm PJSIP Download] and [/using.htm Getting Started] page. 
    44  
    45 === If PJSIP is said to be small footprint, then why the source is so big? === #src-large 
    46  
    47 It 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. 
     42 
     43---- 
     44== Licensing Questions == #licensing 
     45 
     46=== Why is PJSIP licensed as GPL, and not (LGPL|MPL|BSD|choose your OSS license here)? === #non-gnu 
     47 
     48Basically we agree with FSF on this issue. Quoting the [http://www.gnu.org/licenses/gpl-faq.html GPL FAQ]: 
     49 
     50[http://www.gnu.org/licenses/gpl-faq.html#WhyUseGPL Why should I use the GNU GPL rather than other free software licenses?] 
     51 ''Using the GNU GPL will require that all the [http://www.gnu.org/philosophy/pragmatic.html released improved versions] be free software. This means you can avoid the risk of having to compete with a proprietary modified version of your own work.'' 
     52 
     53We don't want people to take PJSIP, mess it up (erm, improve it), and keep the improvements as proprietary code. On the contrary, we want everybody to enjoy PJSIP and all its improvements, and the only way to make sure of this is by releasing PJSIP as GPL. 
     54 
     55 
     56=== What about the "viral" nature of the GPL? === #gpl-viral 
     57 
     58People often think that using GPL-ed software means that other software linked with the GPL software have to be GPL too, hence GPL is considered as viral. '''That is not exactly true''', especially with PJSIP. When linking with PJSIP, only the application (that is based on PJSIP) has to be GPL-ed, since it is considered as derived work. Other libraries linked with PJSIP don't have to be GPL, because we specifically allow linking PJSIP with third party libraries, as long as they are listed in [/licensing.htm Third Party Software] that are allowed to be linked with PJSIP. 
     59 
     60 
     61=== Can I develop closed source products with PJSIP? === #proprietary 
     62 
     63It depends. We use the standard GPL v2 or later for PJSIP, and GPL does allow using GPL-ed code for closed source development, '''as long as the resulting product is not redistributed''' (for example, it is only used for internal purpose). Please see [http://www.gnu.org/licenses/gpl-faq.html GPL FAQ] for more information about what can/can't be done with GPL software. 
     64 
     65Alternatively, we can discuss alternative licensing for PJSIP, please contact support@pjsip.org for details. 
     66 
    4867 
    4968---- 
     
    450469---- 
    451470 
     471== NAT Questions == #nat-questions 
     472 
     473=== What NAT features does PJSIP support? === #nat-features 
     474 
     475Quite a few: 
     476 - On the SIP side, PJSIP supports Symmetric Response Routing ({{{rport}}}) and STUN. 
     477 - On the media side, application can choose the normal UDP media transport (with STUN support) or the ICE media transport. 
     478 - For the media, the [/pjmedia/docs/html/group__PJMED__STRM.htm media stream] will periodically transmit RTP packets during silence period, to keep NAT binding open. Also it will disable VAD for the first few hundred milliseconds after it is started, to ''hole-punch'' any NATs in between the endpoints. Please see [/pjmedia/docs/html/group__PJMEDIA__CONFIG.htm#g691ce80f0b4f2844cb9270af4665cdc8 PJMEDIA_CODEC_MAX_SILENCE_PERIOD] and [/pjmedia/docs/html/group__PJMEDIA__CONFIG.htm#gced8a0865fc8087f217067202b575f7f PJMEDIA_STREAM_VAD_SUSPEND_MSEC] settings on how to fine tune this behavior. 
     479 - With ICE media transport, the transport periodically sends STUN keep-alive requests to keep NAT binding open, throughout the life of the application. The transport will also update its mapped address should the binding has changed. Note that this feature is not available for UDP media transport. 
     480 
     481 
     482=== Which STUN-bis draft does PJNATH support? === #stunbis-std 
     483 
     484At the time of this writing, {{{draft-ietf-behave-rfc3489bis-10}}}. But since STUN-bis (rfc3489bis) is updated often, please look at [/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
     485 
     486=== Which ICE draft does PJNATH support? === #ice-std 
     487 
     488At the time of this writing, {{{draft-ietf-mmusic-ice-18}}}. But since ICE is updated often, please look at [/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
     489 
     490=== Which TURN draft does PJNATH support? === #ice-std 
     491 
     492At the time of this writing, {{{draft-ietf-behave-turn-03}}}. But since TURN is updated often, please look at [/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
     493 
     494=== What STUN-bis features does PJNATH support? === #stun-features 
     495 
     496Currently everything in RFC3489bis, including {{{MESSAGE-INTEGRITY}}} and {{{FINGERPRINT}}}. However PJNATH currently does not support STUN over TCP. 
     497 
     498=== Is there any simple STUN/TURN client which I can use to test my STUN/TURN implementation? === #simple-stun-client 
     499 
     500Yes. There is a simple STUN/TURN client implementation in {{{pjnath/src/pjstun-client}}} directory, which will be built by default by the {{{make}}} command. If you use Visual Studio, you can build this application from within {{{pjnath/build/pjnath.dsw}}} workspace. 
     501 
     502This is a simple command line program to perform as STUN or TURN client. It supports STUN, TURN, short-term or long term credential, as well as FINGERPRINT mechanism. 
     503 
     504=== Is there any simple STUN/TURN server in the samples? === #simple-stun-client 
     505 
     506Yes. There is a simple STUN/TURN '''server''' implementation in {{{pjnath/src/pjstun-srv-test}}} directory, which will be built by default by the {{{make}}} command. If you use Visual Studio, you can build this application from within {{{pjnath/build/pjnath.dsw}}} workspace. 
     507 
     508This is a simple command line program to perform as STUN or TURN server. It supports STUN, TURN, short-term or long term credential, as well as FINGERPRINT mechanism. 
     509 
     510 
     511---- 
     512 
    452513== Performance == 
    453514 
     
    458519 1. '''Codec'''. Use low complexity codec such as ''pcmu'' or ''pcma''. When using ''pcmu'' or ''pcma'', make sure pjmedia chooses the table based implementation, by setting {{{PJMEDIA_HAS_ALAW_ULAW_TABLE}}} macro to 1 (the default is normally enabled, but it may worth double-checking). 
    459520 1. '''Avoid resampling'''. Resampling is a CPU intensive process, thus it should be avoided if you can, by choosing uniform clock rate for all media components (sound device, conference bridge, codecs, WAV files, etc.). 
     521 1. '''Choose effective sampling rate'''. Make sure that PJSUA-LIB selects the most effective sampling rate/clock rate for your application. For example, if the application only supports narrowband codecs (G.711, GSM, iLBC, G.723, or G.729), then the best sampling rate to choose would be 8KHz. Choosing higher sampling rate will only just waste CPU power since with higher sampling rate, the more processing is needed. With ''pjsua'', sampling rate can be forced with {{{--clock-rate}}} option. In the application, this can be achieved by setting {{{pjsua_media_config.clock_rate}}} field. 
    460522 1. '''Logging'''. The default logging level is 5, which provides verbose information just in case some debugging is needed. When absolute performance is needed, you can decrease the logging verbosity level to 3 so that only vital information is displayed. This can be done by, either at compile time by setting {{{PJ_LOG_MAX_LEVEL}}} macro (in {{{config_site.h}}} as usual), or at run-time by calling {{{pj_log_set_level()}}}. 
    461523 1. '''Threads'''. Use the optimum number of SIP worker threads in the application. The optimum number would be equal to the number of processors (or processor cores) in the system. 
     
    475537 1. By default, PJSIP is configured to handle only 16384 simultaneous SIP transactions and dialogs. This should be enlargeed according to the requirement, by setting both {{{PJSIP_MAX_TSX_COUNT}}} and {{{PJSIP_MAX_DIALOG_COUNT}}} to the appropriate values (for example, 640*1024-1). 
    476538 1. If large number of TCP/TLS connections are needed, increase {{{PJ_IOQUEUE_MAX_HANDLES}}} to some large number (the default is only 64). 
     539 1. We've found that the simple GUID generator (used by GNU build system for *nix and MacOS X) will produce duplicate Id after approximately 2^14^ generations. This would cause things like transactions to have duplicated branch as previous transactions! On Linux, the {{{./configure}}} script will detect the presence of {{{libuuid}}} (part of [http://e2fsprogs.sourceforge.net/ e2fsprogs]) and use it if available, to avoid this problem. If you encounter this problem, please check if {{{libuuid}}} is available for {{{./configure}}} on your system. 
    477540 
    478541=== I try to use PJSUA-LIB to develop a server like application, but performance is poor === #pjsua-lib-perf 
     
    588651}}} 
    589652 
    590 '''Note:''' with default settings, pjsua will include PJNATH/ICE implementation as well as many media goodies, which you may not need in your embedded application. Hence the executable size is a bit large for ''pjsua''. 
    591  
    592 The heap usage with 2 connected calls using Speex wideband codec and AEC enabled (press '''dd''' in pjsua menu): 
     653'''Note:''' with default settings, pjsua will include PJNATH/ICE implementation as well as many media goodies (e.g. all codecs), statically linked with the application, which you may not need in your embedded application. Hence the executable size is a bit large for ''pjsua''. 
     654 
     655The heap usage with 2 connected calls using Speex wideband codec and AEC enabled (press '''dd''' in pjsua menu, and scroll up to the portion where it dumps the memory pool statistic): 
    593656 
    594657{{{ 
     
    610673 1. '''Disable stack checks'''. PJLIB is equipped with stack overflow detection. You can disable this feature by setting {{{PJ_OS_HAS_CHECK_STACK}}} to zero, to reduce executable size by approximately '''4 KB'''. 
    611674 1. '''Disable CRC32 table''', by setting {{{PJ_CRC32_HAS_TABLES=0}}}, to reduce executable size by about '''1 KB''', only if you use ICE. 
    612  1. '''Use your own sound device abstraction''', rather than !PortAudio. If you are porting PJSIP to an embedded platform, you may need to create your own sound device abstraction. So supposing we don't use !PortAudio and use the NULL sound device implementation ({{{PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND}}}, we will reduce executable size by approximately '''49 KB'''. 
    613  
    614 With all above optimizations set, we now have pjsua size (still with ICE/PJNATH and all media goodies '''included''' in the executable): 
     675 1. '''Use your own sound device abstraction''', rather than !PortAudio. If you are porting PJSIP to an embedded platform, you will need to create your own sound device abstraction. So supposing we don't use !PortAudio and use the NULL sound device implementation ({{{PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND}}}), we will reduce executable size by approximately '''49 KB'''. 
     676 
     677With all above optimizations set, we now have pjsua size (still with ICE/PJNATH and many media goodies like conference, WAV, etc. '''statically linked''' in the executable): 
    615678 
    616679{{{