Changes between Initial Version and Version 1 of SIP-Media-NAT-Traversal-Features


Ignore:
Timestamp:
Jun 10, 2010 8:42:30 AM (14 years ago)
Author:
ismangil
Comment:

Initial port

Legend:

Unmodified
Added
Removed
Modified
  • SIP-Media-NAT-Traversal-Features

    v1 v1  
     1= SIP, Media, and NAT Traversal Features = 
     2 
     3General Features 
     4Open Source     Source is available for public scrutiny. 
     5High Performance        Thousands of calls can be processed per second on a typical Intel P4/2.4GHz desktop machine. More can be expected with proper server hardware and more or higher processor specs. 
     6Small Footprint, Very Scalable  Scale down to low profile/embedded/small footprint SIP devices, or scale up to servers with mutlple processors using the same SIP stack source tree. 
     7Portable         
     8 
     932bit, 64bit, big/little endian, any OS.  
     10Extensive Documentation         There can never be enough documentation, so we try to provide readers with hundreds of pages worth of documentations (some are generated from the source, some are handwritten documents). 
     11 
     12  
     13Target Platforms 
     14Processor       Operating Systems       Status 
     15alpha   Linux, gcc      Worked once 
     16armv4   Linux/uC-Linux, gcc     Works 
     17armv4   RTEMS, gcc      Supported, and reported to work 
     18armv4   Symbian, gcc    As of May 2007, all have been ported except sound device. 
     19armv4   Microsoft Windows Mobile family, Embedded Visual C++ 4 for targets such as Windows CE (WinCE), PocketPC, and SmartPhone. Microsoft Visual Studio 2005 has also been reported to work.   Works (WMME sound) 
     20armv5b  linux-2.6/XScale        Supported, and reported to work 
     21Blackfin        uC-Linux, gcc   underway 
     22i386    Linux, gcc      Works (OSS or ALSA sound) 
     23i386     
     24 
     25Windows 95 family (win95/win98/winME) 
     26 
     27WinNT family (WinNT/2000/XP/2003/Vista) 
     28 
     29Development tools: MSVC 6, VS.NET 2003, VC Express 2005 
     30 
     31Please see enabling Windows 95/98/ME support page about specific instructions on enabling Win95/Win98/ME support in the software. 
     32        Works (WMME or DirectSound sound backend) 
     33i386     
     34 
     35Mingw with gcc, via autoconf. 
     36 
     37Cygwin may compile with ./configure-legacy configuration. 
     38        Works (WMME sound backend) 
     39i386    BSD/FreeBSD 6.1         Compiles and seems to work (sound disabled with --disable-sound) 
     40i386    Linux kernel mode, gcc  Worked once. 
     41ia64/Itanium II         Debian 3.1/GNU Linux 2.6.8, gcc-3.3.5   Works (media/audio untested) 
     42ia64/Itanium II         BSD/FreeBSD 6.1, gcc-3.4.4, gmake       Compiles and seems to work (using null audio, media untested) 
     43mips    Linux/uC-Linux, gcc, big-endian/little-endian   Works 
     44powerpc         MacOS X 10.2 or later, gcc      Works (CoreAudio sound backend) 
     45powerpc         RTEMS, gcc      Supported, and reported to work 
     46powerpc         uC-Linux, gcc   Reported to work 
     47sparc   SunOS/Sparc, gcc        Worked once 
     48x86_64/AMD64    GNU Linux, gcc  Works (media/audio untested) 
     49Other   Other people have ported PJSIP to various platforms, including Nintendo DS, iPod Touch, and Texas Instruments DSP.        
     50 
     51Note: some PJMEDIA features may not be available or suitable for some platforms (for example, because of lacks of floating point support). 
     52 
     53  
     54Language Bindings 
     55C       All libraries are written in C. 
     56C++     There's C++ wrapper for PJLIB (pj++ library), but it's not maintained and probably will be removed in the future. 
     57Python  The Python binding for PJSUA-LIB has been implemented in 0.5.10 release. The documentation for Python is integrated in PJSUA-API Documentation. 
     58ActiveX          
     59 
     60This would open possibility to write SIP User Agents in Visual Basic (VB) or C# .NET. Once we had an experimental ActiveX component for pjsua-lib, but the development has been cancelled. Please see the projects page for open source project that wraps PJSIP as .NET component. 
     61 
     62(If you'd like to download the old code, get the revision 492 of pjproject trunk. The ActiveX source code is in pjsip-apps/src/activex-pjsua directory). 
     63 
     64  
     65Session Initiation Protocol (SIP) Features 
     66Core Session Initiation Protocol (SIP) Features (RFC 3261) 
     67Classification   
     68 
     69The core SIP stack (pjsip-core) complies with basic and intermedia feature classification according to SIPIT UA classification, with the following exception: 
     70 
     71    * redirections are handled by application code (not the stack). 
     72    * no HTTP basic authentication (deprecated). 
     73 
     74Most advanced features are supported by upper layer libraries (or adjunct libraries such as PJMEDIA) or by applications. 
     75SIP Methods      
     76 
     77The core SIP stack has framework to support INVITE, ACK, BYE, CANCEL, REGISTER, and OPTIONS. 
     78 
     79Upper layer libraries will define more methods to support specific SIP extension. See next section for details. 
     80 
     81In addition, application can define their own SIP methods during run-time without needing to recompile the stack (so probably this means support for INFO as well). 
     82SIP Headers      
     83 
     84The core stack correctly generates, parses, interprets, and handles the following headers: 
     85 
     86    * Authorization, Call-ID, Content-Length, CSeq, Contact, Content-Type, Expires, From, Max-Forwards, Proxy-Authenticate, Proxy-Authorization, Record-Route, Route, Retry-After, Supported, To, Via, and WWW-Authenticate. 
     87 
     88The following headers are recognized but not necessarily interpreted nor handled (the handling may be left to higher layer): 
     89 
     90    * Accept, Allow, Min-Expires, Proxy-Require, Require, Unsupported, Warning. 
     91 
     92The following headers are parsed according to generic header classes (for example, as generic integer, generic string, generic array of strings, etc.) and are not interpreted or handled by the core stack. Application can still generate or handle these headers: 
     93 
     94    * Accept-Encoding, Accept-Language, Alert-Info, Authentication-Info, Call-Info, Content-Disposition, Content-Encoding, Content-Language, Date, Error-Info, In-Reply-To, MIME-Version, Organization, Priority, Reply-To, Server, Subject, Timestamp, User-Agent. 
     95 
     96Upper layer libraries may define more headers to support specific SIP extension. See next section for details. 
     97 
     98In addition, application can create their own custom SIP headers when sending any requests/responses. 
     99Transports       
     100 
     101The core SIP stack provides transport layer and extensible transport management, with the following transports are provided: 
     102 
     103    * UDP 
     104    * TCP 
     105    * TLS 
     106 
     107Upper layer libraries or applications may extend PJSIP with their own custom transport without having to recompile the library. 
     108 
     109DNS SRV resolution is implemented in the library. 
     110Transactions     
     111 
     112The SIP core stack fully implement SIP transaction and SIP transaction finite state machine (FSM), which handles: 
     113 
     114    * matching requests/responses to the appropriate transactions, 
     115    * retransmissions for non-reliable transport, 
     116    * fail-over to secondary transport destination (according to rules in RFC 3261) when the transport layer fails to deliver a message to current destination. 
     117 
     118Dialog Core      
     119 
     120The SIP core stack (via the user agent layer) implements the core dialog management which will be used by upper layer functionality such as INVITE session and SIP event session (SUBSCRIBE/NOTIFY). 
     121 
     122The core dialog framework supports multiple sessions (or dialog usages) in a single dialog, and also handles forked responses. 
     123INVITE Session   
     124 
     125PJSIP provides high-level INVITE session management in pjsip-ua library, which: 
     126 
     127    * handles management of INVITE session state, 
     128    * handles SDP negotiation, 
     129    * utilizes the dialog core framework to enable multiple dialog usages in a single dialog, 
     130    * provides mechanism to plug-in SIP extensions related to INVITE session (such as PRACK, UPDATE, or session-timer). 
     131 
     132Authentication   
     133 
     134The SIP core stack provides reusable component for performing client authentication and managing client authentication session. 
     135 
     136  
     137SIP/SDP Features by RFCs 
     138 
     139The table below attemps to describe some SIP features/extensions that PJSIP supports. 
     140 
     141But even if the extension is not mentioned in the table, PJSIP should/may be able to support it since application can always insert/modify any SIP headers or generate any SIP methods at any stage, and have access to all message elements in incoming messages. 
     142 
     143In general, I only mention the SIP extension in the list when there's really something useful that PJSIP specificly do to support it (rather than just the ability to generate/parse some headers). 
     144 
     145  
     146RFC 2327 (obsoleted by RFC 4566)         
     147 
     148RFC 2327/4566: SDP: Session Description Protocol 
     149 
     150Most SDP features are supported by <pjmedia/sdp.h>. 
     151 
     152In addition, PJMEDIA also has helper object to automate SDP negotiation process. See RFC 3264 section below. 
     153RFC 2543        Although the core library was designed to support this older SIP specification, this was rarely tested because most SIP software are RFC 3261 compliant anyway. In general, it's not well supported/tested. 
     154RFC 2617         
     155 
     156RFC 2617: HTTP Authentication: Basic and Digest Access Authentication 
     157 
     158HTTP digest authentication is supported, and more over, PJSIP has implemented framework to manage client and server authentication session in <pjsip/sip_auth.h>. 
     159 
     160The client authentication can be used to authenticate against multiple challenges issued by multiple downstream proxies or servers, and supports multiple credentials for a single request. 
     161RFC 2976         
     162 
     163RFC 2976: The SIP INFO Method 
     164 
     165SIP does not define specific handling for INFO, so since PJSIP can generate/handle arbitrary SIP methods, support for INFO is implicitly there in PJSIP. Application can send/receive INFO inside or outside dialog context. 
     166RFC 3262         
     167 
     168RFC 3262: Reliability of Provisional Responses in Session Initiation Protocol (SIP) 
     169 
     170Reliable provisional support (100rel and PRACK) is supported since late September 2007 (see ticket 385 for the implementation notes). This support includes the management of offer/answer session related to the use of PRACK request. 
     171RFC 3263         
     172 
     173RFC 3263: Locating SIP Server 
     174 
     175PJSIP supports asynchronous DNS SRV and A record resolution as specified in RFC 3263 and RFC 2782. Please see these links for details: 
     176 
     177    * High Level SIP Resolver 
     178    * PJLIB-UTIL DNS Asynchronous/Caching Resolver Engine 
     179 
     180Currently PJSIP does not support DNS NAPTR records. 
     181 
     182RFC 3264 
     183 
     184RFC 4317 
     185         
     186 
     187RFC 3264: An Offer/Answer Model with Session Description Protocol (SDP) 
     188 
     189RFC 4317: Session Description Protocol (SDP) Offer/Answer Examples 
     190 
     191SDP offer/answer negotiation is performed automatically by the stack. This functionality is implemented by negotiator session API as declared by <pjmedia/sdp_neg.h>, and is embedded in SIP INVITE session management (pjsip-ua/sip_inv.h). 
     192 
     193With the negotiator helps, applications need not to worry about all those SDP negotiation quirks, and can just receive the final, negotiated SDP to create the media. Having said that, the negotiator is still flexible enough to be used to implement applications such as  Back to Back User Agents (B2BUA) or those Session Border Controllers (SBC). 
     194 
     195Several (mostly the tricky ones) offer/answer examples in the RFCs were copied into the negotiator compliance test program (pjmedia/src/test/sdp_neg_test.c). 
     196 
     197Links: 
     198 
     199    * SDP Negotiator State Machine 
     200    * High Level SIP INVITE Session containing the SDP negotiator 
     201 
     202RFC 3265         
     203 
     204RFC 3265: Session Initiation Protocol (SIP)-Specific Event Notification 
     205 
     206SIP event is fully supported, and PJSIP has generic event framework to manage event subscriptions (client or server side). See <pjsip-simple/evsub.h> for details. This framework is currently used by presence and call transfer module. 
     207 
     208The PJSIP event framework adds the following supports to PJSIP core: 
     209 
     210    * SUBSCRIBE and NOTIFY methods, 
     211    * Allow-Events, Event, and Subscription-State headers along with all relevant parameters are handled automatically by the framework. 
     212 
     213Please find detailed info on PJSIP Event Framework in PJSIP Developer's Guide PDF page. 
     214RFC 3266         
     215 
     216RFC 3266: Support for IPv6 in Session Description Protocol (SDP) 
     217 
     218PJSIP supports IPv6 in SDP 
     219RFC 3310 
     220RFC 4169         
     221 
     222RFC 3310: Hypertext Transfer Protocol (HTTP) Digest Authentication Using Authentication and Key Agreement (AKA) 
     223 
     224RFC 4169: Hypertext Transfer Protocol (HTTP) Digest Authentication Using Authentication and Key Agreement (AKA) Version-2 
     225 
     226Support for HTTP digest AKA version 1 and 2 (AKAv1-MD5 and AKAv2-MD5) for SIP authentication against 3GPP/IMS servers has been implemented in version 0.7.1. Please see PJSIP Digest AKAv1 and AKAv2 Authentication API for more information. 
     227RFC 3311         
     228 
     229RFC 3311: The Session Initiation Protocol (SIP) UPDATE Method 
     230 
     231PJSIP fully supports generation and handling of UPDATE request inside invite session, for both early and confirmed dialog (see ticket #5 for the implementation notes). This support includes the management of offer/answer session related to the use of UPDATE request. 
     232RFC 3420         
     233 
     234RFC 3420 - Internet Media Type message/sipfrag 
     235 
     236Support for message/sipfrag message payload is implemented in the call transfer module. 
     237RFC 3428         
     238 
     239RFC 3428 - Session Initiation Protocol (SIP) Extension for Instant Messaging 
     240 
     241Application can send/receive MESSAGE requests inside or outside dialog. The higher layer PJSUA-LIB provides high level API for sending MESSAGE (IM or typing indication) inside dialog or outside any dialogs. 
     242RFC 3489         
     243 
     244RFC 3489: STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs) 
     245 
     246PJLIB-UTIL has support to handle subset of STUN transactions, enough to implement a typical STUN client. The higher layer PJSUA-LIB provides easy to use API to create SIP or RTP/RTCP media transports with the addresses/ports resolved through STUN. 
     247 
     248Please find more info on STUN client library in PJLIB-UTIL STUN Client reference. 
     249RFC 3515         
     250 
     251RFC 3515: The Session Initiation Protocol (SIP) Refer Method 
     252 
     253PJSIP supports call transfer according to this specification and declares call transfer API in <pjsip-ua/xfer.h>. The PJSIP call transfer functionality uses PJSIP event framework to manage call status reporting via NOTIFY requests. 
     254 
     255The PJSIP call transfer module extends PJSIP core and PJSIP-SIMPLE by supporting the following SIP components: 
     256 
     257    * REFER method to establish event subscription, 
     258    * Refer-To header. 
     259    * "noresource" event subscription termination reason. 
     260 
     261RFC 3581         
     262 
     263RFC 3581: An Extension to the Session Initiation Protocol (SIP) for Symmetric Response Routing 
     264 
     265PJSIP always generates rport Via parameter for outgoing requests and correctly handles rport in incoming requests. This functionality is implemented in PJSIP transport layer (sip_transport.c). 
     266RFC 3605         
     267 
     268RFC 3605: Real Time Control Protocol (RTCP) attribute in Session Description Protocol (SDP) 
     269 
     270PJMEDIA by default generates RTCP attribute in outgoing SDP, and obeys the RTCP attribute in incoming SDP. 
     271RFC 3608         
     272 
     273RFC 3608: Session Initiation Protocol (SIP) Extension Header Field for Service Route Discovery During Registration 
     274 
     275Service-Route header processing is done at PJSUA-LIB level. Upon receiving successful REGISTER response, PJSUA-LIB will check the presence of Service-Route header and update the route set for the specified account. 
     276RFC 3856         
     277 
     278RFC 3856: A Presence Event Package for the Session Initiation Protocol (SIP) 
     279 
     280PJSIP SIMPLE library (pjsip-simple) supports this RFC by implementing presence management API, which is declared in <pjsip-simple/presence.h>. The presence API uses PJSIP generic event subscription management framework which is declared in <pjsip-simple/evsub.h>. 
     281 
     282The PJSIP presence implementation extends PJSIP by supporting the following SIP components: 
     283 
     284    * "application/pidf+xml" and "application/xpidf+xml" content type. 
     285    * "presence" event type in Allow-Events header. 
     286 
     287RFC 3863         
     288 
     289RFC 3863: Presence Information Data Format (PIDF) 
     290 
     291PJSIP SIMPLE library (pjsip-simple) implements API to generate and parse "application/pidf+xml" content type as defined by this RFC. The low-level parsing/generation API is declared in <pjsip-simple/pidf.h>, but application should use the high level presence management API as declared by <pjsip-simple/presence.h>. 
     292RFC 3891         
     293 
     294RFC 3891: The Session Initiation Protocol (SIP) "Replaces" Header 
     295 
     296PJSIP UA library (pjsip-ua) implements API to verify incoming INVITE request with Replaces header. Application can use this building block to implement features such as Attended Call Transfer, Call Pickup, etc. 
     297 
     298For more information, see Replaces Support in PJSIP reference documentation. 
     299RFC 3892         
     300 
     301RFC 3892 - The Session Initiation Protocol (SIP) Referred-By Mechanism 
     302 
     303PJSIP has limited support for Referred-By header field. The PJSUA-API by default emits Referred-By header when it sends outgoing REFER request, and copies the Referred-By header onto outgoing INVITE request initiated from the REFER request. 
     304 
     305The Referred-By header at the moment is treated and parsed as a generic string header. 
     306RFC 3903         
     307 
     308RFC 3903: Session Initiation Protocol (SIP) Extension for Event State Publication 
     309 
     310PJSIP SIMPLE library (pjsip-simple) has API to create, manage, and maintain generic event state publication. This API extends PJSIP by providing support for PUBLISH request. 
     311 
     312The API for managing client state event publication is declared in <pjsip-simple/publish.h>. 
     313 
     314In addition, PJSUA-LIB has a high level presence event publication, which hide the details of presence publication and presence subscription into a very high level API. 
     315RFC 3966         
     316 
     317RFC 3966: The tel URI for Telephone Numbers 
     318 
     319Tel URI parsing and generation is supported, and application may specify this in relevant SIP headers where appropriate. See <pjsip/sip_tel_uri.h> for details. 
     320RFC 3994         
     321 
     322RFC 3994: Indication of Message Composition for Instant Messaging 
     323 
     324PJSIP SIMPLE library (pjsip-simple) implements API to generate and parse "application/im-iscomposing+xml" content type as defined by this RFC. See <pjsip-simple/iscomposing.h> for details. 
     325 
     326In addition, the higher layer PJSUA-LIB provides high level and very easy to use API for sending typing indication inside dialog or outside any dialogs. 
     327RFC 4028         
     328 
     329RFC 4028: Session Timers in the Session Initiation Protocol (SIP) 
     330 
     331Support for SIP Session Timers was added in release 1.4. Application can configure Session Timer on per invite session basis with PJSIP API, or per account basis with PJSUA-LIB API. 
     332RFC 4320 
     333RFC 4321         
     334 
     335RFC 4320: Actions Addressing Identified Issues with the Session Initiation Protocol's (SIP) Non-INVITE Transaction 
     336 
     337RFC 4321: Problems Identified Associated with the Session Initiation Protocol's (SIP) Non-INVITE Transaction 
     338 
     339This has been considered in the design, and the stack never tries to be clever and send any responses (provisional or final) on its own. The only exception is 400 (Bad Request) and 481 (Call/Transaction Does Not Exist) responses, which the stack may send when it receives malfunction requests or when it cannot find matching transaction/dialog for incoming request. 
     340RFC 4480         
     341 
     342RPID: Rich Presence Extensions to the Presence Information Data Format (PIDF) 
     343 
     344PJSIP implements subset of RPID for specifying custom presence status text. 
     345RFC 4488         
     346 
     347RFC 4488: Suppression of Session Initiation Protocol (SIP) REFER Method Implicit Subscription 
     348 
     349Support for "norefersub" is implemented in PJSUA-LIB. Application may send REFER request with "Refer-Sub: false" header, and incoming REFER with "Refer-Sub: false" will be obeyed. The "norefersub" tag also is registered correctly in Supported header. 
     350RFC 5057         
     351 
     352RFC 5057: Multiple Dialog Usages in the Session Initiation Protocol 
     353 
     354The core PJSIP dialog (pjsip/sip_dialog.h) has been designed to support dialog usages, and indeed PJSIP can support multiple usages for single dialog. The PJSIP high layer INVITE session management <pjsip-ua/sip_inv.h> and PJSIP event subscription management <pjsip-simple/evsub.h> are implemented as dialog usages on top of dialog core, thus can reside in a single dialog if necessary. 
     355 
     356Please find detailed info on PJSIP dialog usage management in PJSIP Developer's Guide PDF page. 
     357xpidf    
     358 
     359draft-rosenberg-impp-pidf-00.txt: A Data Format for Presence Using XML 
     360 
     361PJSIP also supports the old (and deprecated) version of presence data format (known as "application/xpidf+xml") since this format is still used by some user agents. 
     362 
     363  
     364Planned Features 
     365 
     366Features that are planned (or not planned) to be supported in the future: 
     367 
     368Anything else   Not enough demands/encouragements, or they're just simply too difficult to implement. 
     369 
     370Any feedbacks/hints regarding what features are "hot" and should be prioritized would be greatly appreciated. 
     371 
     372  
     373Media Features 
     374Media Features 
     375Any Clock Rate, Any Channels     
     376 
     377PJMEDIA components work with any clock rate/sampling rate, where applicable (i.e. not limited to mere 8KHz narrowband quality). 
     378 
     379PJMEDIA supports stereo audio encoding (or even n-channels) all the way throughout the library, where applicable. 
     380Adaptive Jitter Buffer  An effective jitter buffer implementation with configurable prefetch settings, which can also be adapted to operate in fixed jitter mode. The jitter buffer provides sufficient status to trigger Packet Lost Concealment (PLC) invocation. 
     381Adaptive Silence Detector       Can utilize both VAD feature that provided by codec (such as Speex's encoder VAD) or PJMEDIA's own adaptive silence detection implementation for codecs that don't have silence detection (such as G.711, GSM, or iLBC). 
     382Codecs   
     383 
     384PJMEDIA supports: 
     385 
     386    * G.711 family codec (PCMA, PCMU), 
     387    * Speex/8000 (narrowband), Speex/16000 (wideband), and Speex/32000 (ultra-wideband) with fix bit rate and adjustable quality/complexity settings. Fixed mode implementation will be used for targets which lack floating point unit. 
     388    * iLBC in 20 or 30ms mode, with encoder mode is adjusted based on remote's SDP (decoder mode is adjustable during initialization only). 
     389    * GSM. 
     390    * G.722 
     391    * G.722.1 and G.722.1C licensed from Polycom 
     392    * More codecs provided by Intel IPP: G.723.1, G.726, G.728, G.729A, AMR, and AMR-WB 
     393    * More codecs provided by Nokia APS/VAS on Nokia handsets: AMR, G.729, iLBC, and PCMU/PCMA 
     394    * L16 family of codecs, mono or stereo (good for debugging). 
     395 
     396The list of codecs are not exhaustive as more codecs will be supported in the future. All codecs except G.711 are packaged in pjmedia-codec static library, and the build process should only link the specific codecs that application explicitly wants (to minimize footprint). 
     397 
     398The codec framework recognizes the following features in the codec, and allows application to override the settings on per call basis: 
     399 
     400    * Voice Activity Detector (VAD), 
     401    * Comfort Noise Generator (CNG), 
     402    * Perceptual Enhancement (PENH), 
     403    * Packet Lost Concealment (PLC). 
     404 
     405Applications also can register their own (probably proprietary) codecs into the framework during run-time. 
     406Conference Bridge        
     407 
     408PJMEDIA has powerful conference bridge implementation, with the following features: 
     409 
     410    * can efficiently/happily hold conference with more than a hundred participants on Intel P4 systems, with still loads of CPU to spare (note: only PCM codec is used during the test). 
     411    * supports participants with different clock rate 
     412    * supports participants with different frame size/ptime. 
     413    * supports stereo or even n-channels (note: channel settings must be uniform for all participants). 
     414 
     415DSP Friendly    Media flow is by default driven by the sound card (the behavior can be changed by application designer). From experience, this is the ideal design for DSP types of hardware, since media flow is ideally driven by data capture interrupt (which should be most time accurate). 
     416Echo Cancellation (AEC)         Front-end API/implementation for Speex Acoustic Echo Canceller (AEC) or simple but effective echo suppressor for targets with low processing capability (such as PDAs, smartphones, etc.). The backend algorithm is selectable during both compile-time and run-time. 
     417File Playback and Recording with WAV Files       
     418 
     419Playback and recording PCM samples from/to WAV files are supported, and samples will be correctly converted to host endianness. 
     420 
     421PJMEDIA also supports playback and recording to memory buffers, for devices without filesystems. 
     422File Playlist    
     423 
     424Playback of multiple WAV files in a playlist. 
     425Media Port Framework     
     426 
     427PJMEDIA provides extensibility by means of media ports, which is an adaptation of component based filter (as found for example in DirectShow SDK and GStreamer) to better suit telephony domain (although of course PJMEDIA is by no means limited to work only in telephony domain). The adaptation was mainly designed to better support integration of telephony cards into the framework. 
     428 
     429Application designers can create and arrange media ports interconnection to include specific PJMEDIA features needed to process the media flow. 
     430NAT Traversal (STUN and ICE)     
     431 
     432A NAT traversal functionality for the media, supporting STUN, TURN, and ICE, is provided by PJNATH - NAT Traversal Helper Library 
     433Packet Lost Concealment (PLC)    
     434 
     435PJMEDIA can utilize PLC that comes with the codec (e.g. Speex, iLBC) or its own PLC implementation for codecs that don't have built in PLC (such as G.711 or GSM). 
     436 
     437For targets that has low processing capability, a simple PLC based on frame replay algorithm can be selected. 
     438Resampling       
     439 
     440High quality resampling based from resample-1.8.tar.gz and adapted to handle frame based resampling. Quality can be tuned to processing performance availability. 
     441RFC 2833        PJMEDIA supports the generation and parsing of RFC 2833/telephone-events payload in both RTP and SDP. 
     442RTP     The RTP implementation is tiny in footprint (just a tad bit over 1KB), and is designed only to provide packetization and parsing only (because sometimes we don't want to transmit RTP with socket, but rather pass it to another processor (e.g. host processor). Again, DSP friendly. ;-) ). 
     443 
     444RTCP 
     445 
     446.. and Media Quality Analysis 
     447         
     448 
     449PJMEDIA not only generates and parses RTCP packets, but it provides good media analysis and statistics to both local application and remote peer (via RTCP), for the following stat: 
     450 
     451    * total packets and bytes, 
     452    * jitter (min/avg/max), 
     453    * lost/loss, reordered, duplicate packets, 
     454    * round-trip delay (min/avg/max). 
     455 
     456The media statistic has been tested extensively (including against commercial high profile testing hardware) and proven to be very accurate (as accurate as the operating system allows). 
     457Secure   
     458 
     459Secure RTP and RTCP (SRTP and SRTCP) is supported. Please see SRTP Support in PJSIP page for more info. 
     460Sound Device Abstraction         
     461 
     462Portable sound device abstraction with support for low-delay DirectSound audio on Win32, or PortAudio for other platforms (Unix, MacOS X, etc.). Support for OSS and ALSA is available via PortAudio for Linux target. 
     463 
     464The sound device abstraction is easy to implement and is suitable for DSP implementation (with interrupt driven style callback). 
     465Stream   
     466 
     467Stream abstraction for managing remote media communication. The stream integrates codec, jitter buffer, RFC 2833 events, and RTP/RTCP (de)framing and statistics into an integrated session, and can be created from SDP negotiation results. 
     468 
     469Stream does not directly manage UDP sockets, but instead it communicates to external endpoints via media transports. This would make the stream processing independent of the underlying transport. 
     470Tone Generator   
     471 
     472Inband tone generation, with some of the features: 
     473 
     474    * can generate single sinusoidal/sine wave or dual frequency tones, 
     475    * fixed point or floating point, 
     476    * can enqueue multiple tones/DTMF digits with single API call, 
     477    * configurable on/off duration and volume for each individual tones/DTMF digits, 
     478    * programmable digit-map, with default digit mapping set to DTMF frequencies. 
     479 
     480Transport for Media     Application may use their custom transport for transporting RTP/RTCP packets, or instead just use PJMEDIA's built-in transport. 
     481 
     482  
     483Media Features by RFCs 
     484 
     485Below are the RFCs support for media related features: 
     486 
     487RFC 2833         
     488 
     489RFC 2833: RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals 
     490 
     491PJMEDIA supports the generation and parsing of RFC 2833/telephone-events payload in both RTP and SDP. 
     492RFC 3550/3551 
     493(RFC 1889/1890)          
     494 
     495RFC 3550: A Transport Protocol for Real-Time Applications 
     496 
     497RFC 3551: RTP Profile for Audio and Video Conferences with Minimal Control 
     498 
     499PJMEDIA has a highly portable RTP/RTCP implementation which is decoupled from the network/socket operations, making it modular and ideal for supporting any transports. 
     500 
     501In addition, PJMEDIA utilizes RTCP to send and retrieve media quality feedback and can display detailed statistical report about stream quality, such as jitter, packet loss/reordered/late, RTT, etc., with the time calculated in sub-milisecond precision. 
     502RFC 3605         
     503 
     504RFC 3605: Real Time Control Protocol (RTCP) attribute in Session Description Protocol (SDP) 
     505 
     506PJMEDIA by default generates RTCP attribute in outgoing SDP, and obeys the RTCP attribute in incoming SDP. 
     507RFC 3611         
     508 
     509RFC 3611: RTP Control Protocol Extended Reports (RTCP XR) 
     510 
     511PJMEDIA implements several RTCP XR report blocks in RTCP XR module. 
     512RFC 3711         
     513 
     514RFC 3711: The Secure Real-time Transport Protocol (SRTP) 
     515 
     516PJMEDIA supports SRTP/SRTCP, please see SRTP Support in PJSIP page for more info. 
     517RFC 3951 
     518RFC 3952         
     519 
     520RFC 3951: Internet Low Bit Rate Codec (iLBC) 
     521 
     522RFC 3952: Real-time Transport Protocol (RTP) Payload Format for internet Low Bit Rate Codec (iLBC) Speech 
     523 
     524Support for iLBC codec is implemented in PJMEDIA-CODEC library. In particular, the implementation correctly performs the negotiation of mode parameter in the SDP. 
     525RFC 4568         
     526 
     527RFC 4568: Session Description Protocol (SDP) Security Descriptions for Media Streams 
     528 
     529PJMEDIA/PJSIP supports SDESC as means for exchanging SRTP keys, please see SRTP Support in PJSIP page for more info. 
     530draft-ietf-behave-rfc3489bis-15          
     531 
     532Session Traversal Utilities for NAT (STUN) 
     533 
     534A NAT traversal functionality for the media, supporting STUN, TURN, and ICE, is provided by PJNATH - NAT Traversal Helper Library 
     535draft-ietf-behave-turn-07        
     536 
     537Obtaining Relay Addresses from Simple Traversal Underneath NAT (STUN) 
     538 
     539A NAT traversal functionality for the media, supporting STUN, TURN, and ICE, is provided by PJNATH - NAT Traversal Helper Library 
     540draft-ietf-mmusic-ice-19.txt     
     541 
     542Interactive Connectivity Establishment (ICE): A Methodology for Network Address Translator (NAT) Traversal for Offer/Answer Protocols 
     543 
     544A NAT traversal functionality for the media, supporting STUN, TURN, and ICE, is provided by PJNATH - NAT Traversal Helper Library 
     545 
     546  
     547Other Features 
     548 
     549Other features: 
     550 
     551RFC 1035        RFC 1035: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. Asynchronous DNS resolver is implemented in PJLIB-UTIL. 
     552RFC 2782        RFC 2782:A DNS RR for specifying the location of services (DNS SRV).