Milestone release-0.9.0

Completed 16 years ago (Jun 28, 2008 10:36:49 PM)


Total number of tickets: 116 - closed: 116 - active: 0


5 / 5


7 / 7


14 / 14


3 / 3


53 / 53


3 / 3


19 / 19


12 / 12

Release 0.9

New Features and Enhancements

Many new features have been implemented on this release.

Audio quality improvements

This release contains many improvements to stability, latency, and in general quality of audio:

  • Implementation of Waveform Similarity Based Overlap-Add (WSOLA) algorithm (ticket #497) which provides the base algorithm for buffer expansion/compression and packet loss concealment.
  • Ticket #438 fixed many problems related to audio impairments:
    • fixed the click noise produced by splitcomb or conference bridge upon underflow/overflow situation (which normally happens when there is drift in audio device)
    • much better buffering in splitcomb and conference bridge, with the ability to learn the optimal buffer length and shrinking/extending the buffer as necessary without degrading audio quality too much.
  • New conference mixing algorithm which does not weaken the signal unlike to old algorithm (ticket #449)
  • New packet loss concealment for G.711 and GSM codec (ticket #502)
  • Boost the priority of master port/splitcomb to avoid audio disruption because of CPU usage (ticket #501)
  • Optimize the delay in the jitter buffer (ticket #505)
  • Much better stereo support all the way, including support for mixing ports with different channel number in the conference bridge (ticket #504)

Secure RTP (SRTP)

SRTP have been implemented and it is available for all platforms including Symbian and Windows Mobile. The implementation uses libsrtp, and SDES is used for the key exchange.

G.722 codec

The G.722 codec is now included in the standard source distribution and it is available for all platforms.

TURN Relay support

TURN has been implemented. The implementation is based on draft-ietf-behave-turn-07 draft and with the default settings should be compatible with the newly released draft-ietf-behave-turn-08 draft.

In addition to integration with ICE all the way up to PJSUA-LIB and pjsua sample application, simple command line TURN client and server implementation samples are provided.

ICE enhancements

The SDP offer/answer procedures related to ICE have been enhanced and should now comply to the latest draft-ietf-mmusic-ice-19 draft.

IPv6 Support

Support for IPv6 has been added in PJLIB, PJSIP, and PJMEDIA libraries. However some features are still missing, such as asynchronous DNS AAAA resolution and IPv6 support in pjsua sample application.

RTCP XR support

Support for subset of RTCP XR (RFC 3611) has been implemented (see ticket #513)

Improved Windows Mobile sample application

A new and more usable sample application !PocketPJ has been provided for !PocketPC/Windows Mobile based platforms.

Improved Symbian support

Carbide C++ is now supported, and a tutorial on developing PJSIP application with Carbide C++ is provided. More codecs have been ported to Symbian, including GSM and Speex.

ActiveSocket Framework

The new ActiveSocket framework in PJLIB provides higher and easier to use abstraction to create asynchronous sockets, utilizing PJLIB's ioqueue.

More Thorough Tests

Last but not least, in addition to existing tests for each library, 100+ automated test scripts have been added to test PJSUA-LIB to test functionality, conformance, and quality of various parts of the library.

API Changes and (In)Compatibility Info


Config (config.h):
  • New settings:
    • PJ_HAS_IPV6 (default 0)
Math and statistic functions (math.h):
  • New file
Socket (sock.h):
  • The struct pj_in6_addr has been changed to union pj_in6_addr.
  • Member names changes in struct pj_sockaddr_in6.
  • New functions:
    • pj_sockaddr_init()
    • pj_inet_pton()
    • pj_inet_ntop()
    • pj_inet_ntop2()
    • pj_sockaddr_print()
    • pj_sockaddr_cmp()
    • pj_sockaddr_get_addr()
    • pj_sockaddr_has_addr()
    • pj_sockaddr_get_addr_len()
    • pj_sockaddr_get_len()
    • pj_sockaddr_copy_addr()
    • pj_sockaddr_cp()
    • pj_sockaddr_set_str_addr()
    • and pj_sockaddr_get_port()
  • New constants:
ActiveSocket (activesock.h.h):
  • New file
Address resolution (addr_resolv.h):
  • pj_gethostip() now takes additional address family parameter
  • New functions:
    • pj_getdefaultipinterface()
    • pj_getaddrinfo()
String (string.h):
  • New functions:
    • pj_strstr()
    • pj_stristr()
Thread (os.h):
  • New functions:
    • pj_thread_get_prio()
    • pj_thread_set_prio()
    • pj_thread_get_prio_min()
    • pj_thread_get_prio_max()
    • pj_thread_get_os_handle()
IP Helper (ip_helper.h):
  • The pj_enum_ip_interface() now takes additional address family parameter
IOqueue (ioqueue.h):
  • New functions:
    • pj_ioqueue_set_default_concurrency()
    • pj_ioqueue_set_concurrency()
    • pj_ioqueue_lock_key()
    • pj_ioqueue_unlock_key()


DNS Server (dns_server.h):
  • New file
PCAP File Format Support (pcap.h):
  • New file
DNS (dns.h):
  • New helper functions:
    • pj_dns_init_srv_rr()
    • pj_dns_init_cname_rr()
    • pj_dns_init_a_rr()


Transport Independent TURN Session (turn_session.h):
  • New file
TURN Client Socket/Transport (turn_sock.h):
  • New file
STUN Client Socket/Transport (stun_sock.h):
  • New file
ICE Stream Transport (ice_strans.h):
  • Initialization sequence has changed. Now all required parameters (STUN and TURN settings) are wrapped in struct pj_ice_strans_cfg and passed to pj_ice_strans_create(). The pj_ice_strans_set_stun_domain() and pj_ice_strans_set_stun_srv() functions have been removed.
  • The struct pj_ice_strans is no longer visible in the API, and various accessor functions have been added
STUN Authentication (stun_auth.h):
  • API change
Transport Independent STUN Session (stun_session.h):
  • Changes to all API's
STUN Messaging (stun_msg.h):
  • Addition and removal of STUN methods and attributes to support latest STUN, TURN, and ICE drafts.
  • Minor changes to parameter types in pj_stun_msg_encode()
  • Minor changes to parameter types in pj_stun_msg_check()
  • Minor changes to parameter types in pj_stun_msg_decode()
  • New functions:
    • pj_stun_msg_init()
    • pj_stun_msg_clone()
    • pj_stun_attr_clone()
    • pj_stun_sockaddr_attr_init()
    • pj_stun_string_attr_init()
    • pj_stun_binary_attr_init()
Transport Independent ICE Session (ice_sess.h):
  • The addition of transport_id parameter in:
    • pj_ice_sess_add_cand()
    • pj_ice_sess_on_rx_pkt()
    • on_tx_pkt() callback
    • on_rx_data() callback
Configuration (config.h):
  • New settings:
  • New settings to control pool size:


Configurations (config.h):
  • The value of PJMEDIA_CODEC_MAX_SILENCE_PERIOD has been changed from timestamps to milliseconds.
  • Deprecated settings:
  • New settings:
Mono-Stereo-Multichannel Frame Converter (stereo.h):
  • New file
RTCP XR/Extended Report (rtcp_xr.h):
  • New file
Waveform Similarity Overlap-Add (wsola.h):
  • New file
Adaptive Delay Buffer (delaybuf.h):
  • New file
Clock Generator (clock.h):
  • Added channel_count parameter to pjmedia_clock_create()
Media Transport (transport.h):
  • The media transport API has been changed. New functions to interact with SDP have been added.
  • The pjmedia_transport_get_info() parameter has changed.
  • New functions:
    • pjmedia_transport_send_rtcp2()
    • pjmedia_transport_media_create()
    • pjmedia_transport_encode_sdp()
    • pjmedia_transport_media_start()
    • pjmedia_transport_media_stop()
    • pjmedia_transport_simulate_lost()
UDP Transport (transport_udp.h):
  • Added pjmedia_transport_udp_create3() to specify address family when creating the media transport. This is to support IPv6.
  • Removed these functions as they are now part of media transport API:
    • pjmedia_transport_udp_simulate_lost()
    • pjmedia_transport_udp_close()
    • pjmedia_transport_udp_get_info()
  • Removed pjmedia_transport_udp_info structure as it's now part of pjmedia_transport_info.
Secure RTP (SRTP) Transport (transport_srtp.h):
  • New file
ICE Media Transport (transport_ice.h):
  • Major modifications
  • The pjmedia_ice_create() function has changed.
  • The on_ice_complete() callback has changed.
  • The following functions have been removed since they are now part of the transport API:
    • pjmedia_ice_destroy()
    • pjmedia_ice_start_init()
    • pjmedia_ice_get_init_status()
    • pjmedia_ice_get_comp()
    • pjmedia_ice_init_ice()
    • pjmedia_ice_modify_sdp()
    • pjmedia_ice_start_ice()
    • pjmedia_ice_stop_ice()
    • pjmedia_ice_simulate_lost()
Codec (codec.h):
  • Added max_bps member in to support VBR.
Ports (port.h):
  • Added bit_info member in struct pjmedia_frame to support representing audio frame that is not bit-aligned to byte boundary.
SDP (sdp.h):
  • New functions:
    • pjmedia_sdp_attr_create_rtcp()
    • pjmedia_sdp_transport_cmp()
    • pjmedia_sdp_media_deactivate()
Adaptive Jitter Buffer (jbuf.h):
  • New functions:
    • pjmedia_jbuf_put_frame2()
    • pjmedia_jbuf_get_frame2()
  • Added more members in struct pjmedia_jb_state:
    • avg_delay
    • min_delay
    • max_delay
    • dev_delay
Sound device abstraction (sound.h):
  • New function:
    • pjmedia_snd_set_latency()
Stream (stream.h):
  • Changes in pjmedia_stream_info:
    • type of rem_addr and rem_rtcp have been changed from pj_sockaddr_in to the more generic pj_sockaddr to support IPv6.
    • added RTCP XR related settings
  • New function:
    • pjmedia_stream_get_stat_xr()
Tone Generator (tonegen.h):
  • New function:
    • pjmedia_tonegen_rewind()
WAV File Player (wav_port.h):
  • New function:
    • pjmedia_wav_player_get_len()
RTP Session (rtp.h):
  • New function:
    • pjmedia_rtp_session_update2()
RTCP Session (rtcp.h):
  • New functions:
    • pjmedia_rtcp_rx_rtp2()
    • pjmedia_rtcp_enable_xr()
Endpoint (endpoint.h):
  • New functions:
    • pjmedia_endpt_get_thread_count()
    • pjmedia_endpt_get_thread()
Memory Based Playback (endpoint.h):
  • New option:
Session (session.h):
  • New function:
    • pjmedia_session_get_user_data()


Endpoint (sip_endpoint.h):
  • The pjsip_endpt_create_tsx() declaration has been removed
Transaction Layer (sip_transaction.h):
  • New function:
    • pjsip_tsx_layer_get_tsx_count()
Message Representation Layer (sip_msg.h):
  • Added pjsip_retry_after_hdr header field.
Dialog Layer (sip_dialog.h):
  • New function:
    • pjsip_ua_get_dlg_set_count()
Transport Layer (sip_transport.h):
  • New IPv6 transport types:
  • New functions:
    • pjsip_transport_type_get_af()
    • pjsip_transport_get_type_desc()
UDP Transport (sip_transport_udp.h):
  • New functions to support IPv6:
    • pjsip_udp_transport_start6()
    • pjsip_udp_transport_attach2()
TLS Transport (sip_transport_tls.h):
  • Default TLS method has been changed from SSLv23 to TLSv1.
Configurations (sip_config.h):
  • Support for run-time configuration change by using new function pjsip_cfg()
Core Stateless Operations (sip_util.h):
  • New function:
    • pjsip_restore_strict_route_set()


Client Registration (sip_regc.h):
  • Added token member in pjsip_regc_cbparam
Invite Session (sip_inv.h):
  • Added on_send_ack() callback and pjsip_inv_create_ack() function to allow application to construct and send ACK request manually.


No changes to the API.


PJSUA API (pjsua.h):
  • New callbacks:
    • on_stream_created()
    • on_stream_destroyed()
  • Changes in struct pjsua_config:
    • Removed stun_relay_host (replaced with TURN settings below).
    • Added use_srtp
    • Added srtp_secure_signaling
  • Changes in struct pjsua_acc_config:
    • Renamed to auto_update_nat to allow_contact_rewrite
    • Added use_srtp
    • Added srtp_secure_signaling
  • Changes in struct pjsua_media_config:
    • Added snd_clock_rate
    • Added channel_count
    • Added snd_auto_close_time
  • TURN settings in struct pjsua_media_config:
    • Renamed enable_relay to enable_turn
    • Added ice_no_host_cands
    • Added turn_server
    • Added turn_conn_type
    • Added turn_auth_cred
  • New compile time settings:
  • Changed default compile time settings value:
    • PJSUA_DEFAULT_ILBC_MODE (30 (prev=20))

Known Issues

Apart from general known issues documented in Known-Issues, there is a specific issue related to ICE on Symbian, as it raises E32USER CBase 46 exception.

List of Enhancements


Fixed configurations to build Symbian for device target
Fixed and tested audio on Symbian device
New utility to read RTP packets/payload from PCAP file


Increase the randomness of guid_simple
Implement IP interface enumeration on Linux/Unix
IPv6 support in PJLIB
Expose the native thread handle for applications
Option in the ioqueue to control concurrency (allow/disallow multiple/simultaneous callback calls)
Added function to set thread priority in PJLIB


IPv6 support in DNS resolvers
Simple DNS Server class (for testing)


Support for new TURN draft (TURN-07) and latest ICE draft (ICE-19)


Support for SRTP
IPv6 support in PJMEDIA
Workaround for frame bursts and drifts from audio devices
Added codec encoding/decoding sample
Added sample application to mix WAV files using conference bridge
New conference mixing algorithm
Support for non-looping playback in memory player
GSM codec on Symbian
Allow transport framework to return transport specific info
Configuration option to use high quality tone generation
Waveform Similarity Based Overlap-Add (WSOLA) implementation
Set master port worker thread priority to highest by default
New packet lost concealment (PLC) implementation
Optimize delay of current jitter buffer
G.722 codec implementation and support
Add --disable-oss option to disable OSS in configure script
Support for RTCP XR
Handle imprecise audio frame from sound device (e.g. OSS)
Change base audio frame time from 10ms to 20ms for better stability
More lenient SDP negotiator
Customizable destination address of RTCP delivery in pjmedia transport
Add mathematics & statistics module.


Move PJSIP compile time configurations/settings (such as T1, T2 timers) to run-time (thanks Philippe Leuba)
Allow application to handle sending ACK manually
IPv6 support in PJSIP
Added API to retrieve number of transactions and dialogs (thanks Sergey Bakulin)
Option in client registration to ignore Contact address in REGISTER response
Client register/registration support for various registrar brokenness


Allocate call id in round robin fashion
New PJSUA callbacks to notify application when media stream is created and destroyed
Ability to specify different clock rate when opening sound device in PJSUA-LIB
Update Contact header in REGISTER for TCP/TLS transport (thanks Klaus Darilion)


Playback of PCAP file
PocketPJ: a new and better sample application for PocketPC
Test framework for pjsua

List of Bugs


PJ_ERESOLVE error in Windows Mobile
Modification in media transport API to support more offer/answer scenarios


IPv6 support in host resolver caused failure in pjlib initialization on Symbian
pj_timer_entry_init() doesn't initialize timer ID
Compile error when <semaphore.h> is not present
Compilation error if pthread_mutexattr_set_type() is not present
Problem with setting up FD_SETSIZE
Bug in select ioqueue causing unnecessary sleep() to be invoked (thanks Sergey Bakulin)
Race condition may cause ioqueue corruption (thanks Philippe Leuba)
Active socket abstraction to make ioqueue programming easier


pjstun_get_mapped_addr() failed when receiving incoming SIP request (thanks Lafras Henning)


Stack overflow in ICE on Symbian phone target
STUN request is not freed when transaction times out (thanks Amit Sharma)


Conference bridge doesn't handle NONE frame (thanks Daniel Braun)
Conference bridge does not update transmitter_cnt when port is removed
Failure in media negotiation when SDP contains two audio media lines (thanks Arie Velthoen)
Encoder is called for FRAME_TYPE_NONE
Fix endianess detection for PortAudio
Bug in tone generator: can't play more digits (thanks Marian Dragomir)
WAV player cuts last data from the WAV file
PJSIP rejects incoming call with 415/Unsupported Media Type for INVITE containing video (thanks Alain Totouom)
Updated PortAudio to the latest revision
pjmedia_clock_create() should not create thread when PJMEDIA_CLOCK_NO_ASYNC is given (thanks Alberto Takeshi Mayama)
Concurrency problem when destroying stream (thanks Michael Broughton)
Jitter buffer should return length information
RTP/AVP vs RTP/SAVP negotiation
Loop forever than UDP media transport is destroyed while callback is running
Speex version upgrade and handling multiple speex audio frames
Handle duplicated/misordered incoming DTMF packets
PJSIP rejects incoming call with m=image in the offer (thanks Thiago)
Problems with using multiple sound devices (with splitcomb) with PJSUA-LIB
Handle G.722 wong clock rate bug and other codec with inconsistent clock rate
Crash occured when stream port has no transmitter on call using ILBC with different ptime
Crash on sound port when only player is opened and delaybuf enabled
NULL frame transmission in conference bridge is not clocked at the right interval
Fixed support for stereo audio all the way in pjmedia
Assertion in sound device when headset is plugged/unplugged in MacOS X (thanks Alexei Kuznetsov)
Invalid argument error when binding media transport on MacOS X (thanks Daniel Mikusa)
Pjsua crash after wav player destroyed inside the eof callback (thanks Tanguy Floc'h)
Resample may overwrite past destination buffer (thanks Paweł Kierski)
Enable setting sound device latency at runtime.


Protect client registration session (regc) with mutex
Client registration (pjsip_regc) doesn't obey explicit transport selection (thanks Hitesh)
Respond incoming CANCEL with no matching INVITE with 481 (thanks Sergey Bakulin)
Empty Authorization header is not removed when the actual header is sent
Default TLS version should be TLSv1 (thanks Klaus Darilion)
TCP keep-alive packets are corrupting SIP message (thanks Helmut Wolf)
When outgoing request within dialog is responded with 481 or 408, should send BYE after terminating dialog (thanks Philippe Leuba)
Crash in TCP/TLS transport when the listener is destroyed (thanks Christian Grigis)
Bug in strict route processing when challenged with 401/407 response (thanks Klaus Darilion)
Bug with handling simultaneous re-INVITE (thanks Philippe Leuba)
Duplicate Authorization header when PJSIP is configured to send empty Authorization header (thanks Roland Klabunde)
Support for parsing Retry-After header
PRACK is not re-sent on 401/407 challenge (thanks Josh Benson)


Failed to create RTP/RTCP sockets when explicit bind address is specified (thanks Arie Velthoen)
Overflow in dump_media_session() (thanks Simon Farmer)
Log level is not set in PJSUA-LIB (thanks Simon Farmer)
Enable keep-alive for UDP transport even when STUN is not configured
Crash on call update or re-invite (Thanks Alexey)
Shutdown the sound device when the media flow is idle
RTP/AVP/SAVP negotiation on UPDATE/re-INVITE


Added --auto-update-nat, --use-compact-form, and --dis-codec options in pjsua (thanks Lafras Henning)
DTMF digit callback error in Python

Note: See TracRoadmap for help on using the roadmap.