Skip to content
Chakrit Wichian edited this page Jul 12, 2014 · 3 revisions

PJSIP

This is an unofficial verbatim mirror/fork of the PJSIP's Subversion source tree (http://svn.pjsip.org/repos/pjproject/trunk/). This is a dependency for Gossip which is using Git thus the need for this mirror.

Checkout Gossip for an Objective-C friendly object-oriented wrapper.

BUILD

To get PJSIP building on your machine, read the following 2 links which should be PJSIP's official building instructions:

  1. http://trac.pjsip.org/repos/wiki/Getting-Started/Build-Preparation — General build preparation instruction.
  2. http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone — iPhone-specific build flags.

For the lazy, this works for building with SDK 7.1 as of commit b0af6c8 :

$ echo "#define PJ_CONFIG_IPHONE 1" > pjlib/include/pj/config_site.h
$ echo "#include <pj/config_site_sample.h>" >> pjlib/include/pj/config_site.h
$ cat pjlib/include/pj/config_site.h
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>

$ ARCH="-arch armv7s" ./configure-iphone
$ make dep
$ make clean
$ make

This should produce working static library files for each PJSIP component. You can verify by running the following set of commands:

$ find **/*.a
pjlib-util/lib/libpjlib-util-arm-apple-darwin9.a
pjlib/lib/libpj-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-audiodev-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-codec-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-videodev-arm-apple-darwin9.a
pjmedia/lib/libpjsdp-arm-apple-darwin9.a
pjnath/lib/libpjnath-arm-apple-darwin9.a
pjsip/lib/libpjsip-arm-apple-darwin9.a
pjsip/lib/libpjsip-simple-arm-apple-darwin9.a
pjsip/lib/libpjsip-ua-arm-apple-darwin9.a
pjsip/lib/libpjsua-arm-apple-darwin9.a
pjsip/lib/libpjsua2-arm-apple-darwin9.a
third_party/lib/libg7221codec-arm-apple-darwin9.a
third_party/lib/libgsmcodec-arm-apple-darwin9.a
third_party/lib/libilbccodec-arm-apple-darwin9.a
third_party/lib/libresample-arm-apple-darwin9.a
third_party/lib/libspeex-arm-apple-darwin9.a
third_party/lib/libsrtp-arm-apple-darwin9.a

You can now directly link those files into your project, import some PJSIP headers and start writing your application.

Clone this wiki locally