Git Product home page Git Product logo

pjsip-android's Introduction

PJSIP Android

NOTICE! This project is experimental, so don't use it in production! No support is provided and only bug fixes and pull requests can be accepted.

What you need to work with this library:

  • An android device with Android API 18+ (4.3.3 or higher)
  • A PBX (E.g. VoiSmart Orchestra NG or FreeSWITCH, which is open). I'm not going to enter in the detail of how to properly configure your PBX, because that's a different topic and there are excellent tutorials out there.

Architecture

Architecture

This project wraps the standard PJSUA2 bindings in a background service and completely hides SIP from the rest of the application, to be able to have VoIP capabilities at a high level of abstraction. You can talk to the service using static methods and you will receive broadcast intents as a response. To talk to the service, refer to SipServiceCommand static methods. To receive events from the service, extend BroadcastEventReceiver. To see which events are emitted by the service, refer to BroadcastEventEmitter. All the commands that you will send to the service will get executed in the background and without blocking your main thread. Once the service has done the requested job or operation, it will notify you with a broadcast intent. So, you don't risk blocking your UI thread in any way.

Native PJSIP library for Android is compiled using PJSIP Android Builder

Give it a try by checking out the project and running the demo app.

State of the art

What is tested and is working:

  • Single account
  • Make a single call
  • In-Call operations: mute, unmute, hold, un-hold, transfer, send DTMF (RFC 2833)
  • Accept an incoming call
  • Decline an incoming call
  • Get/Set codec priorities
  • Hang up all active calls
  • Hold all active calls

What is missing (contributions are welcome):

  • Multiple calls support
    • be able to handle other calls coming in while you have an active call
    • be able to hold the current call and make another one (this is the base for attended transfers and conference calls)
  • Conference calls
  • Attended call transfer
  • Video support
  • Complete multiple accounts support
  • Respond to a call and play a sound file
  • Support for In-Call RTCP signaling to get call statistics
  • Other things which I'm not aware at the moment...

Recompile native libraries

You need to install Vagrant and VirtualBox and to checkout the project. On OSX or Linux, to recompile the native libraries, just execute:

./build-native-libraries

What happens under the hood is:

  • a new virtual machine with pjsip-android-builder gets prepared
  • the virtual machine gets booted
  • the build scripts gets executed
  • the final libraries gets copied to the proper locations in the Android Studio project
  • the virtual machine gets halted

pjsip-android's People

Contributors

gotev avatar alexbbb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.