PJSIP Project
latest

PJSIP Overview

  • Overview
    • Libraries Architecture
  • Features (Datasheet)
    • Supported Platforms
    • SIP Capabilities
      • Base specs
      • Transports
      • Routing/NAT
      • Call
      • SDP
      • Presence and IM
      • Other extensions
      • Compliance, best current practices
    • NAT Traversal
    • Media/Audio Features
      • Core
      • Audio Features
      • Video Features
      • Transports
      • Media components (Ports)
      • Clock provider
      • Codec Framework
      • SDP
      • RTP and RTCP
      • Compile Time Settings
      • Basic Types and Functions
      • Endpoint
      • Formats
      • Media Flow
      • Events
    • Video Features
    • Supported Codecs
      • Audio Codecs
      • Video Codecs
    • Supported Audio Devices
    • Supported Video Devices
  • License
    • Overview
    • The SOFTWARE
      • License
      • Alternative license
      • Special Exception
      • Third Party Software Licensing Requirements
    • Third Party SOFTWARE
      • Contributed and Public Domain Third Party Software
      • Third Party Software with Licensing Requirements
      • External Third Party Software
    • Licensing FAQ
      • Why is PJSIP licensed as GPL and not (LGPL|Apache|BSD|choose your OSS license here)?
      • What about the “viral” nature of the GPL?
      • Can I develop closed source products with PJSIP?

Get Started

  • Getting PJSIP
  • General guidelines
    • Development guidelines
      • Preparation
      • Development
      • Coding Style
      • Deployment
      • config_site.h
    • Platform Considerations
      • Android
      • iOS for iPhone, iPad, and other Apple devices
      • Windows Desktop
      • MacOS X
      • Linux Desktop
      • Windows Phone 10 (UWP)
      • Embedded Linux
      • QNX or Other Posix Embedded OS
      • Other Unix Desktop OSes
      • Porting to Other Embedded OS
      • Symbian
      • BlackBerry 10
      • Windows Mobile
    • Which API to use
      • PJSIP, PJMEDIA, and PJNATH Level
      • PJSUA-LIB API
      • PJSUA2 C++ API
      • PJSUA2 API for Java, Python, C#, and Others
    • Other specific considerations
  • Android
    • Build Instructions
      • Requirements
      • Build Preparation
      • Building PJSIP
      • Video Support
      • OpenSSL Support
      • Trying our sample application and creating your own
      • Kotlin Support
    • Common issues when developing Android apps
      • Unable to make or receive call due to large message size
      • Garbage Collector May Crash Your App (Pjsua2 API)
      • OpenSLES audio device deadlock upon shutdown
      • Bad audio recording quality on some devices
  • iPhone/iOS
    • Build Instructions
      • Requirements
      • Build Preparation
      • Building PJSIP
      • Using PJSIP in your application
      • Video Support
      • TLS/OpenSSL Support
    • Common issues when developing iOS apps
      • Accepting calls in the background with PushKit (iOS 9 or later)
      • CallKit integration and audio session (AVAudioSession) management (iOS 10)
      • Crash after calling PJLIB APIs using Grand Central Dispatch (GCD)
      • Audio lost or other issues with interruption (by a phone call or an alarm), headset plug/unplug, or Bluetooth input
      • SIP transport keepalive while in background
      • Unable to accept incoming call in background mode (iOS 8 or older)
  • Mac/Linux/Unix
    • Build Instructions with GNU Build Systems
      • Supported Targets
      • Requirements
      • ./configure
      • Cross Compilation
      • Running make
      • Build Customizations
      • Optional: Installing PJSIP
    • Using PJSIP in applications
  • Windows
    • Build Instructions
      • Build Preparation
      • Requirements
      • Building the Projects
      • Debugging Sample Applications
    • Using PJSIP in Windows applications
    • Common issues when developing on Windows
      • Troubleshooting crash problem on Win32
  • Windows Phone
    • Build Instructions
      • Requirements
      • Build Preparation
      • Building and running the Projects
      • Debugging Application
      • Other References
    • Windows Runtime (WinRT) Overview
      • Windows Runtime
      • Windows RT
      • Windows Phone Runtime
      • Windows Phone 8
      • Windows Phone 8.1
      • References

PJSUA2 Guide

  • Introduction to PJSUA2
  • Building PJSUA2
    • Common Requirements
    • Building Python SWIG Module
    • Building Java SWIG Module
    • Building C# SWIG Module
  • General Concepts
    • Classes Overview
      • pj::Endpoint
      • pj::Account
      • pj::Media
      • pj::Call
      • pj::Buddy
    • Guidelines
      • Class Usage Patterns
      • Error Handling
      • Asynchronous Operations
      • Threading
      • Problems with Garbage Collection
      • Objects Persistence
  • Hello World!
    • C++
    • Python3
    • Java
  • Using PJSUA2
    • The Endpoint
      • Instantiating the endpoint
      • Creating the library
      • Initializing and configuring the library
      • Creating one or more transports
      • Starting the library
      • Shutting down the library
    • Accounts
      • Subclassing the Account class
      • Creating userless accounts
      • Creating account
      • Account configurations
      • Account operations
    • Working with audio media
      • The conference bridge
      • Playing a WAV file
      • Recording to WAV file
      • Local audio loopback
      • Looping audio
      • Call’s media
      • Second call
      • Conference call
      • Recording the Conference
    • Working with video media
      • The video conference bridge
      • Starting camera preview
      • Important note about threading
      • Call’s video media
      • Configuring a video window
      • Video event
      • Video conference call
    • Calls
      • Subclassing the Call class
      • Making outgoing calls
      • Receiving Incoming Calls
      • Call Properties
      • Call Disconnection
      • Working with Call’s Audio Media
      • Call Operations
      • Instant Messaging(IM)
    • Presence and Instant Messaging
      • Subclassing the Buddy class
      • Subscribing to Buddy’s Presence Status
      • Responding to Presence Subscription Request
      • Changing Account’s Presence Status
      • Instant Messaging(IM)
  • Sample Applications
    • PJSUA2 Samples

Specific Guides

  • Specific Guides
  • Audio
    • Accoustic Echo Cancellation (AEC)
    • Handling HW insertion/removal
    • Intel IPP codecs integration
    • Jitter buffer features and operations
      • Features
      • Operations
    • OpenCore AMR codecs integration
      • Building and Installing OpenCORE AMR Library
      • Adding AMR Support in PJSIP
      • Testing PJSIP For OpenCORE AMR Support
    • Switchboard
    • WebRTC integration
  • Audio Troubleshooting
    • How to record audio with pjsua
    • Audio is breaking up
    • Audio drop-outs or “stutters”
    • High jitter value observed by remote party
    • Loud static noise
    • No audio is heard in local speaker
    • No audio is heard by remote party
    • Reducing audio latency
      • Overview
      • Optimizing sound device latency
      • Codec latency
      • Use audio switchboard
      • Choosing lower audio frame length
      • Optimizing Jitter Buffer Latency
      • Other sources of latency
    • Soft/quiet noise
    • Audio troubleshooting checklists
      • Checking that codec is negotiated properly by both parties
      • Check audio interconnection in the conference bridge
      • Check CPU utilization
      • Check for dangling call in PBX
      • Checking the quality of the sound device
      • Check for audio underflows/overflows
      • Check that correct device is used
      • Check by looping back microphone to speaker
      • Check if RTP packets are received
      • Testing and optimizing audio device with pjsystest
      • Checking by playing a WAV file
      • Check for problematic clock rate
      • Check for network impairments of incoming RTP packets
      • Check that audio is transmitting and to correct remote address
  • Build & Integration
    • Adding FFMPEG support
      • Installation
      • Building PJPROJECT with FFMPEG support
    • Mingw-w64
  • Development & Programming
    • Group Lock
      • Introduction
      • Usage
      • Debugging
      • Notes
    • Using thread with PJSUA initialization and shutdown
    • PJSIP Guide
  • Media
    • Integrating Third Party Media Stack into PJSUA-LIB
    • Understanding Audio Media Flow
      • Introduction
      • Audio playback flow (the main flow)
      • Audio recording flow
      • Sound device timing problem
      • Incoming RTP/RTCP Packets
    • RTCP Feedback
    • Tone generator algorithms performance
      • The Algorithms
      • Accuracy
      • Performance
      • Conclusion
    • Transport Adapter
      • Introduction to media transport
      • Media transport adapter
      • Implementing a custom transport adapter
      • Integrating custom transport adapter
  • Network & NAT
    • Handling IP address change
      • Problem description
      • API: pjsua_handle_ip_change()
      • pjsua_handle_ip_change() flow
      • Notes and limitations
      • IP change scenarios
      • IP address change detection
    • IPv6 and NAT64 support
      • Availability
      • Enabling IPv6 support in application using PJSUA-LIB
      • NAT64
      • References
    • Getting around blocked, filtered, or mangled VoIP network
      • Use TCP/TLS for SIP Traffic
      • Disable STUN
      • Relay RTP via TURN/TCP
      • Use Non-standard Ports for VoIP Services
    • Getting around NAT (for media)
      • Use STUN and/or TURN and/or ICE
      • Disabling VAD
      • Using Port Forwarding
      • Still having NAT problem?
    • QoS Support
      • Introduction on QoS
      • Availability
      • Objective
      • Design
      • Limitations
      • Using QoS in PJSIP Applications
      • References
    • Using SIP TCP Transport
      • Enabling TCP support
      • Sending Initial Requests
      • Contact Header
      • Subsequent Requests
      • Automatic Switch to TCP if Request is Larger than 1300 bytes
      • Additional Info about Registration
    • Using ICE in non-SIP Applications
      • Introduction
      • Terminology
      • Fitting ICE in the application
      • Preparations
      • Basic lifecycle
      • Notes
    • Using Trickle ICE
      • Brief info about Trickle ICE
      • How to enable
      • References
    • Troubleshooting ICE negotiation failure
      • How ICE works
      • Sample session
      • ICE negotiation failures
  • Performance & Footprint
    • Footprint Optimization
      • Overview
      • Reducing executable size
      • Reducing heap memory usage
    • ICE Heap Usage
      • Scope
      • How the memory usage is calculated
      • Call Setup
      • Checkpoints
      • Running with Default Settings
      • Optimizing the Memory Usage
      • More Optimized Results
      • Wait, There’s More!
      • Final Result
      • Conclusion
      • Appendix
    • Performance Optimization
      • Maximising performance
      • How to configure pjsip to serve thousands of calls
    • Media Performance (MIPS test)
      • Test Method
      • Interpreting the Results
      • Results
  • Security
    • SRTP
      • Introduction
      • Features
      • Requirements
      • How to integrate
      • Building PJSIP with SRTP Support
      • Using SRTP
      • AES-GCM support
    • SSL/TLS
      • Requirements
      • Installing OpenSSL
      • Build PJSIP with TLS Support
      • Configuring SIP TLS transport
      • Using SIP TLS transport
      • Running pjsua as TLS Server
      • Running pjsua as TLS Client
      • Enable TLS mutual authentication
  • SIP
    • PJSIP Guide
    • Adding custom header
    • DTMF
      • Overview
      • PJSUA2 API
      • PJSUA API
      • Sending inband DTMF tones
      • Implementing inband DTMF detector
    • Processing redirection (3xx) response
      • Features
      • Redirection with PJSIP API
      • Redirection with PJSUA-LIB API
      • Redirection with PJSUA2 API
      • Redirection in pjsua application
    • Reducing SIP message size
    • TCP/TLS Transport
    • URI Escaping
  • Video
    • Features
    • Integrating libyuv
    • Video quality troubleshooting
    • Video User’s Guide
      • Building with Video Support
      • Building the GUI Sample Application
      • Using Video API (pjsua-lib)
      • Video Conference
      • Additional Info
      • Video API Reference (pjsua-lib)
  • Other
    • PJSUA Command Line Interface (CLI) Manual
      • Introduction
      • Commands
    • Writing guide
      • Heading convention
      • Typography conventions
      • Cross referencing
      • Linking from external website
      • Notes, Warnings, and Blocks
      • Local TOC
      • Converting from Trac wiki

API Reference & Samples

  • PJSUA2
    • API Reference
      • User Agent
      • Account
      • Call
      • Media
      • Presence
      • Supporting APIs
    • PJSUA2 Samples
  • PJSUA-LIB
    • API Reference
    • PJSUA-LIB Samples
  • PJSIP
    • PJSIP Guide
    • API Reference
      • Compile Time Settings
      • Core
      • Message Elements
      • Transport
      • Authentication
      • Transaction Layer
      • Base UA/Common Dialog Layer
      • User Agent Layer
      • Event and Presence
    • PJSIP Samples
  • PJMEDIA
    • PJMEDIA Core
      • Core
      • Audio Features
      • Video Features
      • Transports
      • Media components (Ports)
      • Clock provider
      • Codec Framework
      • SDP
      • RTP and RTCP
      • Compile Time Settings
      • Basic Types and Functions
      • Endpoint
      • Formats
      • Media Flow
      • Events
    • PJMEDIA-Codec
      • Audio Codecs
      • Video Codecs
      • Detail information:
      • Android H.264, VP8, VP9 (native)
      • BCG729 (a G.729 compliant codec)
      • FFMPEG codecs (H.261, H.263, H.263P (H263-1998), H.264, MJPEG, VP8, VP9)
      • G.711
      • G.722
      • G.722.1/C
      • GSM FR
      • ILBC
      • OpenCore AMR NB/WB
      • OpenH264
      • Opus
      • Passthrough codecs
      • SILK
      • Speex
      • VP8 and VP9 (libvpx)
    • PJMEDIA-AudioDev
      • Overview
      • Using the Audio Device API
      • API Reference
      • Supported devices:
      • ALSA
      • Android OpenSL
      • Android JNI
      • Android Oboe
      • bdIMAD by BdSound
      • CoreAudio (Mac OS X and iPhone)
      • WMME (Windows and Windows Mobile devices)
      • WASAPI (Windows Audio Session API)
      • No longer supported devices:
      • PortAudio
      • Blackberry BB10
      • Nokia APS/VAS
      • Symbian MMF
    • PJMEDIA-VideoDev
      • API Reference
      • Supported devices
      • Android Camera2
      • AVI virtual device
      • AVFoundation (Mac and iOS) and UIView (iOS)
      • Colorbar
      • DirectShow (Windows)
      • FFMPEG
      • OpenGL (desktops)/OpenGL ES 2 (Android, iOS)
      • QuickTime
      • SDL
      • Video4Linux
    • PJMEDIA Samples
  • PJNATH
    • Introduction to NAT and NAT Traversal
      • The NAT traversal problems
      • The NAT traversal solutions
      • ICE Solution - The Protocol that Works Harder
      • PJNATH - The building blocks for effective NAT traversal solution
    • API Reference
      • Basic Types and Functions
      • ICE and Trickle ICE
      • STUN
      • TURN
      • uPnP
      • NAT Type Detection
    • PJNATH Samples
  • PJLIB-UTIL
    • Basic Types and Functions
    • Command-Line Interface (CLI) Framework
    • Encoding and Encryptions
    • Text and Strings
    • DNS
    • HTTP
    • STUN
    • File Formats
  • PJLIB
    • Key Features
      • Extreme Portability
      • Small Footprint
      • Big in Performance
      • No Dynamic Memory Allocations
      • Rich Features
    • API Reference
      • Basic Types and Functions
      • Infrastructure
      • Data structure
      • Network
      • SSL/Secure Socket
      • File
      • Memory Management
      • String & Unicode
      • Multithreading and Concurrency
      • OS Abstraction
      • Time and Timer
      • Random and GUID
      • Application Microframework
  • All Samples
    • PJSUA2 Samples
    • PJSUA-LIB Samples
    • PJSIP Samples
    • PJMEDIA Samples
    • PJNATH Samples
PJSIP Project
  • Specific Guides
  • PJSIP Guide
  • Edit on GitHub

PJSIP Guide

The following are links to chapters in the PJSIP Developer’s Guide (pdf). The document explains core PJSIP concepts.

  • Table of Contents

  • General Design

  • Module

  • Message Elements

  • Parser

  • Message Buffers

  • Transport Layer

  • Sending Messages

  • Transactions

  • Authentication Framework

  • Basic User Agent Layer (UA)

  • SDP Offer/Answer Framework

  • Dialog Invite Session and Usage

  • SIP Specific Event Notification

  • Presence Event Package

  • Refer Event Package

  • Instant Messaging

  • PJSUA Abstraction

Previous Next

© Copyright 2023, Teluu. Revision 76fcc943.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
2.13
2.12.1
2.11
2.10
1.16
Downloads
On Read the Docs
Project Home
Builds