Porting PJSIP, PJMEDIA, and PJLIB to BlackBerry 10

by Retired on ‎01-09-2013 02:56 PM - edited on ‎01-09-2013 03:08 PM by Retired (7,460 Views)

PJSIP is a free, open source multimedia stack written in C that supports audio, video, presence, and instant messaging capabilities. These capabilities allow you to develop compelling real-time communication applications, such as a VoIP phone app.

 

This porting guide demonstrates how to integrate PJSIP into your BlackBerry® 10 Cascades™ application. Note that you need to build the PJSIP libraries using the Linux® version of the BlackBerry 10 Native SDK, but you can then import the libraries into your BlackBerry 10 Cascades application using the Windows® or Mac version of the Native SDK.

 

Ported libraries

  • libg7221codec
  • libgsmcodec
  • libilbccodec
  • libmilenage
  • libopencore-amrnb.a
  • libopencore-amrwb.a
  • libpj
  • libpjlib-util
  • libpjmedia
  • libpjmedia-audiodev
  • libpjmedia-codec
  • libpjmedia-videodev
  • libpjnath
  • libpjsdp
  • libpjsip
  • libpjsip-simple
  • libpjsip-au
  • libpjsua
  • libportaudio
  • libresample
  • libspeex
  • libsrtp

 

Ported headers

  • pjlib
  • pjlib-util
  • pjmedia
  • pjnath
  • pjsip
  • pjsip-apps
  • third-party

 

Prerequisites

  • Blackberry 10 Native SDK for Linux (Ubuntu® 11.04)
  • Subversion (SVN)
  • Linux OS
  • BlackBerry 10 device

 

Build instructions

    1. Download and install the BlackBerry 10 Native SDK for Linux.

      chmod +x file.bin

      ./file.bin

    2. Install Apache Subversion® for Linux if you don't already have it.

    3. Open a command prompt (building from Linux).

    4. Execute bbndk-env.bat or bbndk-env.sh from the root of your installation of the Native SDK.

    5. Before running the pjbuildscripts, >chmod a+x * to make sure that all the scripts are executable.

    6. In the command prompt, navigate to the pjbuildscripts GitHub® repository and run ./getpjsource.

    7. Download and extract bb10-pjsipdemo-master.zip from GitHub at https://github.com/blackberry/Cascades-Community-Samples/tree/master/bb10-pjsipdemo  (i.e. root@linuxbox:/home/......../Downloads/bb10-pjsipdemo-master/pjbuildscripts# ./getpjsource). 
      This command will sync the source from PJSIP and the opencore-amr zip file, and copy the source to the  ./pjsip-checkout folder under the same pjbuildscripts directory.

    8. In a command prompt, navigate to the pjbuildscripts GitHub repository and run ./buildpjsip (i.e. root@linuxbox:/home/......../Downloads/bb10-pjsipdemo-master/pjbuildscripts# ./buildpjsip).
      This command will first build opencore amr and then the pjsip libraries (pjlibs-armle-v7.zip, pjlibs-x86.zip, pjincludes.zip) in the pjbuildscripts folder for both target (Debug) and simulator (Debug).

    9. In a command prompt, navigate to the pjbuildscripts GitHub repository and run ./createsdkoverlay (i.e root@linuxbox:/home/......../Downloads/bb10-pjsipdemo-master/pjbuildscripts# ./createsdkoverlay).
      This will generate an SDK overlay zip file (sdkfiles.zip) in the pjbuildscripts folder from the previously created zip files (pjlibs-armle-v7.zip, pjlibs-x86.zip, pjincludes.zip).

    10. Within the sdkfile.zip file you will find the libraries and header files which can be added to your BlackBerry 10 Native SDK project (Windows, Linux, or Mac).
      Extract the sdkfile.zip and copy the files to the QNX_TARGET directory.
      Note: These files are already extracted and copied to the $QNX_TARGET directory on the Linux machine that you used to run the pjbuildscripts bash scripts.

    11. Copy the library files in sdkfiles\armle-v7\lib to …\qnx6\armle-v7\lib.

    12. Copy the header folders in sdkfiles\usr\include to \qnx6\usr\include.

    13. Copy the library files in qnx6\usr\include to \qnx6\x86\lib.

 

pic1.png


 

Test instructions

  1. Launch the BlackBerry 10 Native SDK.

  2. Create a new BlackBerry 10 Cascades C++ Project.

    pic2.png

  3. Replace all the source files with src files from the bb10-pjsipdemo-master.zip GitHub repository:
    https://github.com/blackberry/Cascades-Community-Samples/tree/master/bb10-pjsipdemo/src
  4. Replace the pjsipdemo.pro file with the pjsipdemp.pro file in bb10-pjsipdemo-master.zip GitHub repository: https://github.com/blackberry/Cascades-Community-Samples/tree/master/bb10-pjsipdemo
  5. In the PjsipEngine.cpp file, configure the SIP Server settings (SipDomain, sipUser, sipPassword).

  6. Build and deploy your pjsipdemo application project to your BlackBerry 10 device.

 

 

Repository committer

Bob Cripps

 

Bug reporting and feature requests

If you find a bug or have an enhancement request, simply file an issue and send a message (via GitHub messages) to the committers for the project to let them know that you have filed an issue. 

 

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.