Documentation fixes for docs.pjsip.org v2.0 project (#3202)

* Improve robustness of sample apps. Fixing crash in aviplay

* Changes in documentation

* Add first pjsua2 hello world sample (from PJSUA2 guide)

* Fix doxygen documentation for docs.pjsip.org v2

* Add make clean-doc target

* Replace Trac ticket URL with GitHub issues URL

* Remove pjsip-book because the correct one is in pjproject_docs
This commit is contained in:
Benny Prijono 2022-08-09 06:16:16 +07:00 committed by GitHub
parent 6c8f39c3bb
commit c03ab41ed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
165 changed files with 665 additions and 4817 deletions

6
.gitignore vendored
View File

@ -70,3 +70,9 @@ tests/pjsua/tools/cmp_wav.dSYM
tests/pjsua/logs
# benchmark output
*bench*.htm
# Doxygen stuff
*/docs/html/
*/docs/xml/
*/docs/latex/
*/docs/*.tag

View File

@ -40,7 +40,7 @@ lib:
done; \
.PHONY: lib doc
.PHONY: lib doc clean-doc
doc:
@if test \( ! "$(WWWDIR)" == "" \) -a \( ! -d $(WWWDIR)/pjlib/docs/html \) ; then \
@ -55,6 +55,11 @@ doc:
fi; \
done
clean-doc:
for dir in pjlib pjlib-util pjnath pjmedia pjsip; do \
rm -rf ./$${dir}/docs/html ./$${dir}/docs/xml ./$${dir}/docs/latex ./$${dir}/docs/$${dir}.tag; \
done
LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \
pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \
pjnath/lib/libpjnath-$(TARGET_NAME).a \

File diff suppressed because it is too large Load Diff

View File

@ -1,170 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
all: html
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
-rm -rf xml
-rm -rf html
install:
@if test -z "$(WWWDIR)" ; then \
echo WWWDIR is not set; \
else \
echo Copying html dir to $(WWWDIR)/docs/book-latest/..; \
cp -a -f _build/html $(WWWDIR)/docs/book-latest/; \
echo Copying PJSUA2Doc.pdf to $(WWWDIR)/docs/book-latest/..; \
cp -f _build/latex/PJSUA2Doc.pdf $(WWWDIR)/docs/book-latest/; \
fi
xml: Doxyfile ../../pjsip/include/pjsua2
doxygen
html: xml
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ThePJSIPBook.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ThePJSIPBook.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/ThePJSIPBook"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ThePJSIPBook"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf: xml
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

View File

@ -1,222 +0,0 @@
Accounts
=========
Accounts provide identity (or identities) of the user who is currently using the application. An account has one SIP Uniform Resource Identifier (URI) associated with it. In SIP terms, this URI acts as Address of Record (AOR) of the person and is used as the From header in outgoing requests.
Account may or may not have client registration associated with it. An account is also associated with route set and some authentication credentials, which are used when sending SIP request messages using the account. An account also has presence status, which will be reported to remote peer when they subscribe to the account's presence, or which is published to a presence server if presence publication is enabled for the account.
At least one account MUST be created in the application, since any outgoing requests require an account context. If no user association is required, application can create a userless account by calling Account.create(). A userless account identifies local endpoint instead of a particular user, and it corresponds to a particular transport ID.
Also one account must be set as the default account, which will be used as the account identity when pjsua fails to match incoming request with any accounts using the stricter matching rules.
Subclassing the Account class
---------------------------------
To use the Account class, normally application SHOULD create its own subclass, in order to receive notifications for the account. For example:
.. code-block:: c++
class MyAccount : public Account
{
public:
MyAccount() {}
~MyAccount() {}
virtual void onRegState(OnRegStateParam &prm)
{
AccountInfo ai = getInfo();
cout << (ai.regIsActive? "*** Register: code=" : "*** Unregister: code=")
<< prm.code << endl;
}
virtual void onIncomingCall(OnIncomingCallParam &iprm)
{
Call *call = new MyCall(*this, iprm.callId);
// Just hangup for now
CallOpParam op;
op.statusCode = PJSIP_SC_DECLINE;
call->hangup(op);
// And delete the call
delete call;
}
};
In its subclass, application can implement the account callbacks, which is basically used to process events related to the account, such as:
- the status of SIP registration
- incoming calls
- incoming presence subscription requests
- incoming instant message not from buddy
Application needs to override the relevant callback methods in the derived class to handle these particular events.
If the events are not handled, default actions will be invoked:
- incoming calls will not be handled
- incoming presence subscription requests will be accepted
- incoming instant messages from non-buddy will be ignored
Creating Userless Accounts
--------------------------
A userless account identifies a particular SIP endpoint rather than a particular user. Some other SIP softphones may call this peer-to-peer mode, which means that we are calling another computer via its address rather than calling a particular user ID. For example, we might identify ourselves as "sip:192.168.0.15" (a userless account) rather than, say, "sip:alice@pjsip.org".
In the lower layer PJSUA-LIB API, a userless account is associated with a SIP transport, and is created with ``pjsua_acc_add_local()`` API. This concept has been deprecated in PJSUA2, and rather, a userless account is a "normal" account with a userless ID URI (e.g. "sip:192.168.0.15") and without registration. Thus creating a userless account is exactly the same as creating "normal" account.
Creating Account
----------------
We need to configure AccountConfig and call Account.create() to create the account. At the very minimum, pjsua only requires the account's ID, which is an URI to identify the account (or in SIP terms, it's called Address of Record/AOR). Here's a snippet:
.. code-block:: c++
AccountConfig acc_cfg;
acc_cfg.idUri = "sip:test1@pjsip.org";
MyAccount *acc = new MyAccount;
try {
acc->create(acc_cfg);
} catch(Error& err) {
cout << "Account creation error: " << err.info() << endl;
}
The account created above doesn't do anything except to provide identity in the "From:" header for outgoing requests. The account will not register to SIP server or anything.
Typically you will want the account to authenticate and register to your SIP server so that you can receive incoming calls. To do that you will need to configure some more settings in your AccountConfig, something like this:
.. code-block:: c++
AccountConfig acc_cfg;
acc_cfg.idUri = "sip:test1@pjsip.org";
acc_cfg.regConfig.registrarUri = "sip:pjsip.org";
acc_cfg.sipConfig.authCreds.push_back( AuthCredInfo("digest", "*", "test1", 0, "secret1") );
MyAccount *acc = new MyAccount;
try {
acc->create(acc_cfg);
} catch(Error& err) {
cout << "Account creation error: " << err.info() << endl;
}
Account Configurations
-----------------------
There are many more settings that can be specified in AccountConfig, like:
- AccountRegConfig, to specify registration settings, such as registrar server and retry interval.
- AccountSipConfig, to specify SIP settings, such as credential information and proxy server.
- AccountCallConfig, to specify call settings, such as whether reliable provisional response (SIP 100rel) is required.
- AccountPresConfig, to specify presence settings, such as whether presence publication (PUBLISH) is enabled.
- AccountMwiConfig, to specify MWI (Message Waiting Indication) settings.
- AccountNatConfig, to specify NAT settings, such as whether STUN or ICE is used.
- AccountMediaConfig, to specify media settings, such as Secure RTP (SRTP) related settings.
- AccountVideoConfig, to specify video settings, such as default capture and render device.
Please see AccountConfig reference documentation for more info.
Account Operations
--------------------------------------
Some of the operations to the Account object:
- manage registration
- manage buddies/contacts
- manage presence online status
Please see the reference documentation for Account for more info. Calls, presence, and buddy will be explained in later chapters.
Class Reference
---------------
Account
+++++++
.. doxygenclass:: pj::Account
:path: xml
:members:
AccountInfo
+++++++++++
.. doxygenstruct:: pj::AccountInfo
:path: xml
Account Settings
++++++++++++++++
AccountConfig
~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountConfig
:path: xml
AccoutRegConfig
~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountRegConfig
:path: xml
AccountSipConfig
~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountSipConfig
:path: xml
AccountCallConfig
~~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountCallConfig
:path: xml
AccountPresConfig
~~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountPresConfig
:path: xml
AccountMwiConfig
~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountMwiConfig
:path: xml
AccountNatConfig
~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountNatConfig
:path: xml
AccountMediaConfig
~~~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountMediaConfig
:path: xml
AccountVideoConfig
~~~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::AccountVideoConfig
:path: xml
Callback Parameters
+++++++++++++++++++
.. doxygenstruct:: pj::OnIncomingCallParam
:path: xml
.. doxygenstruct:: pj::OnRegStartedParam
:path: xml
.. doxygenstruct:: pj::OnRegStateParam
:path: xml
.. doxygenstruct:: pj::OnIncomingSubscribeParam
:path: xml
.. doxygenstruct:: pj::OnInstantMessageParam
:path: xml
.. doxygenstruct:: pj::OnInstantMessageStatusParam
:path: xml
.. doxygenstruct:: pj::OnTypingIndicationParam
:path: xml
.. doxygenstruct:: pj::OnMwiInfoParam
:path: xml
.. doxygenstruct:: pj::PresNotifyParam
:path: xml
Other
+++++
.. doxygenclass:: pj::FindBuddyMatch
:path: xml
:members:

View File

@ -1,113 +0,0 @@
Appendix: Generating This Documentation
=======================================
Requirements
------------
This documentation is created with `Sphinx <http://sphinx-doc.org>`_ and `Breathe <http://michaeljones.github.io/breathe/index.html>`_. Here are the required tools:
1. Doxygen is required. `Install <http://www.stack.nl/~dimitri/doxygen/download.html#srcbin>`_ it for your platform.
2. The easiest way to install all the tools is with `Python Package Index (PyPI) <http://pypi.python.org>`_. Just run this and it will install Sphinx, Breathe, and all the required tools if they are not installed::
$ sudo pip install breathe
3. Otherwise if PyPI is not available, consult Sphinx and Breathe sites for installation instructions and you may need to install these manually:
- `Sphinx <http://sphinx-doc.org>`_
- `Breathe <http://michaeljones.github.io/breathe/index.html>`_
- docutils
- Pygments
Rendering The Documentation
------------------------------
The main source of the documentation is currently the '''Trac''' pages at https://trac.pjsip.org/repos/wiki/pjsip-doc/index. The copies in SVN are just copies for backup.
To render the documentation as HTML in `_build/html` directory::
$ cd $PJDIR/doc/pjsip-book
$ python fetch_trac.py
$ make
To build PDF, run::
$ make latexpdf
How to Use Integrate Book with Doxygen
--------------------------------------
Quick sample::
will be rendered like this:
+++++++++++++++++++++++++++
This is how to quote a code with syntax coloring:
.. code-block:: c++
pj::AudioMediaPlayer *player = new AudioMediaPlayer;
player->createPlayer("announcement.wav");
There are many ways to refer a symbol:
* A method: :cpp:func:`pj::AudioMediaPlayer::createPlayer()`
* A method with alternate display: :cpp:func:`a method <pj::AudioMediaPlayer::createPlayer()>`
* A class :cpp:class:`pj::AudioMediaPlayer`
* A class with alternate display: :cpp:class:`a class <pj::AudioMediaPlayer>`
For that links to work, we need to display the link target declaration (a class or method)
somewhere in the doc, like this:
.. doxygenclass:: pj::AudioMediaPlayer
:path: xml
:members:
Alternatively we can display a single method declaration like this:
.. doxygenfunction:: pj::AudioMediaPlayer::createPlayer()
:path: xml
:no-link:
We can also display class declaration with specific members.
For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_
.. default-domain:: cpp
will be rendered like this:
+++++++++++++++++++++++++++
This is how to quote a code with syntax coloring:
.. code-block:: c++
pj::AudioMediaPlayer *player = new AudioMediaPlayer;
player->createPlayer("announcement.wav");
There are many ways to refer a symbol:
* A method: :cpp:func:`pj::AudioMediaPlayer::createPlayer()`
* A method with alternate display: :cpp:func:`a method <pj::AudioMediaPlayer::createPlayer()>`
* A class :cpp:class:`pj::AudioMediaPlayer`
* A class with alternate display: :cpp:class:`a class <pj::AudioMediaPlayer>`
For that links to work, we need to display the link target declaration (a class or method) somewhere in the doc, like this:
.. doxygenclass:: pj::AudioMediaPlayer
:path: xml
:members:
Alternatively we can display a single method declaration like this:
.. doxygenfunction:: pj::AudioMediaPlayer::createPlayer()
:path: xml
:no-link:
We can also display class declaration with specific members.
For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_

View File

@ -1,244 +0,0 @@
Calls
=====
Calls are represented by Call class.
Subclassing the Call Class
------------------------------------
To use the Call class, normally application SHOULD create its own subclass, such as:
.. code-block:: c++
class MyCall : public Call
{
public:
MyCall(Account &acc, int call_id = PJSUA_INVALID_ID)
: Call(acc, call_id)
{ }
~MyCall()
{ }
// Notification when call's state has changed.
virtual void onCallState(OnCallStateParam &prm);
// Notification when call's media state has changed.
virtual void onCallMediaState(OnCallMediaStateParam &prm);
};
In its subclass, application can implement the call callbacks, which is basically used to process events related to the call, such as call state change or incoming call transfer request.
Making Outgoing Calls
--------------------------------------
Making outgoing call is simple, just invoke makeCall() method of the Call object. Assuming you have the Account object as acc variable and destination URI string in dest_uri, you can initiate outgoing call with the snippet below:
.. code-block:: c++
Call *call = new MyCall(*acc);
CallOpParam prm(true); // Use default call settings
try {
call->makeCall(dest_uri, prm);
} catch(Error& err) {
cout << err.info() << endl;
}
The snippet above creates a Call object and initiates outgoing call to dest_uri using the default call settings. Subsequent operations to the call can use the method in the call instance, and events to the call will be reported to the callback. More on the callback will be explained a bit later.
Receiving Incoming Calls
--------------------------------------
Incoming calls are reported as onIncomingCall() of the Account class. You must derive a class from the Account class to handle incoming calls.
Below is a sample code of the callback implementation:
.. code-block:: c++
void MyAccount::onIncomingCall(OnIncomingCallParam &iprm)
{
Call *call = new MyCall(*this, iprm.callId);
CallOpParam prm;
prm.statusCode = PJSIP_SC_OK;
call->answer(prm);
}
For incoming calls, the call instance is created in the callback function as shown above. Application should make sure to store the call instance during the lifetime of the call (that is until the call is disconnected).
Call Properties
----------------
All call properties such as state, media state, remote peer information, etc. are stored as CallInfo class, which can be retrieved from the call object with using getInfo() method of the Call.
Call Disconnection
-------------------
Call disconnection event is a special event since once the callback that reports this event returns, the call is no longer valid and any operations invoked to the call object will raise error exception. Thus, it is recommended to delete the call object inside the callback.
The call disconnection is reported in onCallState() method of Call and it can be detected as follows:
.. code-block:: c++
void MyCall::onCallState(OnCallStateParam &prm)
{
CallInfo ci = getInfo();
if (ci.state == PJSIP_INV_STATE_DISCONNECTED) {
/* Delete the call */
delete this;
}
}
Working with Call's Audio Media
-------------------------------------------------
You can only operate with the call's audio media (e.g. connecting the call to the sound device in the conference bridge) when the call's audio media is ready (or active). The changes to the call's media state is reported in onCallMediaState() callback, and if the calls audio media is ready (or active) the function Call.getMedia() will return a valid audio media.
Below is a sample code to connect the call to the sound device when the media is active:
.. code-block:: c++
void MyCall::onCallMediaState(OnCallMediaStateParam &prm)
{
CallInfo ci = getInfo();
// Iterate all the call medias
for (unsigned i = 0; i < ci.media.size(); i++) {
if (ci.media[i].type==PJMEDIA_TYPE_AUDIO && getMedia(i)) {
AudioMedia *aud_med = (AudioMedia *)getMedia(i);
// Connect the call audio media to sound device
AudDevManager& mgr = Endpoint::instance().audDevManager();
aud_med->startTransmit(mgr.getPlaybackDevMedia());
mgr.getCaptureDevMedia().startTransmit(*aud_med);
}
}
}
When the audio media becomes inactive (for example when the call is put on hold), there is no need to stop the audio media's transmission to/from the sound device since the call's audio media will be removed automatically from the conference bridge when it's no longer valid, and this will automatically remove all connections to/from the call.
Call Operations
-------------------
You can invoke operations to the Call object, such as hanging up, putting the call on hold, sending re-INVITE, etc. Please see the reference documentation of Call for more info.
Instant Messaging(IM)
---------------------
You can send IM within a call using Call.sendInstantMessage(). The transmission status of outgoing instant messages is reported in Call.onInstantMessageStatus() callback method.
In addition to sending instant messages, you can also send typing indication using Call.sendTypingIndication().
Incoming IM and typing indication received within a call will be reported in the callback functions Call.onInstantMessage() and Call.onTypingIndication().
Alternatively, you can send IM and typing indication outside a call by using Buddy.sendInstantMessage() and Buddy.sendTypingIndication(). For more information, please see Presence documentation.
Class Reference
---------------
Call
++++
.. doxygenclass:: pj::Call
:path: xml
:members:
Settings
++++++++
.. doxygenstruct:: pj::CallSetting
:path: xml
Info and Statistics
+++++++++++++++++++
.. doxygenstruct:: pj::CallInfo
:path: xml
.. doxygenstruct:: pj::CallMediaInfo
:path: xml
.. doxygenstruct:: pj::StreamInfo
:path: xml
.. doxygenstruct:: pj::StreamStat
:path: xml
.. doxygenstruct:: pj::JbufState
:path: xml
.. doxygenstruct:: pj::RtcpStat
:path: xml
.. doxygenstruct:: pj::RtcpStreamStat
:path: xml
.. doxygenstruct:: pj::MathStat
:path: xml
.. doxygenstruct:: pj::MediaTransportInfo
:path: xml
Callback Parameters
+++++++++++++++++++
.. doxygenstruct:: pj::OnCallStateParam
:path: xml
.. doxygenstruct:: pj::OnCallTsxStateParam
:path: xml
.. doxygenstruct:: pj::OnCallMediaStateParam
:path: xml
.. doxygenstruct:: pj::OnCallSdpCreatedParam
:path: xml
.. doxygenstruct:: pj::OnStreamCreatedParam
:path: xml
.. doxygenstruct:: pj::OnStreamDestroyedParam
:path: xml
.. doxygenstruct:: pj::OnDtmfDigitParam
:path: xml
.. doxygenstruct:: pj::OnCallTransferRequestParam
:path: xml
.. doxygenstruct:: pj::OnCallTransferStatusParam
:path: xml
.. doxygenstruct:: pj::OnCallReplaceRequestParam
:path: xml
.. doxygenstruct:: pj::OnCallReplacedParam
:path: xml
.. doxygenstruct:: pj::OnCallRxOfferParam
:path: xml
.. doxygenstruct:: pj::OnCallRedirectedParam
:path: xml
.. doxygenstruct:: pj::OnCallMediaEventParam
:path: xml
.. doxygenstruct:: pj::OnCallMediaTransportStateParam
:path: xml
.. doxygenstruct:: pj::OnCreateMediaTransportParam
:path: xml
.. doxygenstruct:: pj::CallOpParam
:path: xml
.. doxygenstruct:: pj::CallSendRequestParam
:path: xml
.. doxygenstruct:: pj::CallVidSetStreamParam
:path: xml
Other
+++++
.. doxygenstruct:: pj::MediaEvent
:path: xml
.. doxygenstruct:: pj::MediaFmtChangedEvent
:path: xml
.. doxygenstruct:: pj::SdpSession
:path: xml
.. doxygenstruct:: pj::RtcpSdes
:path: xml

View File

@ -1,256 +0,0 @@
# -*- coding: utf-8 -*-
#
# The PJSIP Book documentation build configuration file, created by
# sphinx-quickstart on Sat Nov 30 06:36:26 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ 'breathe', 'sphinx.ext.todo', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'PJSUA2 Documentation'
copyright = u'2014, Teluu Ltd.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0-alpha'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'PJSUA2Doc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'PJSUA2Doc.tex', u'PJSUA2 Documentation',
u'Sauw Ming Liong, Benny Prijono', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'pjsua2doc', u'PJSUA2 Documentation',
[u'Sauw Ming Liong', u'Benny Prijono'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'PJSUA2Doc', u'PJSUA2 Documentation',
u'Sauw Ming Liong@*Benny Prijono', 'ThePJSIPBook', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
breathe_projects = {
"pjsua2": "xml/",
}
breathe_default_project = "pjsua2"
breathe_projects_source = {
"pjsua2":"../../pjsip/include/pjsua2"
}
breathe_domain_by_extension = {
"hpp":"cpp"
}

View File

@ -1,215 +0,0 @@
Development Guidelines and Considerations
*****************************************
Development Guidelines
======================
Preparation
------------
* **Essential:** Familiarise yourself with SIP. You don't need to be an expert, but SIP knowledge is essential.
* Check out our features in `Datasheet <http://trac.pjsip.org/repos/wiki/PJSIP-Datasheet>`_. Other features may be provided by our `community <http://trac.pjsip.org/repos/wiki/Projects_Using_PJSIP>`_.
* All PJSIP documentation is indexed in our `Trac site <http://trac.pjsip.org/repos>`_.
Development
-------------
* **Essential:** Follow the `Getting Started <http://trac.pjsip.org/repos/wiki/Getting-Started>`_ instructions to build PJSIP for your platform.
* **Essential:** Interactive debugging capability is essential during development
* Start with default settings in `<pj/config_site_sample.h>`. The default settings should be good to get you started. You can always optimize later after things are running okay.
Coding Style
-------------
**Essential:** set your editor to use 8 characters tab size in order to see PJSIP source correctly.
Detailed below is the PJSIP coding style. You don't need to follow it unless you are submitting patches to PJSIP:
* Indentation uses tabs and spaces. Tab size is 8 characters, indentation 4.
* All public API in header file must be documented in Doxygen format.
* Apart from that, we mostly just use `K & R style <http://en.wikipedia.org/wiki/1_true_brace_style#K.26R_style>`_, which is the only correct style anyway.
Deployment
-----------
* **Essential:** Logging is essential when troubleshooting any problems. The application MUST be equipped with logging capability. Enable PJSIP log at level 5.
Platform Consideration
========================
Platform selection is usually driven by business motives. The selection will affect all aspects of development, and here we will cover considerations for each platforms that we support.
Windows Desktop
---------------
Windows is supported from Windows 2000 up to the recent Windows 8 and beyond. All features are expected to work. 64bit support was added recently. Development is based on Visual Studio. Considerations for this platform include:
#. Because Visual Studio file format keeps changing on every release, we decided to support the lowest denominator, namely Visual Studio 2005. Unfortunately the project upgrade procedure fails on Visual Studio 2010, and we don't have any solution for that. VS 2008 and VS 2012 onwards should work.
MacOS X
-------
All features are expected to work. Considerations include:
#. Development with XCode is currently not supported. This is **not** to say that you cannot use XCode, but PJSIP only provides basic Makefiles and if you want to use XCode you'd need to arrange the project yourself.
#. Mac systems typically provides very good sound device, so we don't expect any problems with audio on Mac.
Linux Desktop
-------------
All features are expected to work. Linux considerations:
#. Use our native ALSA backend instead of PortAudio because ALSA has less jitter than OSS and our backend is more lightweight than PortAudio
iOS for iPhone, iPad, and iPod Touch
------------------------------------
All features except video are expected to work (video is coming soon!). Considerations for iOS:
#. You need to use TCP transport for SIP for the background feature to work
#. IP change (for example when user is changing access point) is a feature frequently asked by developers and you can find the documentation here: http://trac.pjsip.org/repos/wiki/IPAddressChange
#. There are some specific issues for iOS 7 and beyond, please see http://trac.pjsip.org/repos/ticket/1697
#. If SSL is needed, you need to compile OpenSSL for iOS
Android
-------
All features except video are expected to work (video is coming soon!). Considerations for Android:
#. You can only use PJSUA2 Java binding for this target.
#. It has been reported that Android audio device is not so good in general, so some audio tuning may be needed. Echo cancellation also needs to be checked.
#. This is also a new platform for us.
Symbian
-------
Symbian has been supported for a long time. In general all features (excluding video) are expected to work, but we're not going to do Symbian specific development anymore. Other considerations for Symbian:
#. The MDA audio is not very good (it has high latency), so normally you'd want to use Audio Proxy Server (APS) or VoIP Audio Service (VAS) for the audio device, which we support. Using these audio backends will also provide us with high quality echo cancellation as well as low bitrate codecs such as AMR-NB, G.729, and iLBC. But VAS and APS requires purchase of Nokia development certificate to sign the app, and also since APS and VAS only run on specific device type, you need to package the app carefully and manage the deployment to cover various device types.
BlackBerry 10
-------------
BlackBerry 10 (BB10) is supported since PJSIP version 2.2. As this is a relatively new platform for us, we are currently listening to developer's feedback regarding the port. But so far it seems to be working well. Some considerations for BB10 platform include:
#. IP change (for example when user is changing access point) is a feature frequently asked by developers and you can find the documentation here: http://trac.pjsip.org/repos/wiki/IPAddressChange
Windows Mobile
--------------
This is the old Windows Mobile platform that is based on WinCE. This platform has been supported for a long time. We expect all features except video to work, but there may be some errors every now and then because this target is not actively maintained. No new development will be done for this platform.
Other considerations for Windows Mobile platform are:
#. The quality of audio device on WM varies a lot, and this affects audio latency. Audio latency could go as high as hundreds of millisecond on bad hardware.
#. Echo cancellation could be a problem. We can only use basic echo suppressor due to hardware limitation, and combined with bad quality of audio device, it may cause ineffective echo cancellation. This could be mitigated by setting the audio level to low.
Windows Phone 8
---------------
Windows Phone 8 (WP8) support is being added and is still under development on `projects/winphone` branch. Specific considerations for this platform are:
#. WP8 governs specific interaction with WP8 GUI and framework that needs to be followed by application in order to make VoIP call work seamlessly on the device. Some lightweight process will be created by WP8 framework in order for background call to work and PJSIP needs to put its background processing in this process' context. Currently this feature is under development.
Embedded Linux
--------------
In general embedded Linux support is similar to Linux and we find no problems with it. We found some specific considerations for embedded Linux as follows:
#. The performance of the audio device is probably the one with most issues, as some development boards does not have a decent sound device. Typically there is high audio jitter (or burst) and latency. This will affect end to end audio latency and also the performance of the echo canceller. Also we found that ALSA generally works better than OSS, so if you can have ALSA up and running that will be better. Use our native ALSA backend audio device instead of PortAudio since it is simpler and lighter.
QNX or Other Posix Embedded OS
------------------------------
This is not part of our officially supported OS platforms, but users have run PJSIP on QNX and BlackBerry 10 is based on QNX too. Since QNX provides Posix API, and maybe by using the settings found in the configure-bb10 script, PJSIP should be able to run on it, but you need to develop PJMEDIA sound device wrapper for your audio device. Other than this, we don't have enough experience to comment on the platform.
Other Unix Desktop OSes
-----------------------
Community members, including myself, have occasionally run PJSIP on other Unix OSes such as Solaris, FreeBSD, and OpenBSD. We expect PJSIP to run on these platforms (maybe with a little kick).
Porting to Other Embedded OS
------------------------------
It is possible to port PJSIP to other embedded OS or even directly to device without OS and people have done so. In general, the closer resemblance the new OS to existing supported OS, the easier the porting job will be. The good thing is, PJSIP has been made to be very very portable, and system dependent features are localized in PJLIB and PJMEDIA audio device, so the effort is more quantifiable. Once you are able to successfully run *pjlib-test*, you are more or less there with your porting effort. Other than that, if you really want to port PJSIP to new platform, you probably already know what you're doing.
Which API to Use
================
PJSIP, PJMEDIA, and PJNATH Level
--------------------------------
At the lowest level we have the individual PJSIP **C** libraries, which consist of PJSIP, PJMEDIA, and PJNATH, with PJLIB-UTIL and PJLIB as support libraries. This level provides the most flexibility, but it's also the hardest to use. The only reason you'd want to use this level is if:
#. You only need the individual library (say, PJNATH)
#. You need to be very very tight in footprint (say when things need to be measured in Kilobytes instead of Megabytes)
#. You are **not** developing a SIP client
Use the corresponding PJSIP, PJMEDIA, PJNATH manuals from http://trac.pjsip.org/repos/ for information on how to use the libraries. If you use PJSIP, the PJSIP Developer's Guide (PDF) from that page provides in-depth information about PJSIP library.
PJSUA-LIB API
-------------
Next up is PJSUA-LIB API that combines all those libraries into a high level, integrated client user agent library written in C. This is the library that most PJSIP users use, and the highest level abstraction before pjsua2 was created.
Motivations for using PJSUA-LIB library includes:
#. Developing client application (PJSUA-LIB is optimized for developing client app)
#. Better efficiency than higher level API
PJSUA2 C++ API
--------------
pjsua2 is a new, objected oriented, C++ API created on top of PJSUA-LIB. The API is different than PJSUA-LIB, but it should be even easier to use and it should have better documentation too (such as this book). The pjsua2 API removes most cruxes typically associated with PJSIP, such as the pool and pj_str_t, and add new features such as object persistence so you can save your configs to a file, for example. All data structures are rewritten for more clarity.
A C++ application can use pjsua2 natively, while at the same time still has access to the lower level objects if it needs to. This means that the C++ application should not lose any information from using the C++ abstraction, compared to if it is using PJSUA-LIB directly. The C++ application also should not lose the ability to extend the library. It would still be able to register a custom PJSIP module, pjmedia_port, pjmedia_transport, and so on.
Benefits of using pjsua2 C++ API include:
#. Cleaner object oriented API
#. Uniform API for higher level language such as Java and Python
#. Persistence API
#. The ability to access PJSUA-LIB and lower level libraries when needed (including the ability to extend the libraries, for example creating custom PJSIP module, pjmedia_port, pjmedia_transport, etc.)
Some considerations on PJSUA2 C++ API are:
#. Instead of returning error, the API uses exception for error reporting
#. It uses standard C++ library (STL)
#. The performance penalty due to the API abstraction should be negligible on typical modern device
PJSUA2 API for Java, Python, and Others
---------------------------------------
The PJSUA2 API is also available for non-native code via SWIG binding. Configurations for Java and Python are provided with the distribution. Thanks to SWIG, other language bindings may be generated relatively easily.
The pjsua2 API for non-native code is effectively the same as pjsua2 C++ API. However, unlike C++, you cannot access PJSUA-LIB and the underlying C libraries from the scripting language, hence you are limited to what pjsua2 provides.
You can use this API if native application development is not available in target platform (such as Android), or if you prefer to develop with non-native code instead of C/C++.
Network and Infrastructure Considerations
=========================================
NAT Issues
----------
TBD.
TCP Requirement
---------------
If you support iOS devices in your service, you need to use TCP, because only TCP will work on iOS device when it is in background mode. This means your infrastructure needs to support TCP.
Sound Device
============
Latency
-------
TBD.
Echo Cancellation
-----------------
TBD.

View File

@ -1,172 +0,0 @@
Endpoint
************
The Endpoint class is a singleton class, and application MUST create one and at most one of this class instance before it can do anything else, and similarly, once this class is destroyed, application must NOT call any library API. This class is the core class of PJSUA2, and it provides the following functions:
- Starting up and shutting down
- Customization of configurations, such as core UA (User Agent) SIP configuration, media configuration, and logging configuration
This chapter will describe the functions above.
To use the Endpoint class, normally application does not need to subclass it unless:
- application wants to implement/override Endpoints callback methods to get the events such as transport state change or NAT detection completion, or
- application schedules a timer using Endpoint.utilTimerSchedule() API. In this case, application needs to implement the onTimer() callback to get the notification when the timer expires.
Instantiating the Endpoint
--------------------------
Before anything else, you must instantiate the Endpoint class::
Endpoint *ep = new Endpoint;
Once the endpoint is instantiated, you can retrieve the Endpoint instance using Endpoint.instance() static method.
Creating the Library
----------------------
Create the library by calling its libCreate() method:
.. code-block:: c++
try {
ep->libCreate();
} catch(Error& err) {
cout << "Startup error: " << err.info() << endl;
}
The libCreate() method will raise exception if error occurs, so we need to trap the exception using try/catch clause as above.
Initializing the Library and Configuring the Settings
----------------------------------------------------------------------------
The EpConfig class provides endpoint configuration which allows the customization of the following settings:
- UAConfig, to specify core SIP user agent settings.
- MediaConfig, to specify various media *global* settings
- LogConfig, to customize logging settings.
Note that some settings can be further specified on per account basis, in the AccountConfig.
To customize the settings, create instance of EpConfig class and specify them during the endpoint initialization (will be explained more later), for example:
.. code-block:: c++
EpConfig ep_cfg;
ep_cfg.logConfig.level = 5;
ep_cfg.uaConfig.maxCalls = 4;
ep_cfg.mediaConfig.sndClockRate = 16000;
Next, you can initialize the library by calling libInit():
.. code-block:: c++
try {
EpConfig ep_cfg;
// Specify customization of settings in ep_cfg
ep->libInit(ep_cfg);
} catch(Error& err) {
cout << "Initialization error: " << err.info() << endl;
}
The snippet above initializes the library with the default settings.
Creating One or More Transports
--------------------------------------------------
Application needs to create one or more transports before it can send or receive SIP messages:
.. code-block:: c++
try {
TransportConfig tcfg;
tcfg.port = 5060;
TransportId tid = ep->transportCreate(PJSIP_TRANSPORT_UDP, tcfg);
} catch(Error& err) {
cout << "Transport creation error: " << err.info() << endl;
}
The transportCreate() method returns the newly created Transport ID and it takes the transport type and TransportConfig object to customize the transport settings like bound address and listening port number. Without this, by default the transport will be bound to INADDR_ANY and any available port.
There is no real use of the Transport ID, except to create userless account (with Account.create(), as will be explained later), and perhaps to display the list of transports to user if the application wants it.
Starting the Library
--------------------
Now we're ready to start the library. We need to start the library to finalize the initialization phase, e.g. to complete the initial STUN address resolution, initialize/start the sound device, etc. To start the library, call libStart() method:
.. code-block:: c++
try {
ep->libStart();
} catch(Error& err) {
cout << "Startup error: " << err.info() << endl;
}
Shutting Down the Library
--------------------------------------
Once the application exits, the library needs to be shutdown so that resources can be released back to the operating system. Although this can be done by deleting the Endpoint instance, which will internally call libDestroy(), it is better to call it manually because on Java or Python there are problems with garbage collection as explained earlier:
.. code-block:: c++
ep->libDestroy();
delete ep;
Class Reference
---------------
The Endpoint
++++++++++++
.. doxygenclass:: pj::Endpoint
:path: xml
:members:
Endpoint Configurations
+++++++++++++++++++++++
Endpoint
~~~~~~~~
.. doxygenstruct:: pj::EpConfig
:path: xml
Media
~~~~~
.. doxygenstruct:: pj::MediaConfig
:path: xml
Logging
~~~~~~~
.. doxygenstruct:: pj::LogConfig
:path: xml
.. doxygenclass:: pj::LogWriter
:path: xml
:members:
.. doxygenstruct:: pj::LogEntry
:path: xml
User Agent
~~~~~~~~~~
.. doxygenstruct:: pj::UaConfig
:path: xml
Callback Parameters
+++++++++++++++++++
.. doxygenstruct:: pj::OnNatDetectionCompleteParam
:path: xml
.. doxygenstruct:: pj::OnNatCheckStunServersCompleteParam
:path: xml
.. doxygenstruct:: pj::OnTimerParam
:path: xml
.. doxygenstruct:: pj::OnTransportStateParam
:path: xml
.. doxygenstruct:: pj::OnSelectAccountParam
:path: xml
Other
+++++
.. doxygenstruct:: pj::PendingJob
:path: xml

View File

@ -1,91 +0,0 @@
import urllib2
import sys
import unicodedata
def fetch_rst(url):
print 'Fetching %s..' % url
req = urllib2.Request(url)
fd = urllib2.urlopen(req, timeout=30)
body = fd.read()
body = body.replace("\r\n", "\n")
body = body.decode('utf8', 'ignore').encode('ascii', 'ignore')
pos = body.find("{{{")
if pos >= 0:
body = body[pos+4:]
pos = body.find("}}}")
if pos >= 0:
body = body[:pos]
pos = body.find("#!rst")
if pos >= 0:
body = body[pos+6:]
pos = url.rfind("/")
if pos >= 0:
filename = url[pos+1:]
else:
filename = url
pos = filename.find('?')
if pos >= 0:
filename = filename[:pos]
filename += ".rst"
f = open(filename, 'w')
f.write(body)
f.close()
def process_index(index):
pages = []
f = open(index + '.rst', 'r')
line = f.readline()
while line:
if line.find('toctree::') >= 0:
break
line = f.readline()
if line.find('toctree::') < 0:
return []
# Skip directive (or whatever it's called
line = f.readline().strip()
while line and line[0] == ':':
line = f.readline().strip()
# Skip empty lines
line = f.readline().strip()
while not line:
line = f.readline().strip()
# Parse names
while line:
pages.append(line)
line = f.readline().strip()
f.close()
return pages
if __name__ == '__main__':
print "** Warning: This will overwrite ALL RST files in current directory. Continue? [n] ",
if sys.stdin.readline().strip() != 'y':
sys.exit(0)
url_format = 'http://trac.pjsip.org/repos/wiki/pjsip-doc/%s?format=txt'
index = url_format % ('index')
fetch_rst(index)
pages = process_index('index')
for page in pages:
#if not 'endpoint' in page:
# continue
url = url_format % (page)
fetch_rst(url)
print 'Done.'

View File

@ -1,36 +0,0 @@
.. PJSUA2 documentation master file, created by
sphinx-quickstart on Sat Nov 30 06:36:26 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
PJSUA2 Documentation
==========================================
Contents:
.. toctree::
:maxdepth: 2
:numbered: 1
intro
consider
intro_pjsua2
endpoint
account
media
call
presence
samples
media_quality
network_problems
reference
breathe
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,26 +0,0 @@
Introduction
*******************************
This documentation is intended for developers looking to develop Session Initiation Protocol (SIP) based client application. Some knowledge on SIP is definitely required, and of course some programming experience. Prior knowledge of PJSUA C API is not needed, although it will probably help.
PJSIP libraries provide multi-level APIs to do SIP calls, presence, and instant messaging, as well as handling media and NAT traversal. PJSUA2 API is the highest API from PJSIP, on top of PJSUA-LIB API. PJSUA-LIB API itself is a library that unifies SIP, audio/video media, NAT traversal, and client media application best practices into a high level, integrated, and easy to use API. The next chapter will guide you on selecting which API level to use depending on your requirements.
This documentation can be `viewed online <http://www.pjsip.org/docs/book-latest/html/index.html>`_, or alternatively you can `download the PDF format <http://www.pjsip.org/docs/book-latest/PJSUA2Doc.pdf>`_ for offline viewing.
Getting Started with PJSIP
==============================
Check `PJSIP Datasheet <http://trac.pjsip.org/repos/wiki/PJSIP-Datasheet>`_ to make sure that it has the features that you require.
To start using PJSIP, the `Getting Started Guide <http://trac.pjsip.org/repos/wiki/Getting-Started>`_ contains instructions to acquire and build PJSIP on various platforms that we support.
PJSIP Info and Documentation
================================
To get other relevant info and documentations about PJSIP, you can visit:
- `PJSIP General Wiki <http://trac.pjsip.org/repos/wiki>`_ is the home for all documentation
- `PJSIP FAQ <http://trac.pjsip.org/repos/wiki/FAQ>`_
- `PJSIP Reference Manual <http://trac.pjsip.org/repos/wiki>`_ - please see Reference Manual section

View File

@ -1,306 +0,0 @@
PJSUA2-High Level API
******************************
PJSUA2 is an object-oriented abstraction above PJSUA API. It provides high level API for constructing Session Initiation Protocol (SIP) multimedia user agent applications (a.k.a Voice over IP/VoIP softphones). It wraps together the signaling, media, and NAT traversal functionality into easy to use call control API, account management, buddy list management, presence, and instant messaging, along with multimedia features such as local conferencing, file streaming, local playback, and voice recording, and powerful NAT traversal techniques utilizing STUN, TURN, and ICE.
PJSUA2 is implemented on top of PJSUA-LIB API. The SIP and media features and object modelling follows what PJSUA-LIB provides (for example, we still have accounts, call, buddy, and so on), but the API to access them is different. These features will be described later in this chapter. PJSUA2 is a C++ library, which you can find under ``pjsip`` directory in the PJSIP distribution. The C++ library can be used by native C++ applications directly. But PJSUA2 is not just a C++ library. From the beginning, it has been designed to be accessible from high level non-native languages such as Java and Python. This is achieved by SWIG binding. And thanks to SWIG, binding to other languages can be added relatively easily in the future.
PJSUA2 API declaration can be found in ``pjsip/include/pjsua2`` while the source codes are located in ``pjsip/src/pjsua2``. It will be automatically built when you compile PJSIP.
PJSUA2 Main Classes
======================
Here are the main classes of the PJSUA2:
Endpoint
--------------
This is the main class of PJSUA2. You need to instantiate one and exactly one of this class, and from the instance you can then initialize and start the library.
Account
-------------
An account specifies the identity of the person (or endpoint) on one side of SIP conversation. At least one account instance needs to be created before anything else, and from the account instance you can start making/receiving calls as well as adding buddies.
Media
----------
This is an abstract base class that represents a media element which is capable to either produce media or takes media. It is then subclassed into ``AudioMedia``, which is then subclassed into concrete classes such as ``AudioMediaPlayer`` and ``AudioMediaRecorder``.
Call
------
This class represents an ongoing call (or speaking technically, an INVITE session) and can be used to manipulate it, such as to answer the call, hangup the call, put the call on hold, transfer the call, etc.
Buddy
---------
This class represents a remote buddy (a person, or a SIP endpoint). You can subscribe to presence status of a buddy to know whether the buddy is online/offline/etc., and you can send and receive instant messages to/from the buddy.
General Concepts
==================
Class Usage Patterns
---------------------
With the methods of the main classes above, you will be able to invoke various operations to the object quite easily. But how can we get events/notifications from these classes? Each of the main classes above (except Media) will get their events in the callback methods. So to handle these events, just derive a class from the corresponding class (Endpoint, Call, Account, or Buddy) and implement/override the relevant method (depending on which event you want to handle). More will be explained in later sections.
Error Handling
---------------
We use exceptions as means to report error, as this would make the program flows more naturally. Operations which yield error will raise Error exception. If you prefer to display the error in more structured manner, the Error class has several members to explain the error, such as the operation name that raised the error, the error code, and the error message itself.
Asynchronous Operations
-------------------------
If you have developed applications with PJSIP, you'll know about this already. In PJSIP, all operations that involve sending and receiving SIP messages are asynchronous, meaning that the function that invokes the operation will complete immediately, and you will be given the completion status as callbacks.
Take a look for example the makeCall() method of the Call class. This function is used to initiate outgoing call to a destination. When this function returns successfully, it does not mean that the call has been established, but rather it means that the call has been initiated successfully. You will be given the report of the call progress and/or completion in the onCallState() callback method of Call class.
Threading
----------
For platforms that require polling, the PJSUA2 module provides its own worker thread to poll PJSIP, so it is not necessary to instantiate own your polling thread. Having said that the application should be prepared to have the callbacks called by different thread than the main thread. The PJSUA2 module itself is thread safe.
Often though, especially if you use PJSUA2 with high level languages such as Python, it is required to disable PJSUA2 internal worker threads by setting EpConfig.uaConfig.threadCnt to 0, because the high level environment doesn't like to be called by external thread (such as PJSIP's worker thread).
Problems with Garbage Collection
--------------------------------
Garbage collection (GC) exists in Java and Python (and other languages, but we don't support those for now), and there are some problems with it when it comes to PJSUA2 usage:
- it delays the destruction of objects (including PJSUA2 objects), causing the code in object's destructor to be executed out of order
- the GC operation may run on different thread not previously registered to PJLIB, causing assertion
Due to problems above, application '''MUST immediately destroy PJSUA2 objects using object's delete() method (in Java)''', instead of relying on the GC to clean up the object.
For example, to delete an Account, it's **NOT** enough to just let it go out of scope. Application MUST delete it manually like this (in Java):
.. code-block:: c++
acc.delete();
Objects Persistence
---------------------
PJSUA2 includes PersistentObject class to provide functionality to read/write data from/to a document (string or file). The data can be simple data types such as boolean, number, string, and string arrays, or a user defined object. Currently the implementation supports reading and writing from/to JSON document ([http://tools.ietf.org/html/rfc4627 RFC 4627]), but the framework allows application to extend the API to support other document formats.
As such, classes which inherit from PersistentObject, such as EpConfig (endpoint configuration), AccountConfig (account configuration), and BuddyConfig (buddy configuration) can be loaded/saved from/to a file. Heres an example to save a config to a file:
.. code-block:: c++
EpConfig epCfg;
JsonDocument jDoc;
epCfg.uaConfig.maxCalls = 61;
epCfg.uaConfig.userAgent = "Just JSON Test";
jDoc.writeObject(epCfg);
jDoc.saveFile("jsontest.js");
To load from the file:
.. code-block:: c++
EpConfig epCfg;
JsonDocument jDoc;
jDoc.loadFile("jsontest.js");
jDoc.readObject(epCfg);
Building PJSUA2
======================
The PJSUA2 C++ library will be built by default by PJSIP build system. Standard C++ library is required.
Building Python and Java SWIG Modules
======================================
The SWIG modules for Python and Java are built by invoking ``make`` and ``make install`` manually from ``pjsip-apps/src/swig`` directory. The ``make install`` will install the Python SWIG module to user's ``site-packages`` directory.
Requirements
------------
#. `SWIG <http://www.swig.org>`_
#. ``JDK``.
#. ``Python``, version 2.7 or above is required.
For **Linux/UNIX**, you will also need ``Python developent package`` (called ``python-devel`` (e.g. on Fedora) or ``python2.7-dev`` (e.g. on Ubuntu)). For **Windows**, you will need MinGW and ``Python SDK`` such as `ActivePython-2.7.5`_ from `ActiveState`_.
.. _`ActivePython-2.7.5`: http://www.activestate.com/activepython/downloads
.. _`ActiveState`: http://www.activestate.com
Testing The Installation
------------------------
To test the installation, simply run python and import ``pjsua2`` module::
$ python
> import pjsua2
> ^Z
Using in C++ Application
========================
As mentioned in previous chapter, a C++ application can use *pjsua2* natively, while at the same time still has access to the lower level objects and the ability to extend the libraries if it needs to. Using the API will be exactly the same as the API reference that is written in this book.
Here is a sample complete C++ application to give you some idea about the API. The snippet below initializes the library and creates an account that registers to our pjsip.org SIP server.
.. code-block:: c++
#include <pjsua2.hpp>
#include <iostream>
using namespace pj;
// Subclass to extend the Account and get notifications etc.
class MyAccount : public Account {
public:
virtual void onRegState(OnRegStateParam &prm) {
AccountInfo ai = getInfo();
std::cout << (ai.regIsActive? "*** Register:" : "*** Unregister:")
<< " code=" << prm.code << std::endl;
}
};
int main()
{
Endpoint ep;
ep.libCreate();
// Initialize endpoint
EpConfig ep_cfg;
ep.libInit( ep_cfg );
// Create SIP transport. Error handling sample is shown
TransportConfig tcfg;
tcfg.port = 5060;
try {
ep.transportCreate(PJSIP_TRANSPORT_UDP, tcfg);
} catch (Error &err) {
std::cout << err.info() << std::endl;
return 1;
}
// Start the library (worker threads etc)
ep.libStart();
std::cout << "*** PJSUA2 STARTED ***" << std::endl;
// Configure an AccountConfig
AccountConfig acfg;
acfg.idUri = "sip:test@pjsip.org";
acfg.regConfig.registrarUri = "sip:pjsip.org";
AuthCredInfo cred("digest", "*", "test", 0, "secret");
acfg.sipConfig.authCreds.push_back( cred );
// Create the account
MyAccount *acc = new MyAccount;
acc->create(acfg);
// Here we don't have anything else to do..
pj_thread_sleep(10000);
// Delete the account. This will unregister from server
delete acc;
// This will implicitly shutdown the library
return 0;
}
Using in Python Application
===========================
The equivalence of the C++ sample code above in Python is as follows:
.. code-block:: python
# Subclass to extend the Account and get notifications etc.
class Account(pj.Account):
def onRegState(self, prm):
print "***OnRegState: " + prm.reason
# pjsua2 test function
def pjsua2_test():
# Create and initialize the library
ep_cfg = pj.EpConfig()
ep = pj.Endpoint()
ep.libCreate()
ep.libInit(ep_cfg)
# Create SIP transport. Error handling sample is shown
sipTpConfig = pj.TransportConfig();
sipTpConfig.port = 5060;
ep.transportCreate(pj.PJSIP_TRANSPORT_UDP, sipTpConfig);
# Start the library
ep.libStart();
acfg = pj.AccountConfig();
acfg.idUri = "sip:test@pjsip.org";
acfg.regConfig.registrarUri = "sip:pjsip.org";
cred = pj.AuthCredInfo("digest", "*", "test", 0, "pwtest");
acfg.sipConfig.authCreds.append( cred );
# Create the account
acc = Account();
acc.create(acfg);
# Here we don't have anything else to do..
time.sleep(10);
# Destroy the library
ep.libDestroy()
#
# main()
#
if __name__ == "__main__":
pjsua2_test()
Using in Java Application
=========================
The equivalence of the C++ sample code above in Java is as follows:
.. code-block:: java
import org.pjsip.pjsua2.*;
// Subclass to extend the Account and get notifications etc.
class MyAccount extends Account {
@Override
public void onRegState(OnRegStateParam prm) {
System.out.println("*** On registration state: " + prm.getCode() + prm.getReason());
}
}
public class test {
static {
System.loadLibrary("pjsua2");
System.out.println("Library loaded");
}
public static void main(String argv[]) {
try {
// Create endpoint
Endpoint ep = new Endpoint();
ep.libCreate();
// Initialize endpoint
EpConfig epConfig = new EpConfig();
ep.libInit( epConfig );
// Create SIP transport. Error handling sample is shown
TransportConfig sipTpConfig = new TransportConfig();
sipTpConfig.setPort(5060);
ep.transportCreate(pjsip_transport_type_e.PJSIP_TRANSPORT_UDP, sipTpConfig);
// Start the library
ep.libStart();
AccountConfig acfg = new AccountConfig();
acfg.setIdUri("sip:test@pjsip.org");
acfg.getRegConfig().setRegistrarUri("sip:pjsip.org");
AuthCredInfo cred = new AuthCredInfo("digest", "*", "test", 0, "secret");
acfg.getSipConfig().getAuthCreds().add( cred );
// Create the account
MyAccount acc = new MyAccount();
acc.create(acfg);
// Here we don't have anything else to do..
Thread.sleep(10000);
/* Explicitly delete the account.
* This is to avoid GC to delete the endpoint first before deleting
* the account.
*/
acc.delete();
// Explicitly destroy and delete endpoint
ep.libDestroy();
ep.delete();
} catch (Exception e) {
System.out.println(e);
return;
}
}
}

View File

@ -1,190 +0,0 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\ThePJSIPBook.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\ThePJSIPBook.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
:end

View File

@ -1,220 +0,0 @@
Media
=====
Media objects are objects that are capable to either produce media or takes media.
An important subclass of Media is AudioMedia which represents audio media. There are several type of audio media objects supported in PJSUA2:
- Capture device's AudioMedia, to capture audio from the sound device.
- Playback device's AudioMedia, to play audio to the sound device.
- Call's AudioMedia, to transmit and receive audio to/from remote person.
- AudioMediaPlayer, to play WAV file(s).
- AudioMediaRecorder, to record audio to a WAV file.
More media objects may be added in the future.
The Audio Conference Bridge
----------------------------
The conference bridge provides a simple but yet powerful concept to manage audio flow between the audio medias. The principle is very simple, that is you connect audio source to audio destination, and the bridge will make the audio flows from the source to destination, and that's it. If more than one sources are transmitting to the same destination, then the audio from the sources will be mixed. If one source is transmitting to more than one destinations, the bridge will take care of duplicating the audio from the source to the multiple destinations. The bridge will even take care medias with different clock rates and ptime.
In PJSUA2, all audio media objects are plugged-in to the central conference bridge for easier manipulation. At first, a plugged-in audio media will not be connected to anything, so media will not flow from/to any objects. An audio media source can start/stop the transmission to a destination by using the API AudioMedia.startTransmit() / AudioMedia.stopTransmit().
An audio media object plugged-in to the conference bridge will be given a port ID number that identifies the object in the bridge. Application can use the API AudioMedia.getPortId() to retrieve the port ID. Normally, application should not need to worry about the conference bridge and its port ID (as all will be taken care of by the Media class) unless application want to create its own custom audio media.
Playing a WAV File
++++++++++++++++++
To playback the WAV file to the sound device, just start the transmission of the WAV playback object to the sound device's playback media:
.. code-block:: c++
AudioMediaPlayer player;
AudioMedia& play_med = Endpoint::instance().audDevManager().getPlaybackDevMedia();
try {
player.createPlayer("file.wav");
player.startTransmit(play_med);
} catch(Error& err) {
}
By default, the WAV file will be played in a loop. To disable the loop, specify ``PJMEDIA_FILE_NO_LOOP`` when creating the player:
.. code-block:: c++
player.createPlayer("file.wav", PJMEDIA_FILE_NO_LOOP);
Without looping, silence will be played once the playback has reached the end of the WAV file.
Once you're done with the playback, just stop the transmission to stop the playback:
.. code-block:: c++
try {
player.stopTransmit(play_med);
} catch(Error& err) {
}
Resuming the transmission after the playback is stopped will resume playback from the last play position. Use ``player.setPos()`` to set playback position to a desired location.
Recording to WAV File
+++++++++++++++++++++
Or if you want to record the audio from the sound device to the WAV file, simply do this:
.. code-block:: c++
AudioMediaRecorder recorder;
AudioMedia& cap_med = Endpoint::instance().audDevManager().getCaptureDevMedia();
try {
recorder.createRecorder("file.wav");
cap_med.startTransmit(recorder);
} catch(Error& err) {
}
And the media will flow from the sound device to the WAV record file. As usual, to stop or pause recording, just stop the transmission:
.. code-block:: c++
try {
cap_med.stopTransmit(recorder);
} catch(Error& err) {
}
Note that stopping the transmission to the WAV recorder as above does not close the WAV file, and you can resume recording by connecting a source to the WAV recorder again. You cannot playback the recorded WAV file before you close it. To close the WAV recorder, simply delete it:
.. code-block:: c++
delete recorder;
Local Audio Loopback
++++++++++++++++++++
A useful test to check whether the local sound device (capture and playback device) is working properly is by transmitting the audio from the capture device directly to the playback device (i.e. local loopback). You can do this by:
.. code-block:: c++
cap_med.startTransmit(play_med);
Looping Audio
+++++++++++++
If you want, you can loop the audio of an audio media object to itself (i.e. the audio received from the object will be transmitted to itself). You can loop-back audio from any objects, as long as the object has bidirectional media. That means you can loop the call's audio media, so that audio received from the remote person will be transmitted back to her/him. But you can't loop the WAV player or recorder since these objects can only play or record and not both.
Normal Call
+++++++++++
A single call can have more than one media (for example, audio and video). Application can retrieve the audio media by using the API Call.getMedia(). Then for a normal call, we would want to establish bidirectional audio with the remote person, which can be done easily by connecting the sound device and the call audio media and vice versa:
.. code-block:: c++
CallInfo ci = call.getInfo();
AudioMedia *aud_med = NULL;
// Find out which media index is the audio
for (unsigned i=0; i<ci.media.size(); ++i) {
if (ci.media[i].type == PJMEDIA_TYPE_AUDIO) {
aud_med = (AudioMedia *)call.getMedia(i);
break;
}
}
if (aud_med) {
// This will connect the sound device/mic to the call audio media
cap_med.startTransmit(*aud_med);
// And this will connect the call audio media to the sound device/speaker
aud_med->startTransmit(play_med);
}
Second Call
+++++++++++
Suppose we want to talk with two remote parties at the same time. Since we already have bidirectional media connection with one party, we just need to add bidirectional connection with the other party using the code below:
.. code-block:: c++
AudioMedia *aud_med2 = (AudioMedia *)call2.getMedia(aud_idx);
if (aud_med2) {
cap_med->startTransmit(*aud_med2);
aud_med2->startTransmit(play_med);
}
Now we can talk to both parties at the same time, and we will hear audio from either party. But at this stage, the remote parties can't talk or hear each other (i.e. we're not in full conference mode yet).
Conference Call
+++++++++++++++
To enable both parties talk to each other, just establish bidirectional media between them:
.. code-block:: c++
aud_med->startTransmit(*aud_med2);
aud_med2->startTransmit(*aud_med);
Now the three parties (us and both remote parties) will be able to talk to each other.
Recording the Conference
++++++++++++++++++++++++
While doing the conference, it perfectly makes sense to want to record the conference to a WAV file, and all we need to do is to connect the microphone and both calls to the WAV recorder:
.. code-block:: c++
cap_med.startTransmit(recorder);
aud_med->startTransmit(recorder);
aud_med2->startTransmit(recorder);
Audio Device Management
-----------------------
Please see `Audio Device Framework <#auddev>`_ below.
Class Reference
---------------
Media Framework
+++++++++++++++
Classes
~~~~~~~
.. doxygenclass:: pj::Media
:path: xml
:members:
.. doxygenclass:: pj::AudioMedia
:path: xml
:members:
.. doxygenclass:: pj::AudioMediaPlayer
:path: xml
:members:
.. doxygenclass:: pj::AudioMediaRecorder
:path: xml
:members:
Formats and Info
~~~~~~~~~~~~~~~~
.. doxygenstruct:: pj::MediaFormat
:path: xml
.. doxygenstruct:: pj::MediaFormatAudio
:path: xml
.. doxygenstruct:: pj::MediaFormatVideo
:path: xml
.. doxygenstruct:: pj::ConfPortInfo
:path: xml
Audio Device Framework
++++++++++++++++++++++
Device Manager
~~~~~~~~~~~~~~
.. _auddev:
.. doxygenclass:: pj::AudDevManager
:path: xml
:members:
Device Info
~~~~~~~~~~~
.. doxygenstruct:: pj::AudioDevInfo
:path: xml

View File

@ -1,30 +0,0 @@
Media Quality
*************
Audio Quality
=============
If you experience any problem with the audio quality, you may want to try the steps below:
1. Follow the guide: `Test the sound device using pjsystest`_.
2. Identify the sound problem and troubleshoot it using the steps described in: `Checking for sound problems`_.
.. _`Checking for sound problems`: http://trac.pjsip.org/repos/wiki/sound-problems
.. _`Test the sound device using pjsystest`: http://trac.pjsip.org/repos/wiki/Testing_Audio_Device_with_pjsystest
It is probably easier to do the testing using lower level API such as PJSUA since we already have a built-in pjsua sample app located in pjsip-apps/bin to do the testing. However, you can also do the testing in your application using PJSUA2 API such as local audio loopback, recording to WAV file as explained in the Media chapter previously.
Video Quality
=============
For video quality problems, the steps are as follows:
1. For lack of video, check account's AccountVideoConfig, especially the fields autoShowIncoming and autoTransmitOutgoing. More about the video API is explained in `Video Users Guide`_.
2. Check local video preview using PJSUA API as described in `Video Users Guide-Video Preview API`_.
3. Since video requires a larger bandwidth, we need to check for network impairments as described in `Checking Network Impairments`_. The document is for troubleshooting audio problem but it applies for video as well.
4. Check the CPU utilization. If the CPU utilization is too high, you can try a different (less CPU-intensive) video codec or reduce the resolution/fps. A general guide on how to reduce CPU utilization can be found here: `FAQ-CPU utilization`_.
.. _`Video Users Guide`: http://trac.pjsip.org/repos/wiki/Video_Users_Guide
.. _`Video Users Guide-Video Preview API`: http://trac.pjsip.org/repos/wiki/Video_Users_Guide#VideopreviewAPI
.. _`Checking Network Impairments`: http://trac.pjsip.org/repos/wiki/audio-check-packet-loss
.. _`FAQ-CPU utilization`: http://trac.pjsip.org/repos/wiki/FAQ#cpu

View File

@ -1,16 +0,0 @@
Network Problems
****************
IP Address Change
=================
Please see the wiki `Handling IP Address Change`_. Note that the guide is written using PJSUA API as a reference.
.. _`Handling IP Address Change`: https://trac.pjsip.org/repos/wiki/IPAddressChange
Blocked/Filtered Network
========================
Please refer to the wiki `Getting Around Blocked or Filtered VoIP Network`_.
.. _`Getting Around Blocked or Filtered VoIP Network`: https://trac.pjsip.org/repos/wiki/get-around-nat-blocked-traffic-filtering

View File

@ -1,13 +0,0 @@
General Configuration Optimization
**********************************
PJSUA2 Settings
===============
CPU Optimization
================
A general guide on how to reduce CPU utilization can be found here: `FAQ-CPU utilization`_.
.. _`FAQ-CPU utilization`: http://trac.pjsip.org/repos/wiki/FAQ#cpu

View File

@ -1,108 +0,0 @@
Buddy (Presence)
================
Presence feature in PJSUA2 centers around Buddy class. This class represents a remote buddy (a person, or a SIP endpoint).
Subclassing the Buddy class
----------------------------
To use the Buddy class, normally application SHOULD create its own subclass, such as:
.. code-block:: c++
class MyBuddy : public Buddy
{
public:
MyBuddy() {}
~MyBuddy() {}
virtual void onBuddyState();
};
In its subclass, application can implement the buddy callback to get the notifications on buddy state change.
Subscribing to Buddy's Presence Status
---------------------------------------
To subscribe to buddy's presence status, you need to add a buddy object and subscribe to buddy's presence status. The snippet below shows a sample code to achieve these:
.. code-block:: c++
BuddyConfig cfg;
cfg.uri = "sip:alice@example.com";
MyBuddy buddy;
try {
buddy.create(*acc, cfg);
buddy.subscribePresence(true);
} catch(Error& err) {
}
Then you can get the buddy's presence state change inside the onBuddyState() callback:
.. code-block:: c++
void MyBuddy::onBuddyState()
{
BuddyInfo bi = getInfo();
cout << "Buddy " << bi.uri << " is " << bi.presStatus.statusText << endl;
}
For more information, please see Buddy class reference documentation.
Responding to Presence Subscription Request
-------------------------------------------
By default, incoming presence subscription to an account will be accepted automatically. You will probably want to change this behavior, for example only to automatically accept subscription if it comes from one of the buddy in the buddy list, and for anything else prompt the user if he/she wants to accept the request.
This can be done by overriding the onIncomingSubscribe() method of the Account class. Please see the documentation of this method for more info.
Changing Account's Presence Status
----------------------------------
To change account's presence status, you can use the function Account.setOnlineStatus() to set basic account's presence status (i.e. available or not available) and optionally, some extended information (e.g. busy, away, on the phone, etc), such as:
.. code-block:: c++
try {
PresenceStatus ps;
ps.status = PJSUA_BUDDY_STATUS_ONLINE;
// Optional, set the activity and some note
ps.activity = PJRPID_ACTIVITY_BUSY;
ps.note = "On the phone";
acc->setOnlineStatus(ps);
} catch(Error& err) {
}
When the presence status is changed, the account will publish the new status to all of its presence subscriber, either with PUBLISH request or NOTIFY request, or both, depending on account configuration.
Instant Messaging(IM)
---------------------
You can send IM using Buddy.sendInstantMessage(). The transmission status of outgoing instant messages is reported in Account.onInstantMessageStatus() callback method of Account class.
In addition to sending instant messages, you can also send typing indication to remote buddy using Buddy.sendTypingIndication().
Incoming IM and typing indication received not within the scope of a call will be reported in the callback functions Account.onInstantMessage() and Account.onTypingIndication().
Alternatively, you can send IM and typing indication within a call by using Call.sendInstantMessage() and Call.sendTypingIndication(). For more information, please see Call documentation.
Class Reference
---------------
Buddy
+++++
.. doxygenclass:: pj::Buddy
:path: xml
:members:
Status
++++++
.. doxygenstruct:: pj::PresenceStatus
:path: xml
Info
++++
.. doxygenstruct:: pj::BuddyInfo
:path: xml
Config
++++++
.. doxygenstruct:: pj::BuddyConfig
:path: xml

View File

@ -1,58 +0,0 @@
PJSUA2 API Reference Manuals
****************************
endpoint.hpp
=============
.. doxygenfile:: endpoint.hpp
:path: xml
account.hpp
===========
.. doxygenfile:: account.hpp
:path: xml
media.hpp
=========
.. doxygenfile:: media.hpp
:path: xml
call.hpp
=========
.. doxygenfile:: call.hpp
:path: xml
presence.hpp
============
.. doxygenfile:: presence.hpp
:path: xml
persistent.hpp
================
.. doxygenfile:: persistent.hpp
:path: xml
json.hpp
================
.. doxygenfile:: json.hpp
:path: xml
siptypes.hpp
================
.. doxygenfile:: siptypes.hpp
:path: xml
types.hpp
================
.. doxygenfile:: types.hpp
:path: xml
config.hpp
================
.. doxygenfile:: config.hpp
:path: xml

View File

@ -1,33 +0,0 @@
PJSUA2 Sample Applications
***********************************
Sample Apps
===========
C++
-----
There is a very simple C++ sample application available in ``pjsip-apps/src/samples/pjsua2_demo.cpp``. The binary will be located in ``pjsip-apps/bin/samples``.
Python GUI
------------------
This is a rather complete Python GUI sample apps, located in ``pjsip-apps/src/pygui``. It requires Python 2.7 and above, and the Python SWIG module of course. To use the application, simply run::
python application.py
Android
----------------
Please see https://trac.pjsip.org/repos/wiki/Getting-Started/Android#pjsua2 for Android sample application.
Java
----------------
There is a Hello World type of application located in ``pjsip-apps/src/swig/java``. This requires the Java SWIG module. After building the SWIG module, run ``make test`` from this directory to run the app.
Miscellaneous
===================
How to
-----------------------------

View File

@ -736,7 +736,7 @@ MAN_LINKS = NO
# feature is still experimental and incomplete at the
# moment.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
@ -847,11 +847,16 @@ PREDEFINED = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
PJ_DECL_DATA(x)=x \
PJ_DECL_NO_RETURN(x)=x \
PJ_NO_RETURN=x \
PJ_THREAD_FUNC= \
PJ_HAS_HIGH_RES_TIMER=1 \
PJ_LOG_MAX_LEVEL=4 \
PJ_HAS_SEMAPHORE=1 \
PJ_HAS_EVENT_OBJ=1 \
PJ_HAS_TCP=1
PJ_HAS_TCP=1 \
PJSUA2_THROW=throw \
PJ_BEGIN_DECL= \
PJ_END_DECL= \
PJ_ATTR_MAY_ALIAS=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then

View File

@ -51,7 +51,7 @@ typedef struct pj_cli_telnet_info
*/
pj_uint16_t port;
/* Internal buffer for IP address */
/** Internal buffer for IP address */
char buf_[32];
} pj_cli_telnet_info;
@ -151,6 +151,7 @@ PJ_DECL(pj_status_t) pj_cli_telnet_create(pj_cli_t *cli,
/**
* Retrieve cli telnet info.
*
* @param fe The front end.
* @param info The telnet runtime information.
*
* @return PJ_SUCCESS on success.

View File

@ -243,32 +243,32 @@ typedef struct pj_dns_parsed_rr
pj_uint16_t weight; /**< Weight/proportion */
pj_uint16_t port; /**< Port number of the service */
pj_str_t target; /**< Target name. */
} srv;
} srv; /**< SRV Resource Data (PJ_DNS_TYPE_SRV, 33) */
/** CNAME Resource Data (PJ_DNS_TYPE_CNAME, 5) */
struct cname {
pj_str_t name; /**< Primary canonical name for an alias. */
} cname;
} cname; /**< CNAME Resource Data (PJ_DNS_TYPE_CNAME, 5) */
/** NS Resource Data (PJ_DNS_TYPE_NS, 2) */
struct ns {
pj_str_t name; /**< Primary name server. */
} ns;
} ns; /**< NS Resource Data (PJ_DNS_TYPE_NS, 2) */
/** PTR Resource Data (PJ_DNS_TYPE_PTR, 12) */
struct ptr {
pj_str_t name; /**< PTR name. */
} ptr;
} ptr; /**< PTR Resource Data (PJ_DNS_TYPE_PTR, 12) */
/** A Resource Data (PJ_DNS_TYPE_A, 1) */
struct a {
pj_in_addr ip_addr;/**< IPv4 address in network byte order. */
} a;
} a; /**< A Resource Data (PJ_DNS_TYPE_A, 1) */
/** AAAA Resource Data (PJ_DNS_TYPE_AAAA, 28) */
struct aaaa {
pj_in6_addr ip_addr;/**< IPv6 address in network byte order. */
} aaaa;
} aaaa; /**< AAAA Resource Data (PJ_DNS_TYPE_AAAA, 28) */
} rdata;

View File

@ -181,7 +181,7 @@ typedef struct pj_http_req_param
pj_size_t size; /**< Request body size */
pj_size_t total_size; /**< If total_size > 0, data */
/**< will be provided later */
} reqdata;
} reqdata; /**< The request body */
/**
* Authentication credential needed to respond to 401/407 response.

View File

@ -21,7 +21,7 @@
#define __PJSTUN_H__
/**
* @file stun.h
* @file stun_simple.h
* @brief STUN client.
*/
@ -31,21 +31,21 @@
PJ_BEGIN_DECL
/*
/**
* This enumeration describes STUN message types.
*/
typedef enum pjstun_msg_type
{
PJSTUN_BINDING_REQUEST = 0x0001,
PJSTUN_BINDING_RESPONSE = 0x0101,
PJSTUN_BINDING_ERROR_RESPONSE = 0x0111,
PJSTUN_SHARED_SECRET_REQUEST = 0x0002,
PJSTUN_SHARED_SECRET_RESPONSE = 0x0102,
PJSTUN_SHARED_SECRET_ERROR_RESPONSE = 0x0112
PJSTUN_BINDING_REQUEST = 0x0001, /**< Binding request */
PJSTUN_BINDING_RESPONSE = 0x0101, /**< Binding response */
PJSTUN_BINDING_ERROR_RESPONSE = 0x0111, /**< Binding error */
PJSTUN_SHARED_SECRET_REQUEST = 0x0002, /**< Secret request */
PJSTUN_SHARED_SECRET_RESPONSE = 0x0102, /**< Secret response */
PJSTUN_SHARED_SECRET_ERROR_RESPONSE = 0x0112 /**< Secret error */
} pjstun_msg_type;
/*
/**
* This enumeration describes STUN attribute types.
*/
typedef enum pjstun_attr_type

View File

@ -317,7 +317,7 @@ static void build_server_entries(pj_dns_srv_async_query *query_job,
/* Remove all other entries (of the same priority) */
/* Don't need to do this.
* See https://trac.pjsip.org/repos/ticket/1719
* See https://github.com/pjsip/pjproject/issues/1719
while (count > 1) {
pj_array_erase(query_job->srv, sizeof(struct srv_target),
query_job->srv_cnt, i+1);

View File

@ -736,7 +736,7 @@ MAN_LINKS = NO
# feature is still experimental and incomplete at the
# moment.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
@ -847,11 +847,17 @@ PREDEFINED = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
PJ_DECL_DATA(x)=x \
PJ_DECL_NO_RETURN(x)=x \
PJ_NO_RETURN=x \
PJ_THREAD_FUNC= \
PJ_HAS_HIGH_RES_TIMER=1 \
PJ_LOG_MAX_LEVEL=4 \
PJ_HAS_SEMAPHORE=1 \
PJ_HAS_EVENT_OBJ=1 \
PJ_HAS_TCP=1
PJ_HAS_TCP=1 \
PJSUA2_THROW=throw \
PJ_BEGIN_DECL= \
PJ_END_DECL= \
PJ_ATTR_MAY_ALIAS=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.

View File

@ -298,6 +298,7 @@ PJ_DECL(pj_status_t) pj_activesock_create(pj_pool_t *pool,
* address where the socket should be bound to. If
* this argument is NULL, then AF_INET is assumed and
* the socket will be bound to any addresses and port.
* @param ioqueue The ioqueue.
* @param opt Optional settings. When this setting is not specifed,
* the default values will be used.
* @param cb Pointer to structure containing application

View File

@ -549,7 +549,7 @@
* Enable timer debugging facility. When this is enabled, application
* can call pj_timer_heap_dump() to show the contents of the timer
* along with the source location where the timer entries were scheduled.
* See https://trac.pjsip.org/repos/ticket/1527 for more info.
* See https://github.com/pjsip/pjproject/issues/1527 for more info.
*
* Default: 1
*/
@ -1068,7 +1068,7 @@
/**
* Disable WSAECONNRESET error for UDP sockets on Win32 platforms. See
* https://trac.pjsip.org/repos/ticket/1197.
* https://github.com/pjsip/pjproject/issues/1197.
*
* Default: 1
*/

View File

@ -303,7 +303,7 @@
*/
/* Both armv6 and armv7 has FP hardware support.
* See https://trac.pjsip.org/repos/ticket/1589 for more info
* See https://github.com/pjsip/pjproject/issues/1589 for more info
*/
#define PJ_HAS_FLOATING_POINT 1

View File

@ -956,7 +956,7 @@ export TARGETS = pjlib pjlib-test
* file accordingly.
*
* You will also need to check various files in
* <tt><b>include/pj/compat/*.h</b></tt>, to see if they're
* <tt><b>include/pj/compat/xxx.h</b></tt>, to see if they're
* compatible with your OS.
*
* @subsection new_target_build_file_sec Build The Project

View File

@ -482,7 +482,7 @@ PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
* - PJMEDIA_VIDEODEV_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*7)
*/
/* Internal */
/** Internal */
void pj_errno_clear_handlers(void);

View File

@ -934,7 +934,7 @@ PJ_DECL(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
/**
* !}
* @}
*/
PJ_END_DECL

View File

@ -338,6 +338,15 @@ PJ_DECL(pj_status_t) pj_grp_lock_del_handler(pj_grp_lock_t *grp_lock,
#if !PJ_GRP_LOCK_DEBUG
PJ_DECL(pj_status_t) pj_grp_lock_add_ref(pj_grp_lock_t *grp_lock);
/**
* Debug version of pj_grp_lock_add_ref(), allowing to specify file and lineno.
*
* @param grp_lock The group lock.
* @param x Filename
* @param y Line number
*
* @return PJ_SUCCESS or the appropriate error code.
*/
#define pj_grp_lock_add_ref_dbg(grp_lock, x, y) pj_grp_lock_add_ref(grp_lock)
#else
@ -360,6 +369,15 @@ PJ_DECL(pj_status_t) pj_grp_lock_add_ref_dbg(pj_grp_lock_t *grp_lock,
#if !PJ_GRP_LOCK_DEBUG
PJ_DECL(pj_status_t) pj_grp_lock_dec_ref(pj_grp_lock_t *grp_lock);
/**
* Debug version of pj_grp_lock_dec_ref(), allowing to specify file and lineno.
*
* @param grp_lock The group lock.
* @param x Filename
* @param y Line number
*
* @return PJ_SUCCESS or the appropriate error code.
*/
#define pj_grp_lock_dec_ref_dbg(grp_lock, x, y) pj_grp_lock_dec_ref(grp_lock)
#else

View File

@ -45,14 +45,21 @@ PJ_BEGIN_DECL
/**
* Mathematical constants
*/
/** pi */
#define PJ_PI 3.14159265358979323846 /* pi */
/** 1/pi */
#define PJ_1_PI 0.318309886183790671538 /* 1/pi */
/**
* Mathematical macro
* Mathematical macros
*/
/** Get the absolute value */
#define PJ_ABS(x) ((x) > 0 ? (x) : -(x))
/** Get the maximum of two values */
#define PJ_MAX(x, y) ((x) > (y)? (x) : (y))
/** Get the minimum of two values */
#define PJ_MIN(x, y) ((x) < (y)? (x) : (y))
/**
@ -60,19 +67,19 @@ PJ_BEGIN_DECL
*/
typedef struct pj_math_stat
{
int n; /* number of samples */
int max; /* maximum value */
int min; /* minimum value */
int last; /* last value */
int mean; /* mean */
int n; /**< number of samples */
int max; /**< maximum value */
int min; /**< minimum value */
int last; /**< last value */
int mean; /**< mean */
/* Private members */
#if PJ_HAS_FLOATING_POINT
float fmean_; /* mean(floating point) */
float fmean_; /**< mean(floating point) */
#else
int mean_res_; /* mean residu */
int mean_res_; /**< mean residue */
#endif
pj_highprec_t m2_; /* variance * n */
pj_highprec_t m2_; /**< variance * n */
} pj_math_stat;
/**

View File

@ -123,7 +123,7 @@ typedef struct pj_sys_info
*/
PJ_DECL(const pj_sys_info*) pj_get_sys_info(void);
/*
/**
* @}
*/

View File

@ -523,7 +523,9 @@ PJ_INLINE(void*) pj_pool_zalloc(pj_pool_t *pool, pj_size_t size)
/*
* Internal functions
*/
/** Internal function */
PJ_IDECL(void*) pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t size);
/** Internal function */
PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size);
@ -627,7 +629,6 @@ typedef struct pj_pool_factory_policy
} pj_pool_factory_policy;
/**
* \def PJ_NO_MEMORY_EXCEPTION
* This constant denotes the exception number that will be thrown by default
* memory factory policy when memory allocation fails.
*

View File

@ -51,8 +51,14 @@ typedef enum pj_rbcolor_t
*/
typedef struct pj_rbtree_node
{
/** Pointers to the node's parent, and left and right siblings. */
struct pj_rbtree_node *parent, *left, *right;
/** Pointers to the node's parent. */
struct pj_rbtree_node *parent;
/** Pointers to the node's left sibling. */
struct pj_rbtree_node *left;
/** Pointers to the node's right sibling. */
struct pj_rbtree_node *right;
/** Key associated with the node. */
const void *key;

View File

@ -493,15 +493,15 @@ typedef enum pj_socket_sd_type
/* Must undefine s_addr because of pj_in_addr below */
#undef s_addr
/**
* This structure describes Internet address.
*/
typedef struct pj_in_addr
{
pj_uint32_t s_addr; /**< The 32bit IP address. */
} pj_in_addr;
#else
/**
* This structure describes Internet address.
*/
typedef struct in_addr pj_in_addr;
#endif
@ -552,9 +552,6 @@ struct pj_sockaddr_in
#if 0
#undef s6_addr
/**
* This structure describes IPv6 address.
*/
typedef union pj_in6_addr
{
/* This is the main entry */
@ -566,7 +563,7 @@ typedef union pj_in6_addr
/* Do not use this with Winsock2, as this will align pj_sockaddr_in6
* to 64-bit boundary and Winsock2 doesn't like it!
* Update 26/04/2010:
* This is now disabled, see http://trac.pjsip.org/repos/ticket/1058
* This is now disabled, see https://github.com/pjsip/pjproject/issues/1058
*/
#if 0 && defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0 && \
(!defined(PJ_WIN32) || PJ_WIN32==0)
@ -575,6 +572,9 @@ typedef union pj_in6_addr
} pj_in6_addr;
#else
/**
* This structure describes IPv6 address.
*/
typedef struct in6_addr pj_in6_addr;
#endif
@ -652,21 +652,21 @@ typedef struct pj_ip_mreq {
*/
typedef struct pj_sockopt_params
{
/* The number of options to be applied. */
/** The number of options to be applied. */
unsigned cnt;
/* Array of options to be applied. */
/** Array of options to be applied. */
struct {
/* The level at which the option is defined. */
/** The level at which the option is defined. */
int level;
/* Option name. */
/** Option name. */
int optname;
/* Pointer to the buffer in which the option is specified. */
/** Pointer to the buffer in which the option is specified. */
void *optval;
/* Buffer size of the buffer pointed by optval. */
/** Buffer size of the buffer pointed by optval. */
int optlen;
} options[PJ_MAX_SOCKOPT_PARAMS];
} pj_sockopt_params;
@ -933,7 +933,7 @@ PJ_DECL(unsigned) pj_sockaddr_get_len(const pj_sockaddr_t *addr);
* @param dst Destination socket address.
* @param src Source socket address.
*
* @see @pj_sockaddr_cp()
* @see pj_sockaddr_cp()
*/
PJ_DECL(void) pj_sockaddr_copy_addr(pj_sockaddr *dst,
const pj_sockaddr *src);
@ -944,11 +944,11 @@ PJ_DECL(void) pj_sockaddr_copy_addr(pj_sockaddr *dst,
* @param dst Destination socket address.
* @param src Source socket address.
*
* @see @pj_sockaddr_copy_addr()
* @see pj_sockaddr_copy_addr()
*/
PJ_DECL(void) pj_sockaddr_cp(pj_sockaddr_t *dst, const pj_sockaddr_t *src);
/*
/**
* If the source's and desired address family matches, copy the address,
* otherwise synthesize a new address with the desired address family,
* from the source address. This can be useful to generate an IPv4-mapped
@ -1245,7 +1245,7 @@ PJ_DECL(pj_status_t) pj_sock_bind_in( pj_sock_t sockfd,
* @param sockfd The socket desriptor.
* @param addr The local address and port to bind the socket to.
* @param port_range The port range, relative the to start port number
* specified in port field in #addr. Note that if the
* specified in port field in addr. Note that if the
* port is zero, this param will be ignored.
* @param max_try Maximum retries.
*

View File

@ -60,6 +60,9 @@ typedef struct pj_ssl_sock_t pj_ssl_sock_t;
typedef struct pj_ssl_cert_t pj_ssl_cert_t;
/**
* Bitwise flag for SSL certificate verification.
*/
typedef enum pj_ssl_cert_verify_flag_t
{
/**
@ -131,6 +134,9 @@ typedef enum pj_ssl_cert_verify_flag_t
} pj_ssl_cert_verify_flag_t;
/**
* Type of SSL certificate name.
*/
typedef enum pj_ssl_cert_name_type
{
PJ_SSL_CERT_NAME_UNKNOWN = 0,
@ -202,6 +208,7 @@ typedef pj_str_t pj_ssl_cert_buffer;
* suffix, e.g: "pjsip_rsa.pem", the library will automatically check for
* other certificates with "_ecc" and "_dsa" suffix.
*
* @param pool The pool.
* @param CA_file The file of trusted CA list.
* @param cert_file The file of certificate.
* @param privkey_file The file of private key.
@ -227,6 +234,7 @@ PJ_DECL(pj_status_t) pj_ssl_cert_load_from_files(pj_pool_t *pool,
* accepts an additional param CA_path to load CA certificates from
* a directory.
*
* @param pool The pool.
* @param CA_file The file of trusted CA list.
* @param CA_path The path to a directory of trusted CA list.
* @param cert_file The file of certificate.
@ -250,6 +258,7 @@ PJ_DECL(pj_status_t) pj_ssl_cert_load_from_files2(
* Create credential from data buffer. The certificate expected is in
* PEM format.
*
* @param pool The pool.
* @param CA_buf The buffer of trusted CA list.
* @param cert_buf The buffer of certificate.
* @param privkey_buf The buffer of private key.
@ -518,17 +527,17 @@ PJ_DECL(const char*) pj_ssl_curve_name(pj_ssl_curve curve);
*/
PJ_DECL(pj_ssl_curve) pj_ssl_curve_id(const char *curve_name);
/*
/**
* Entropy enumeration
*/
typedef enum pj_ssl_entropy
{
PJ_SSL_ENTROPY_NONE = 0,
PJ_SSL_ENTROPY_EGD = 1,
PJ_SSL_ENTROPY_RANDOM = 2,
PJ_SSL_ENTROPY_URANDOM = 3,
PJ_SSL_ENTROPY_FILE = 4,
PJ_SSL_ENTROPY_UNKNOWN = 0x0F
PJ_SSL_ENTROPY_NONE = 0, /**< None */
PJ_SSL_ENTROPY_EGD = 1, /**< EGD */
PJ_SSL_ENTROPY_RANDOM = 2, /**< Random */
PJ_SSL_ENTROPY_URANDOM = 3, /**< Urandom */
PJ_SSL_ENTROPY_FILE = 4, /**< File */
PJ_SSL_ENTROPY_UNKNOWN = 0x0F /**< Unknown */
} pj_ssl_entropy_t;
/**

View File

@ -133,7 +133,7 @@ PJ_DECL(char*) pj_unicode_to_ansi(const wchar_t *wstr, pj_ssize_t len,
PJ_END_DECL
/*
/**
* @}
*/

View File

@ -98,7 +98,7 @@ PJ_DEF(pj_status_t) pj_file_open( pj_pool_t *pool,
* to be working on WM6. All are tested on emulator though.
* Removing this also seem to work (i.e. data is appended), so
* I guess this flag is "optional".
* See http://trac.pjsip.org/repos/ticket/825
* See https://github.com/pjsip/pjproject/issues/825
*/
dwDesiredAccess |= FILE_APPEND_DATA;
#endif

View File

@ -828,7 +828,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
* We also need to close handle to make sure that no further events
* will come to the handle.
*/
/* Update 2008/07/18 (http://trac.pjsip.org/repos/ticket/575):
/* Update 2008/07/18 (https://github.com/pjsip/pjproject/issues/575):
* - It seems that CloseHandle() in itself does not actually close
* the socket (i.e. it will still appear in "netstat" output). Also
* if we only use CloseHandle(), an "Invalid Handle" exception will

View File

@ -502,7 +502,7 @@ PJ_DEF(pj_status_t) pj_sock_socket(int af,
#endif
/* Disable WSAECONNRESET for UDP.
* See https://trac.pjsip.org/repos/ticket/1197
* See https://github.com/pjsip/pjproject/issues/1197
*/
if (type==PJ_SOCK_DGRAM) {
DWORD dwBytesReturned = 0;
@ -674,7 +674,7 @@ PJ_DEF(pj_status_t) pj_sock_send(pj_sock_t sock,
PJ_ASSERT_RETURN(len, PJ_EINVAL);
#ifdef MSG_NOSIGNAL
/* Suppress SIGPIPE. See https://trac.pjsip.org/repos/ticket/1538 */
/* Suppress SIGPIPE. See https://github.com/pjsip/pjproject/issues/1538 */
flags |= MSG_NOSIGNAL;
#endif

View File

@ -928,7 +928,7 @@ PJ_DEF(pj_status_t) pj_gethostip(int af, pj_sockaddr *addr)
}
/* Apply weight adjustment for special IPv4/IPv6 addresses
* See http://trac.pjsip.org/repos/ticket/1046
* See https://github.com/pjsip/pjproject/issues/1046
*/
if (af == PJ_AF_INET) {
for (i=0; i<cand_cnt; ++i) {

View File

@ -142,7 +142,7 @@ int select_test()
status=-40; goto on_return;
}
// Sleep a bit. See http://trac.pjsip.org/repos/ticket/890
// Sleep a bit. See https://github.com/pjsip/pjproject/issues/890
pj_thread_sleep(10);
// Check that socket is marked as reable.

View File

@ -675,7 +675,7 @@ static int udp_test(void)
/* Disable this test on Symbian since UDP connect()/send() failed
* with S60 3rd edition (including MR2).
* See http://www.pjsip.org/trac/ticket/264
* See https://github.com/pjsip/pjproject/issues/264
*/
#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0
/* connect() the sockets. */

View File

@ -162,7 +162,7 @@ int sock_perf_test(void)
/* Disable this test on Symbian since UDP connect()/send() failed
* with S60 3rd edition (including MR2).
* See http://www.pjsip.org/trac/ticket/264
* See https://github.com/pjsip/pjproject/issues/264
*/
#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0
/* Benchmarking UDP */

View File

@ -737,7 +737,7 @@ MAN_LINKS = NO
# feature is still experimental and incomplete at the
# moment.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
@ -848,11 +848,16 @@ PREDEFINED = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
PJ_DECL_DATA(x)=x \
PJ_DECL_NO_RETURN(x)=x \
PJ_NO_RETURN=x \
PJ_THREAD_FUNC= \
PJ_HAS_HIGH_RES_TIMER=1 \
PJ_LOG_MAX_LEVEL=4 \
PJ_HAS_SEMAPHORE=1 \
PJ_HAS_EVENT_OBJ=1 \
PJ_HAS_TCP=1 \
PJSUA2_THROW=throw \
PJ_BEGIN_DECL= \
PJ_END_DECL= \
PJ_ATTR_MAY_ALIAS= \
PJMEDIA_HAS_SRTP=1 \
PJMEDIA_STREAM_ENABLE_KA=1

View File

@ -31,7 +31,7 @@
PJ_BEGIN_DECL
/**
* @defgroup s2_audio_device_reference Audio Subsystem API Reference
* @defgroup PJMEDIA_AUDIODEV_SUBSYSTEM_API Audio Subsystem API Reference
* @ingroup audio_subsystem_api
* @brief API Reference
* @{

View File

@ -265,10 +265,18 @@ PJMEDIA Audio Device API is a cross-platform audio API appropriate for use with
VoIP applications and many other types of audio streaming applications.
The API abstracts many different audio API's on various platforms, such as:
- PortAudio back-end for Win32, Windows Mobile, Linux, Unix, dan MacOS X.
- native WMME audio for Win32 and Windows Mobile devices
- native Symbian audio streaming/multimedia framework (MMF) implementation
- native Nokia Audio Proxy Server (APS) implementation
- WMME audio for Windows and Windows Mobile devices
- Windows Audio Session API (WASAPI)
- CoreAudio for Mac and iPhone
- ALSA for Linux
- Android OpenSL
- Android JNI
- Android Oboe
- PortAudio for Windows, Windows Mobile, Linux, Unix, dan MacOS X.
- BDIMAP
- Blackberry BB10
- Symbian audio streaming/multimedia framework (MMF) implementation
- Nokia Audio Proxy Server (APS) implementation
- null-audio implementation
- and more to be implemented in the future

View File

@ -40,7 +40,7 @@
* MediaCodec AMR supports 16-bit PCM audio signal with sampling rate 8000Hz,
* 20ms frame length and producing various bitrates that ranges from 4.75kbps
* to 12.2kbps.
* \subsection codec_setting Codec Settings
* \subsection and_aud_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -48,7 +48,7 @@
* Note that MediaCodec doesn't provide internal VAD/PLC feature, they will be
* provided by PJMEDIA instead.
*
* \subsubsection bitrate Bitrate
* \subsubsection and_aud_bitrate Bitrate
*
* By default, encoding bitrate is 7400bps. This default setting can be
* modified using #pjmedia_codec_mgr_set_default_param() by specifying
@ -56,7 +56,7 @@
* #pjmedia_codec_param. Valid bitrates could be seen in
* #pjmedia_codec_amrnb_bitrates.
*
* \subsubsection payload_format Payload Format
* \subsubsection and_aud_payload_format Payload Format
*
* There are two AMR payload format types, bandwidth-efficient and
* octet-aligned. Default setting is using octet-aligned. This default payload
@ -67,7 +67,7 @@
* decoding direction. Valid values are "0" (for bandwidth efficient mode)
* and "1" (for octet-aligned mode).
*
* \subsubsection mode_set Mode-Set
* \subsubsection and_aud_mode_set Mode-Set
*
* Mode-set is used for restricting AMR modes in decoding direction.
*

View File

@ -20,7 +20,7 @@
#define __PJMEDIA_CODEC_ALL_CODECS_H__
/**
* @file pjmedia-codec/all_codecs.h
* @file pjmedia-codec/audio_codecs.h
* @brief Helper function to register all codecs
*/
#include <pjmedia/endpoint.h>

View File

@ -45,7 +45,7 @@
* BCGG729 supports 16-bit PCM audio signal with sampling rate 8000Hz,
* frame length 10ms, and resulting in bitrate 8000bps.
*
* \subsection codec_setting Codec Settings
* \subsection bcg729_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -54,7 +54,7 @@
* Note that G.729 VAD status should be signalled in SDP, see more
* description below.
*
* \subsubsection annexb Annex B
* \subsubsection bcg729_annexb Annex B
*
* The capability of VAD/DTX is specified in Annex B.
*

View File

@ -375,7 +375,7 @@
/**
* Enable OpenCORE AMR-NB codec.
* See https://trac.pjsip.org/repos/ticket/1388 for some info.
* See https://github.com/pjsip/pjproject/issues/1388 for some info.
*
* Default: 0
*/
@ -385,7 +385,7 @@
/**
* Enable OpenCORE AMR-WB codec.
* See https://trac.pjsip.org/repos/ticket/1608 for some info.
* See https://github.com/pjsip/pjproject/issues/1608 for some info.
*
* Default: 0
*/

View File

@ -43,15 +43,15 @@
* The G.722 codec implementation is provided as part of pjmedia-codec
* library, and does not depend on external G.722 codec implementation.
*
* \section codec_setting Codec Settings
* \section codec_g722_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection g722_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection g722_specific_setting Codec Specific Settings
*
* Currently none.
*/

View File

@ -33,8 +33,8 @@
* @brief Implementation of G.722.1 codec
* @{
*
* <b>G.722.1 licensed from Polycom®</b><br />
* <b>G.722.1 Annex C licensed from Polycom®</b>
* <b>G.722.1 licensed from Polycom<EFBFBD></b><br />
* <b>G.722.1 Annex C licensed from Polycom<EFBFBD></b>
*
* This section describes functions to initialize and register G.722.1 codec
* factory to the codec manager. After the codec factory has been registered,
@ -48,19 +48,19 @@
* used with speech or music inputs.
*
*
* \section codec_setting Codec Settings
* \section g7221_codec_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection g7221_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection g7221_specific_setting Codec Specific Settings
*
* The following settings are applicable for this codec.
*
* \subsubsection bitrate Bitrate
* \subsubsection g7221_bitrate Bitrate
*
* The codec implementation supports standard and non-standard bitrates.
* Use #pjmedia_codec_g7221_set_mode() to enable or disable the bitrates.

View File

@ -40,15 +40,15 @@
* The GSM codec supports 16-bit PCM with sampling rate of 8000Hz resulting
* in 13.2kbps bitrate.
*
* \section codec_setting Codec Settings
* \section gsm_codec_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection gsm_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection gsm_specific_setting Codec Specific Settings
*
* Currently none.
*/

View File

@ -143,7 +143,7 @@ PJ_DECL(pj_status_t) pjmedia_h264_packetize(pjmedia_h264_packetizer *pktz,
* @param payload The payload to be unpacketized.
* @param payload_len The payload length.
* @param bits The bitstream buffer.
* @param bits_size The bitstream buffer size.
* @param bits_len The bitstream buffer size.
* @param bits_pos The bitstream offset to put the unpacketized payload
* in the bitstream, upon return, this will be updated
* to the latest offset as a result of the unpacketized

View File

@ -46,19 +46,19 @@
* in bitrates of 15.2kbps for 20ms mode and 13.33kbps for 30ms mode.
*
*
* \section codec_setting Codec Settings
* \section ilbc_codec_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection ilbc_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection ilbc_specific_setting Codec Specific Settings
*
* The following settings are applicable for this codec.
*
* \subsubsection mode Mode
* \subsubsection ilbc_mode Mode
*
* The default mode should be set upon initialization, see
* #pjmedia_codec_ilbc_init(). After the codec is initialized, the default

View File

@ -51,7 +51,7 @@
* frame length 10ms, and resulting in bitrate 8000bps (annexes D and E
* introduce bitrates 6400bps and 11800bps).
*
* \subsection codec_setting Codec Settings
* \subsection ipp_g729_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -60,7 +60,7 @@
* Note that G.729 VAD status should be signalled in SDP, see more
* description below.
*
* \subsubsection annexb Annex B
* \subsubsection ipp_g729_annexb Annex B
*
* The capability of VAD/DTX is specified in Annex B.
*
@ -106,7 +106,7 @@
* By default, pjmedia implementation uses encoding bitrate of 6300bps.
* The bitrate is signalled in-band in G.723.1 frames and interoperable.
*
* \subsection codec_setting Codec Settings
* \subsection ipp_g723_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -122,7 +122,7 @@
* The bitrate is specified explicitly in its encoding name, i.e: G726-16,
* G726-24, G726-32, G726-48.
*
* \subsection codec_setting Codec Settings
* \subsection ipp_g726_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -139,7 +139,7 @@
*
* The pjmedia implementation currently uses 16kbps bitrate only.
*
* \subsection codec_setting Codec Settings
* \subsection ipp_g728_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -152,13 +152,13 @@
* signal with sampling rate 16000Hz, 20ms frame length and producing
* 16kbps, 24kbps, and 32kbps bitrates.
*
* \subsection codec_setting Codec Settings
* \subsection ipp_g7221_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsubsection bitrate Bitrate
* \subsubsection ipp_g7221_bitrate Bitrate
*
* The codec implementation supports only standard bitrates, i.e:
* 24kbps and 32kbps. Both are enabled by default.
@ -182,13 +182,13 @@
* 20ms frame length and producing various bitrates that ranges from 4.75kbps
* to 12.2kbps.
*
* \subsection codec_setting Codec Settings
* \subsection ipp_amr_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsubsection bitrate Bitrate
* \subsubsection ipp_amr_bitrate Bitrate
*
* By default, encoding bitrate is 7400bps. This default setting can be
* modified using #pjmedia_codec_mgr_set_default_param() by specifying
@ -196,7 +196,7 @@
* #pjmedia_codec_param. Valid bitrates could be seen in
* #pjmedia_codec_amrnb_bitrates.
*
* \subsubsection payload_format Payload Format
* \subsubsection ipp_amr_payload_format Payload Format
*
* There are two AMR payload format types, bandwidth-efficient and
* octet-aligned. Default setting is using octet-aligned. This default payload
@ -207,7 +207,7 @@
* decoding direction. Valid values are "0" (for bandwidth efficient mode)
* and "1" (for octet-aligned mode).
*
* \subsubsection mode_set Mode-Set
* \subsubsection ipp_amr_mode_set Mode-Set
*
* Mode-set is used for restricting AMR modes in decoding direction.
*
@ -252,20 +252,20 @@
* seen in #pjmedia_codec_amrwb_bitrates. The pjmedia implementation default
* bitrate is 15850bps.
*
* \subsection codec_setting Codec Settings
* \subsection ipp_amrwb_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsubsection bitrate Bitrate
* \subsubsection ipp_amrwb_bitrate Bitrate
*
* By default, encoding bitrate is 15850bps. This default setting can be
* modified using #pjmedia_codec_mgr_set_default_param() by specifying
* prefered AMR bitrate in field <tt>info::avg_bps</tt> of
* #pjmedia_codec_param.
*
* \subsubsection payload_format Payload Format
* \subsubsection ipp_amrwb_payload_format Payload Format
*
* There are two AMR payload format types, bandwidth-efficient and
* octet-aligned. Default setting is using octet-aligned. This default payload
@ -276,7 +276,7 @@
* decoding direction. Valid values are "0" (for bandwidth efficient mode)
* and "1" (for octet-aligned mode).
*
* \subsubsection mode_set Mode-Set
* \subsubsection ipp_amrwb_mode_set Mode-Set
*
* Mode-set is used for restricting AMR modes in decoding direction.
*

View File

@ -37,15 +37,15 @@
* L16 codec types to codec manager (different combinations of clock
* rate and number of channels).
*
* \section codec_setting Codec Settings
* \section l16_codec_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection l16_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection l16_specific_setting Codec Specific Settings
*
* Currently none.
*/
@ -76,6 +76,9 @@ PJ_DECL(pj_status_t) pjmedia_codec_l16_deinit(void);
PJ_END_DECL
/**
* @}
*/
#endif /* __PJMEDIA_CODEC_L16_H__ */

View File

@ -41,8 +41,8 @@ enum pjmedia_amr_options
};
/**
* Settings. Use #pjmedia_codec_opencore_amrnb/wb_set_config() to
* activate.
* Settings. Use pjmedia_codec_opencore_amrnb_set_config() and
* pjmedia_codec_opencore_amrwb_set_config() to activate.
*/
typedef struct pjmedia_codec_amr_config
{

View File

@ -49,7 +49,7 @@ PJ_BEGIN_DECL
* (8 kHz sampling rate).
*
*
* \section codec_setting Codec Settings
* \section opus_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param

View File

@ -53,7 +53,7 @@
* G.729 supports 16-bit PCM audio signal with sampling rate 8000Hz,
* frame length 10ms, and resulting in bitrate 8000bps.
*
* \subsection codec_setting Codec Settings
* \subsection passthrough_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
@ -62,7 +62,7 @@
* Note that G.729 VAD status should be signalled in SDP, see more
* description below.
*
* \subsubsection annexb Annex B
* \subsubsection passthrough_g729_annexb Annex B
*
* The capability of VAD/DTX is specified in Annex B.
*
@ -107,13 +107,13 @@
* 8000Hz operating at two modes: 20ms and 30ms frame length modes, resulting
* in bitrates of 15.2kbps for 20ms mode and 13.33kbps for 30ms mode.
*
* \subsection codec_setting Codec Settings
* \subsection passthrough_ilbc_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsubsection mode Mode
* \subsubsection passthrough_ilbc_mode Mode
*
* The default mode should be set upon initialization, see
* #pjmedia_codec_passthrough_init2(). After the codec is initialized, the
@ -142,13 +142,13 @@
* 20ms frame length and producing various bitrates that ranges from 4.75kbps
* to 12.2kbps.
*
* \subsection codec_setting Codec Settings
* \subsection passthrough_amr_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsubsection bitrate Bitrate
* \subsubsection passthrough_amr_bitrate Bitrate
*
* By default, encoding bitrate is 7400bps. This default setting can be
* modified using #pjmedia_codec_mgr_set_default_param() by specifying
@ -156,7 +156,7 @@
* #pjmedia_codec_param. Valid bitrates could be seen in
* #pjmedia_codec_amrnb_bitrates.
*
* \subsubsection payload_format Payload Format
* \subsubsection passthrough_amr_payload_format Payload Format
*
* There are two AMR payload format types, bandwidth-efficient and
* octet-aligned. Default setting is using octet-aligned. This default payload
@ -167,7 +167,7 @@
* decoding direction. Valid values are "0" (for bandwidth efficient mode)
* and "1" (for octet-aligned mode).
*
* \subsubsection mode_set Mode-Set
* \subsubsection passthrough_amr_mode_set Mode-Set
*
* Mode-set is used for restricting AMR modes in decoding direction.
*
@ -210,7 +210,7 @@
* The factory contains two main compression algorithms, PCMU/u-Law and
* PCMA/A-Law.
*
* \subsection codec_setting Codec Settings
* \subsection passthrough_g711_codec_setting Codec Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.

View File

@ -41,25 +41,19 @@
* (24 kHz sampling rate), wideband (16 kHz sampling rate), medium (12kHz
* sampling rate), and narrowband (telephone quality, 8 kHz sampling rate).
*
* By default, the SILK codec factory registers two SILK codecs:
* "SILK/8000" narrowband codec and "SILK/16000" wideband codec. This behavior
* can be changed by specifying #pjmedia_codec_silk_options flags during
* initialization.
* \section silk_codec_setting Codec Settings
*
*
* \section codec_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection silk_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection silk_specific_setting Codec Specific Settings
*
* The following settings are applicable for this codec.
*
* \subsubsection quality_vs_complexity Quality vs Complexity
* \subsubsection silk_quality_vs_complexity Quality vs Complexity
*
* The SILK codec quality versus computational complexity and bandwidth
* requirement can be adjusted by modifying the quality and complexity

View File

@ -47,19 +47,19 @@
* specifying #pjmedia_speex_options flags during initialization.
*
*
* \section codec_setting Codec Settings
* \section speex_codec_setting Codec Settings
*
* \subsection general_setting General Settings
* \subsection speex_general_setting General Settings
*
* General codec settings for this codec such as VAD and PLC can be
* manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
* Please see the documentation of #pjmedia_codec_param for more info.
*
* \subsection specific_setting Codec Specific Settings
* \subsection speex_specific_setting Codec Specific Settings
*
* The following settings are applicable for this codec.
*
* \subsubsection quality_vs_complexity Quality vs Complexity
* \subsubsection speex_quality_vs_complexity Quality vs Complexity
*
* The Speex codec quality versus computational complexity and bandwidth
* requirement can be adjusted by modifying the quality and complexity

View File

@ -97,6 +97,7 @@ PJ_DECL(pj_status_t) pjmedia_avi_dev_create_factory(
* Allocate one device ID to be used to play the specified AVI file in
* the parameter.
*
* @param f The factory.
* @param param The parameter, with at least the AVI file path
* set.
* @param p_id Optional pointer to receive device ID to play

View File

@ -29,7 +29,7 @@
PJ_BEGIN_DECL
/**
* @defgroup video_device_reference Video Subsystem API Reference
* @defgroup video_device_reference Video Device API Reference
* @ingroup video_subsystem_api
* @brief API Reference
* @{

View File

@ -35,7 +35,7 @@
PJ_BEGIN_DECL
/**
* @defgroup s2_audio_device_reference Audio Device API Reference
* @defgroup PJMEDIA_AUDIODEV_API Audio Device API Reference
* @ingroup audio_device_api
* @brief Documentation and API Reference
* @{

View File

@ -31,7 +31,7 @@ PJ_BEGIN_DECL
/**
* @defgroup PJMEDIA_FILE_PLAY AVI File Player
* @defgroup PJMEDIA_AVI_FILE_PLAY AVI File Player
* @ingroup PJMEDIA_PORT
* @brief Video and audio playback from AVI file
* @{

View File

@ -41,7 +41,7 @@
There are few objects in PJMEDIA that are able to provide clock/timing
to media ports interconnection:
- @ref PJMED_SND_PORT\n
- @ref PJMED_SND_PORT \n
The sound device makes a good candidate as the clock source, and
PJMEDIA @ref PJMED_SND is designed so that it is able to invoke
operations according to timing driven by the sound hardware clock
@ -50,7 +50,7 @@
it has/wants media frames).\n
See @ref PJMED_SND_PORT for more details.
- @ref PJMEDIA_MASTER_PORT\n
- @ref PJMEDIA_MASTER_PORT \n
The master port uses @ref PJMEDIA_CLOCK as the clock source. By using
@ref PJMEDIA_MASTER_PORT, it is possible to interconnect passive
media ports and let the frames flow automatically in timely manner.\n

View File

@ -45,7 +45,7 @@ PJ_BEGIN_DECL
/* Since 1.3 pjmedia_conf_add_passive_port() has been deprecated
* and replaced by splitcomb.
* See also https://trac.pjsip.org/repos/ticket/2234.
* See also https://github.com/pjsip/pjproject/issues/2234.
*/
#ifndef DEPRECATED_FOR_TICKET_2234
# define DEPRECATED_FOR_TICKET_2234 1

View File

@ -1092,7 +1092,7 @@
* so we recommend to disable this.
*
* To enable this, you would require OpenSSL which supports it.
* See https://trac.pjsip.org/repos/ticket/1943 for more info.
* See https://github.com/pjsip/pjproject/issues/1943 for more info.
*
* Default: disabled.
*/
@ -1114,7 +1114,7 @@
* Enable AES_GCM_256 cryptos in SRTP.
*
* To enable this, you would require OpenSSL which supports it.
* See https://trac.pjsip.org/repos/ticket/1943 for more info.
* See https://github.com/pjsip/pjproject/issues/1943 for more info.
*
* Default: disabled.
*/
@ -1127,7 +1127,7 @@
* Enable AES_GCM_128 cryptos in SRTP.
*
* To enable this, you would require OpenSSL which supports it.
* See https://trac.pjsip.org/repos/ticket/1943 for more info.
* See https://github.com/pjsip/pjproject/issues/1943 for more info.
*
* Default: disabled.
*/

View File

@ -156,47 +156,47 @@ TOTAL 55,232 268 2,020 57,520
Please find below some PJMEDIA related examples that may help in giving
some more info:
- @ref page_pjmedia_samples_level_c\n
- @ref page_pjmedia_samples_level_c \n
This is a good place to start learning about @ref PJMEDIA_PORT,
as it shows that @ref PJMEDIA_PORT are only "passive" objects
with <tt>get_frame()</tt> and <tt>put_frame()</tt> interface, and
someone has to call these to retrieve/store media frames.
- @ref page_pjmedia_samples_playfile_c\n
- @ref page_pjmedia_samples_playfile_c \n
This example shows that when application connects a media port (in this
case a @ref PJMEDIA_FILE_PLAY) to @ref PJMED_SND_PORT, media will flow
automatically since the @ref PJMED_SND_PORT provides @ref PJMEDIA_PORT_CLOCK.
- @ref page_pjmedia_samples_recfile_c\n
- @ref page_pjmedia_samples_recfile_c \n
Demonstrates how to capture audio from microphone to WAV file.
- @ref page_pjmedia_samples_playsine_c\n
- @ref page_pjmedia_samples_playsine_c \n
Demonstrates how to create a custom @ref PJMEDIA_PORT (in this
case a sine wave generator) and integrate it to PJMEDIA.
- @ref page_pjmedia_samples_confsample_c\n
- @ref page_pjmedia_samples_confsample_c \n
This demonstrates how to use the @ref PJMEDIA_CONF. The sample program can
open multiple WAV files, and instruct the conference bridge to mix the
signal before playing it to the sound device.
- @ref page_pjmedia_samples_confbench_c\n
- @ref page_pjmedia_samples_confbench_c \n
I use this to benchmark/optimize the conference bridge algorithm, but
readers may find the source useful.
- @ref page_pjmedia_samples_resampleplay_c\n
- @ref page_pjmedia_samples_resampleplay_c \n
Demonstrates how to use @ref PJMEDIA_RESAMPLE_PORT to change the
sampling rate of a media port (in this case, a @ref PJMEDIA_FILE_PLAY).
- @ref page_pjmedia_samples_sndtest_c\n
- @ref page_pjmedia_samples_sndtest_c \n
This program performs some tests to the sound device to get some
quality parameters (such as sound jitter and clock drifts).\n
Screenshots on WinXP: \image html sndtest.jpg "sndtest screenshot on WinXP"
- @ref page_pjmedia_samples_streamutil_c\n
- @ref page_pjmedia_samples_streamutil_c \n
This example mainly demonstrates how to stream media (in this case a
@ref PJMEDIA_FILE_PLAY) to remote peer using RTP.
- @ref page_pjmedia_samples_siprtp_c\n
- @ref page_pjmedia_samples_siprtp_c \n
This is a useful program (integrated with PJSIP) to actively measure
the network quality/impairment parameters by making one or more SIP
calls (or receiving one or more SIP calls) and display the network
@ -208,13 +208,13 @@ TOTAL 55,232 268 2,020 57,520
is recommended.\n
Screenshots on WinXP: \image html siprtp.jpg "siprtp screenshot on WinXP"
- @ref page_pjmedia_samples_tonegen_c\n
- @ref page_pjmedia_samples_tonegen_c \n
This is a simple program to generate a tone and write the samples to
a raw PCM file. The main purpose of this file is to analyze the
quality of the tones/sine wave generated by PJMEDIA tone/sine wave
generator.
- @ref page_pjmedia_samples_aectest_c\n
- @ref page_pjmedia_samples_aectest_c \n
Play a file to speaker, run AEC, and record the microphone input
to see if echo is coming.
*/

View File

@ -184,7 +184,7 @@ PJ_INLINE(pj_status_t) pjmedia_endpt_destroy(pjmedia_endpt *endpt)
* @param flag The flag.
* @param value Pointer to the value to be set.
*
* @reurn PJ_SUCCESS on success.
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_endpt_set_flag(pjmedia_endpt *endpt,
pjmedia_endpt_flag flag,

View File

@ -194,7 +194,7 @@ PJ_BEGIN_DECL
* been deprecated and replaced by set_eof_cb2() and set_cb2(), which
* will call the callback asynchronously without expecting any return value.
*
* See also https://trac.pjsip.org/repos/ticket/2251.
* See also https://github.com/pjsip/pjproject/issues/2251.
*/
#ifndef DEPRECATED_FOR_TICKET_2251
# define DEPRECATED_FOR_TICKET_2251 0

View File

@ -247,7 +247,7 @@ PJ_DECL(pj_status_t) pjmedia_sdp_attr_to_rtpmap(pj_pool_t *pool,
*
* @param attr Generic attribute to be converted to rtpmap, which
* name must be "rtpmap". Attribute value must be
* terminated with a NULL, '\r', or '\n' character.
* terminated with a NULL, CR, or LF character.
* @param rtpmap SDP \a rtpmap attribute to be initialized.
*
* @return PJ_SUCCESS if the attribute can be successfully

View File

@ -87,7 +87,7 @@
* remote peer using signaling protocol such as SIP.
*
*
* \subsection sdpneg_subseq_offer Generating Subsequent Offer
* \subsection sdpneg_generate_offer Generating Subsequent Offer
*
* The negotiator can only create subsequent offer after it has finished
* the negotiation process of previous offer/answer session (i.e. the
@ -771,7 +771,7 @@ typedef pj_status_t (*pjmedia_sdp_neg_fmt_match_cb)(pj_pool_t *pool,
* the negotiation must be done by the format or codec implementation.
*
* To unregister the callback of specific format, just call this function with
* parameter #cb set to NULL.
* parameter cb set to NULL.
*
* @param fmt_name The format name, e.g: "H.264", "AMR", "G7221". Note
* that the string buffer must remain valid until the

View File

@ -51,8 +51,7 @@ PJ_BEGIN_DECL
/**
* Multichannel to monochannel conversion, it has two operation mode specified
* by param options, @see pjmedia_stereo_options. This function can work safely
* Multichannel to monochannel conversion. This function can work safely
* using the same buffer (in place conversion).
*
* @param mono Output buffer to store the mono frame extracted
@ -148,8 +147,7 @@ PJ_INLINE(pj_status_t) pjmedia_convert_channel_1ton(pj_int16_t multi[],
/**
* Options for channel converter port. The #pjmedia_stereo_options is also
* valid for this port options.
* Options for channel converter port.
*/
typedef enum pjmedia_stereo_port_options
{

View File

@ -65,7 +65,7 @@ typedef struct pjmedia_stream_ka_config
/**
* The number of keepalive to be sent after the stream is created.
* When this is set to 0, keepalive will be sent once for NAT hole
* punching if stream's #use_ka is enabled.
* punching if stream's use_ka is enabled.
*
* Default: PJMEDIA_STREAM_START_KA_CNT
*/

View File

@ -20,7 +20,7 @@
#define __PJMEDIA_VIDPORT_H__
/**
* @file pjmedia/videoport.h Video media port
* @file pjmedia/vid_port.h Video media port
* @brief Video media port
*/

View File

@ -71,7 +71,7 @@ PJ_BEGIN_DECL
* specifying #pjmedia_stream_info structure in the parameter. Application
* can construct the #pjmedia_vid_stream_info structure manually, or use
* #pjmedia_vid_stream_info_from_sdp() function to construct the
* #pjmedia_vid stream_info from local and remote SDP session descriptors.
* #pjmedia_vid_stream_info from local and remote SDP session descriptors.
*/

View File

@ -92,7 +92,7 @@ PJ_DECL(pj_status_t) pjmedia_vid_tee_create(pj_pool_t *pool,
* destination port's media format must match the source format.
*
* @param vid_tee The video tee.
* @param option Video tee option, see @pjmedia_vid_tee_flag.
* @param option Video tee option, see pjmedia_vid_tee_flag.
* @param port The destination media port.
*
* @return PJ_SUCCESS on success, or the appropriate error
@ -109,7 +109,7 @@ PJ_DECL(pj_status_t) pjmedia_vid_tee_add_dst_port(pjmedia_port *vid_tee,
* the source format.
*
* @param vid_tee The video tee.
* @param option Video tee option, see @pjmedia_vid_tee_flag.
* @param option Video tee option, see pjmedia_vid_tee_flag.
* @param port The destination media port.
*
* @return PJ_SUCCESS on success, or the appropriate error

View File

@ -683,6 +683,7 @@ PJ_DECL(pj_status_t) pjmedia_vid_dev_lookup(const char *drv_name,
* Initialize the video device parameters with default values for the
* specified device.
*
* @param pool The pool.
* @param id The video device ID.
* @param param The video device parameters which will be initialized
* by this function once it returns successfully.

View File

@ -22,7 +22,7 @@
/**
* @file pjmedia_audiodev.h
* @brief PJMEDIA main header file.
* @brief PJMEDIA-AUDIODEV main header file.
*/
#include <pjmedia-audiodev/audiodev.h>

View File

@ -21,7 +21,7 @@
/**
* @file pjmedia_videodev.h
* @brief PJMEDIA main header file.
* @brief PJMEDIA-VIDEODEV main header file.
*/
#include <pjmedia-videodev/videodev.h>

View File

@ -1046,7 +1046,7 @@ static pj_status_t bb10_stream_set_cap(pjmedia_aud_stream *strm,
/* OS 10.2.1 requires pausing audio stream */
/* No longer necessary!
* See https://trac.pjsip.org/repos/ticket/1743
* See https://github.com/pjsip/pjproject/issues/1743
*/
need_restart = PJ_FALSE;
/*

View File

@ -1169,7 +1169,7 @@ static pj_status_t set_cap(void *data)
* the window's flag to shown (while the window is, actually,
* still hidden). This causes problems later when setting/querying
* the window's visibility.
* See ticket #1429 (http://trac.pjsip.org/repos/ticket/1429)
* See ticket #1429 (https://github.com/pjsip/pjproject/issues/1429)
*/
Uint32 flag = SDL_GetWindowFlags(strm->window);
if (flag & SDL_WINDOW_HIDDEN)

View File

@ -129,7 +129,7 @@ PJ_DEF(pj_uint8_t) pjmedia_linear2alaw(
mask = 0x55; /* sign bit = 0 */
pcm_val = -pcm_val - 8;
/* https://trac.pjsip.org/repos/ticket/1301
/* https://github.com/pjsip/pjproject/issues/1301
* Thank you K Johnson - Zetron - 27 May 2011
*/
if (pcm_val < 0)

View File

@ -154,7 +154,7 @@ PJ_DEF(pj_status_t) pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr,
PJ_ASSERT_RETURN(mgr && factory, PJ_EINVAL);
/* Since 2.0 we require codec factory to implement "destroy" op. Please
* see: https://trac.pjsip.org/repos/ticket/1294
* see: https://github.com/pjsip/pjproject/issues/1294
*
* Really! Please do see it.
*/

View File

@ -1436,8 +1436,8 @@ static pj_status_t put_frame_imp( pjmedia_port *port,
* In this case we periodically transmit RTP frame to keep NAT binding
* open, by giving zero PCM frame to the codec.
*
* This was originally done in http://trac.pjsip.org/repos/ticket/56,
* but then disabled in http://trac.pjsip.org/repos/ticket/439, but
* This was originally done in https://github.com/pjsip/pjproject/issues/56,
* but then disabled in https://github.com/pjsip/pjproject/issues/439, but
* now it's enabled again.
*/
} else if (frame->type == PJMEDIA_FRAME_TYPE_AUDIO &&
@ -1597,7 +1597,7 @@ static pj_status_t put_frame( pjmedia_port *port,
samples_per_frame = stream->enc_samples_per_pkt;
/* http://www.pjsip.org/trac/ticket/56:
/* https://github.com/pjsip/pjproject/issues/56:
* when input is PJMEDIA_FRAME_TYPE_NONE, feed zero PCM frame
* instead so that encoder can decide whether or not to transmit
* silence frame.

View File

@ -360,7 +360,7 @@ static pj_status_t sdes_encode_sdp( pjmedia_transport *tp,
/* No, we still need to process SRTP offer/answer even if the media is
* marked as inactive, because the transport is still alive in this
* case (e.g. for keep-alive). See:
* http://trac.pjsip.org/repos/ticket/1079
* https://github.com/pjsip/pjproject/issues/1079
*/
/*
if (pjmedia_sdp_media_find_attr(m_loc, &ID_INACTIVE, NULL) ||

View File

@ -32,7 +32,7 @@
#define THIS_FILE "wsola.c"
/*
* http://trac.pjsip.org/repos/ticket/683:
* https://github.com/pjsip/pjproject/issues/683:
* Workaround for segfault problem in the fixed point version of create_win()
* on ARM9 platform, possibly due to gcc optimization bug.
*

View File

@ -44,7 +44,7 @@ void app_perror(pj_status_t status, const char *msg)
}
/* Force linking PLC stuff if G.711 is disabled. See:
* https://trac.pjsip.org/repos/ticket/1337
* https://github.com/pjsip/pjproject/issues/1337
*/
#if PJMEDIA_HAS_G711_CODEC==0
void *dummy()

View File

@ -40,7 +40,7 @@ for peer-to-peer communication, such as (and especially) VoIP.
<strong>\ref nat_intro "Read more.."</strong>
\section intro Introduction to PJNATH
\section pjnath_intro Introduction to PJNATH
PJSIP NAT Helper (PJNATH) is a library which contains the implementation of
standard based NAT traversal solutions. PJNATH can be used as a stand-alone
@ -88,11 +88,11 @@ PJNATH has the following features:
The library provides the following main component groups:
- \ref PJNATH_STUN\n\n
- \ref PJNATH_TURN\n\n
- \ref PJNATH_ICE\n\n
- \ref PJNATH_NAT_DETECT\n\n
- \ref PJNATH_UPNP\n\n
- \ref PJNATH_STUN \n\n
- \ref PJNATH_TURN \n\n
- \ref PJNATH_ICE \n\n
- \ref PJNATH_NAT_DETECT \n\n
- \ref PJNATH_UPNP \n\n
Apart from the \ref PJNATH_NAT_DETECT and \ref PJNATH_UPNP, each component
group are further divided into two functionalities:

View File

@ -26,21 +26,21 @@ below were taken on a Windows machine, but the library is very portable and
it is known to run on platforms such as Linux, MacOS X, Windows Mobile,
Symbian, and so on.
- @ref ice_demo_sample\n
- @ref ice_demo_sample \n
This sample demonstrates how to use \ref PJNATH_ICE_STREAM_TRANSPORT
<b>without</b> using signaling protocol such as <b>SIP</b>. It provides
interactive user interface to create and manage the ICE sessions as well
as to exchange SDP with another ice_demo instance.\n\n
\image html ice_demo.jpg "ice_demo on WinXP"
- @ref turn_client_sample\n
- @ref turn_client_sample \n
This sample demonstrates how to use \ref PJNATH_TURN_SOCK
and also \ref PJNATH_STUN_SOCK. It provides interactive
user interface to manage allocation, permissions, and
channel bindings.\n\n
\image html pjturn_client.jpg "pjturn_client on WinXP"
- TURN server sample\n
- TURN server sample \n
This is a simple sample TURN server application, which
we mainly use for testing (as back then there is no TURN
server available).\n

View File

@ -736,7 +736,7 @@ MAN_LINKS = NO
# feature is still experimental and incomplete at the
# moment.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
@ -844,11 +844,20 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
PJ_IDEF(x)=x PJ_INLINE(x)=x \
PJ_DECL_DATA(x)=x \
PJ_DECL_NO_RETURN(x)=x \
PJ_NO_RETURN=x \
PJ_THREAD_FUNC= \
PJ_HAS_HIGH_RES_TIMER=1 \
PJ_LOG_MAX_LEVEL=4 \
PJ_HAS_SEMAPHORE=1 \
PJ_HAS_EVENT_OBJ=1
PJ_HAS_EVENT_OBJ=1 \
PJ_HAS_TCP=1 \
PJSUA2_THROW=throw \
PJ_BEGIN_DECL= \
PJ_END_DECL= \
PJ_ATTR_MAY_ALIAS= \
DEPRECATED_FOR_TICKET_2229=0
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.

Some files were not shown because too many files have changed in this diff Show More