Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Latest commit

 

History

History
executable file
·
97 lines (77 loc) · 6.42 KB

Building_iDoubs_v2_x.md

File metadata and controls

executable file
·
97 lines (77 loc) · 6.42 KB

Introduction

iDoubs v2.x is a beta version of our (Doubango Telecom) VoIP client for iOS (iPhone, iPod Touch and iPad) and MAC OS X and is based on Doubango v2.x while iDoubs v1.x (alpha version) was based on Doubango v1.x.

This new version is now split in two parts: iDoubs v2.x and ios-ngn-stack.

  1. iDoubs v2.x is the VoIP client and mostly contain UI related code. It depends on ios-ngn-stack project (see below).
  2. ios-ngn-stack is our NGN (Next Generation Network) Framework and contains Objective-C wrappers (around ANSI-C) for Doubango. This framework contains wrappers for the protocol stacks (SIP, MSRP, HTTP, RTP ...), utility services (Database storage, Call log management, Address Book ...).

Checking out the source code

To build the source code you will need: xcode 3.x or later, iOS SDK 4.x or later and git tools.

  • open new Terminal (Applications => Utilities => Terminal)

  • checkout doubango source code. Important: The destination folder MUST be named doubango:

git clone https://github.com/DoubangoTelecom/doubango.git doubango
  • checkout idoubs source code. Important: The destination folder MUST be named idoubs:
git clone https://github.com/DoubangoTelecom/idoubs.git idoubs

Building the source code

This section explain how to build Doubango, the NGN Stack and iDoubs from xcode.

Building the NGN Stack

As stated in the Introduction section, iDoubs v2.x depends on the NGN Stack which means that you MUST build this target before building iDoubs target.
Note: iDoubs project already contains a reference to the NGN Stack (ios-ngn-stack) which means that you can build it directly from iDoubs. This is not advised if you are building iDoubs for the first time.

  • open idoubs/ios-ngn-stack/ios-ngn-stack.xcodeproj
  1. Very Important: make sure that the right base sdk is selected (iOS SDK x.y): Right click on ios-ngn-stack => Get Info => Build tab => From Architectures group, adjust Base SDK and select "iOS x.y" where "x.y" is your preferred version of the iOS SDK
  2. build Doubango: Right click on Doubango aggregated target and select Build Doubango
  3. build the NGN stack: Right click on ios-ngn-stack target and select Build ios-ngn-stack

You are now ready to build the test applications if you want:

  1. testRegistration: to test SIP registration
  2. testAudioCall: to test audio calls
  3. testVideoCall: to test video calls
  4. testMessaging: to test Instant Messaging (SIP Pager Mode IM)

Building iDoubs

iDoubs is the VoIP client and depends on ios-ngn-stack target.

  • open idoubs/ios-idoubs/idoubs.xcodeproj
  1. Very Important: make sure that the right base sdk is selected (iOS SDK x.y): Right click on ios-ngn-stack => Get Info => Build tab => From Architectures group adjust Base SDK and select "iOS x.y" where "x.y" is your preferred version of the iOS SDK
  2. build Doubango: Right click on Doubango aggregated target and select Build Doubango
  3. build the NGN stack: Right click on Ngn target and select Build Ngn
  4. build the iDoubs: Right click on iDoubs target and select Build iDoubs

Et voilà. You can now run iDoubs.
**Note:** As you have remarked, it's possible to build both the NGN stack and Doubango projects from **iDoubs**.
Before starting to use iDoubs, please take a look at the user guide in order to understand how to configure the client.

Building non-GPL version

If you are license owner then, you can build a non-GPL version of Doubango and iDoubs like this:

  • open idoubs/ios-idoubs/idoubs.xcodeproj

  • Right click on idoubs target => Get Info => Build tab => Other Linker Flags then:

    1. remove -lx264
    2. remove -lg729b if you don't have required licenses
    3. replace -lswscale, -lavcore, -lavutil and -lavcodec with -lswscale-lgpl, -lavcore-lgpl, -lavutil-lgpl and -lavcodec-lgpl respectively
  • open idoubs/ios-ngn-stack/ios-ngn-stack.xcodeproj

  • Right click on ios-ngn-stack target => Get Info => Build tab => Other C Flags then:

    1. replace -DHAVE_H264=1 with -DHAVE_H264=0
    2. replace -DHAVE_G729=1 with -DHAVE_G729=0 if you don't have required licenses

Building commercial version

If you are license owner then, you can build a commercial version of Doubango and iDoubs like this:

  • open idoubs/ios-idoubs/idoubs.xcodeproj

  • Right click on idoubs target => Get Info => Build tab => Other Linker Flags then:

    1. remove -lx264
    2. remove -lg729b if you don't have required licenses
    3. remove -lswscale, -lavcore, -lavutil and -lavcodec
  • open idoubs/ios-ngn-stack/ios-ngn-stack.xcodeproj

  • Right click on ios-ngn-stack target => Get Info => Build tab => Other C Flags then:

    1. replace -DHAVE_H264=1 with -DHAVE_H264=0
    2. replace -DHAVE_FFMPEG=1 with -DHAVE_FFMPEG=0
    3. replace -DHAVE_SWSCALE=1 with -DHAVE_SWSCALE=0
    4. replace -DHAVE_G729=1 with -DHAVE_G729=0 if you don't have required licenses

Linking the ios-ngn-stack in your own app

  1. Place your application code in the same folder than iDoubs: mydoubs/ iPhone/idoubs/branches/2.0/. This is not required but it's easier to avoid changing the paths by yourself.
  2. Add ios-ngn-stack project as reference to your xcode project as explained at http://www.weston-fl.com/blog/?p=2429
  3. Copy all "User-Defined" settings from iDoubs project (NOT target) to your application project
  4. Copy "Other Linker Flags" value from iDoubs target (NOT project) to you application target
  5. Same as (4) for "Header Search Paths"
  6. Same as (4) for "Library Search Paths"

Technical help

Please check our issue tracker or developer group if you have any problem.