3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
* @brief PJSIP Doxygen's mainpage.
26
/*////////////////////////////////////////////////////////////////////////// */
34
@mainpage PJSIP - Open Source SIP Stack
38
@section intro_sec Introduction
40
PJSIP is an Open Source SIP prototol stack, designed to be very small in
41
footprint, have high performance, and very flexible.
43
@subsection hist_sec History
45
PJSIP has been actively developed since 2003, but its history goes well
46
beyond that. The author has been developing SIP stack since 1999 during
47
RFC 2543 era, and after several experimentation with different approaches
48
in the programming (the first stack actually was in C++!), and also with
49
the evolution of the SIP protocol itself, the current/third generation
50
of PJSIP (the 0.2.9 version is the second generation) can be considered
51
as pretty stable in term of design, and should
52
incorporate all design considerations (and implementation tricks!) that
53
have been learned over the years. Of course only time will tell if this
54
statement can still be held true in the future.
61
@section pjsipgetting_started Getting Started
63
PJSIP consists of multiple levels of APIs, which each of them layered on
64
top of another. Because of this, new readers may find it a bit difficult
65
to find the place to start.
67
In general, I think perhaps I can recommend two approaches on using PJSIP.
71
@subsection getting_started_high Using PJSUA API
73
@ref PJSUA_LIB wraps together all SIP components and media into a high level
74
API, suitable for creating typical SIP user agent applications. It
75
features easy to use API for:
76
- multiple client registration (accounts),
77
- high level SIP and media session (calls),
78
- buddy list, presence and instant messaging,
79
- powerful and very easy to use media manipulation,
81
while maintaining some space for customization (custom SIP
82
transport, custom SIP media, etc.) needed by some types of applications.
83
@ref PJSUA_LIB is also aimed to be able to run on devices such as PDA
84
or mobile phones, by carefully allowing application to set the appropriate
85
threading strategy and memory limits (number of calls, media ports, etc.).
87
However, @ref PJSUA_LIB may not be the most suitable API for some types
88
of applications, since it is directed towards an easy to use API. For
89
more more advanced use, you may better implement the application by using
90
PJSIP + PJMEDIA directly, as described below.
94
@subsection getting_started_pjsip_pjmedia Using PJSIP and PJMEDIA Directly
96
For the ultimate flexibility and power, using PJSIP and PJMEDIA directly
97
is the way to go. The drawback will be, of course, steeper learning curve.
99
However, the following links may provide some useful information:
100
- <A HREF="/docs.htm">PJSIP Developer's Guide</A> PDF
101
document is the ultimate guide to understand PJSIP design concept.
102
- there are some samples in <A HREF="/cgi-bin/viewcvs.cgi/pjproject/trunk/pjsip-apps/src/samples/">
103
<b>pjsip-apps/src/samples</b></A> directory.
104
- @ref PJSUA_LIB source code may also be useful to see how high level
105
API are implemented with PJSIP/PJMEDIA.
106
- and finally, you can always <b>Use the Source</b>!
112
@section this_doc About This Document
114
This document contains the reference information about PJSIP. For
115
more in-depth guide (and information in general), readers are
116
encouraged to read the <A HREF="/docs.htm">
117
<b>PJSIP Developer's Guide</b></A> PDF document
118
which can be downloaded from http://www.pjsip.org/docs.htm.
121
@subsection doc_how_to_read How to Read This Document
123
For main navigation, please go to <A HREF="modules.htm"><b>Modules</b></A>
124
link on top of this page.
126
This document was generated with <A HREF="http://www.doxygen.org">Doxygen</A>
127
from PJSIP header files.
132
@section pjsip_toc Documentation Contents
134
Click on <A HREF="modules.htm"><b>Modules</b></A> link on top of this page
135
to get the detailed table of contents.
137
The following are top level sections in the <A HREF="modules.htm">
138
<b>Modules</b></A>, as laid out in the following diagram:
140
\image html pjsip-arch.jpg "Static Library Layout"
142
Enumerating the static libraries from the bottom:
144
- <A HREF="/pjlib/docs/main.htm">PJLIB</A>, is the platform abstraction
145
and framework library, on which all other libraries depend,
147
- PJLIB-UTIL, provides auxiliary functions such as text scanning,
150
- PJMEDIA is the multimedia framework,
152
- PJMEDIA-CODEC is the placeholder for media codecs,
154
- @ref PJSIP_CORE (<b>PJSIP-CORE</b>) is the very core of the PJSIP library,
155
and contains the SIP @ref PJSIP_ENDPT, which is the owner/manager for all
156
SIP objects in the application, messaging elements, parsing, transport
157
management, module management, and stateless operations, and also
160
- The @ref PJSIP_TRANSACT module inside <b>PJSIP-CORE</b> provides
161
stateful operation, and is the base for higher layer features such as
164
- The @ref PJSIP_UA module inside <b>PJSIP-CORE</b> manages dialogs, and supports dialog
167
- @ref PJSIP_SIMPLE (<b>PJSIP-SIMPLE</b>) provides the base SIP event framework
168
(which uses the common/base dialog framework) and implements presence
169
on top of it, and is also used by call transfer functions,
171
- @ref PJSIP_HIGH_UA (<b>PJSIP-UA</b>) is the high level abstraction of INVITE sessions
172
(using the common/base dialog framework). This library also provides
173
SIP client registration and call transfer functionality,
175
- and finally, @ref PJSUA_LIB (<b>PJSUA-LIB</b>) is the highest level of abstraction,
176
which wraps together all above functionalities into high level, easy to
182
@page page_pjsip_samples PJSIP Samples
184
I wish I could write more samples, but for now here are some samples or
185
working applications that are available from the source tree:
187
- @ref page_pjsip_sample_sipstateless_c\n
188
This is about the simplest SIP application with PJSIP, all it does is
189
respond all incoming requests with 501 (Not Implemented) response
192
- @ref page_pjsip_sample_simple_ua_c\n
193
This is a very simple SIP User Agent application that only use PJSIP
194
(without PJSIP-UA). It's able to make and receive call, and play
195
media to the sound device.
197
- @ref page_pjsip_sample_simple_pjsuaua_c\n
198
Very simple SIP User Agent with registration, call, and media, using
199
PJSUA-API, all in under 200 lines of code.
201
- @ref page_pjsip_samples_pjsua\n
202
This is the reference implementation for PJSIP and PJMEDIA.
203
PJSUA is a console based application, designed to be simple enough
204
to be readble, but powerful enough to demonstrate all features
205
available in PJSIP and PJMEDIA.\n
206
Screenshot on WinXP: \image html pjsua.jpg "pjsua on WinXP"
208
- @ref page_pjmedia_samples_siprtp_c\n
209
This is a useful program (integrated with PJSIP) to actively measure
210
the network quality/impairment parameters by making one or more SIP
211
calls (or receiving one or more SIP calls) and display the network
212
impairment of each stream direction at the end of the call.
213
The program is able to measure network quality parameters such as
214
jitter, packet lost/reorder/duplicate, round trip time, etc.\n
215
Note that the remote peer MUST support RTCP so that network quality
216
of each direction can be calculated. Using siprtp for both endpoints
218
Screenshots on WinXP: \image html siprtp.jpg "siprtp screenshot on WinXP"
220
- @ref page_pjsip_perf_c\n
221
This sample contains a complete implementation of a SIP performance
222
measurement tool. Unlike other tool such SIPp, pjsip-perf is geared
223
more towards finding the performance of an endpoint by flooding the
224
endpoint with some requests and time the completion of the requests.\n
225
Screenshots on Linux console: \image html pjsip-perf.jpg "pjsip-perf screenshot on Linux"
229
* \page page_pjsip_samples_pjsua PJSUA
231
* This is the reference implementation for PJSIP and PJMEDIA.
232
* PJSUA is a console based application, designed to be simple enough
233
* to be readble, but powerful enough to demonstrate all features
234
* available in PJSIP and PJMEDIA.
236
* This file is pjsip-apps/src/pjsua/pjsua_app.c
238
* Screenshot on WinXP: \image html pjsua.jpg "pjsua on WinXP"
240
* \includelineno pjsua_app.c
244
* \page page_pjsip_sample_simple_ua_c Samples: Simple UA
246
* This is a very simple SIP User Agent application that only use PJSIP
247
* (without PJSIP-UA). It's able to make and receive call, and play
248
* media to the sound device.
250
* \includelineno simpleua.c
254
* \page page_pjsip_sample_simple_pjsuaua_c Samples: Simple PJSUA
256
* Very simple SIP User Agent with registration, call, and media, all
257
* in under 200 lines of code.
259
* \includelineno simple_pjsua.c
263
* \page page_pjsip_sample_sipstateless_c Samples: Stateless SIP Endpoint
265
* This is about the simplest SIP application with PJSIP, all it does is
266
* respond all incoming requests with 501 (Not Implemented) response
269
* \includelineno sipstateless.c
273
* \page page_pjmedia_samples_siprtp_c Samples: siprtp - SIP with RTCP Quality Monitoring
275
* This source is an example to demonstrate using SIP and RTP/RTCP framework
276
* to measure the network quality/impairment from the SIP call. This
277
* program can be used to make calls or to receive calls from other
278
* SIP endpoint (or other siprtp program), and to display the media
279
* quality statistics at the end of the call.
281
* Note that the remote peer must support RTCP.
283
* The layout of the program has been designed so that custom reporting
284
* can be generated instead of plain human readable text.
286
* The source code of the file is pjsip-apps/src/samples/siprtp.c
288
* Screenshots on WinXP: \image html siprtp.jpg
290
* \includelineno siprtp.c
294
* \page page_pjsip_perf_c Samples: pjsip-perf - SIP Performance Benchmarking Tool
296
* This sample contains a complete implementation of a SIP performance
297
* measurement tool. Unlike other tool such SIPp, pjsip-perf is geared
298
* more towards finding the performance of an endpoint by flooding the
299
* endpoint with some requests and time the completion of the requests.
301
* The source code of the file is pjsip-apps/src/samples/pjsip-perf.c
303
* Screenshots on Linux console: \image html pjsip-perf.jpg
305
* \includelineno pjsip-perf.c