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:
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
Call-ID Header
. Refer to this for more detailsca-bundle.crt
file in the sip./sipservice/src/main/assets/
directory; without that the verification will not be enabled)This library ships with a default logger which logs with the default Android Log
class and a default DEBUG
loglevel.
You can customize such behaviour by either:
Setting your own LoggerDelegate. E.g.:
class SipServiceLogger extends Logger.LoggerDelegate {
@Override
public void error(String tag, String message) {
Timber.tag(tag).e(message);
}
@Override
public void error(String tag, String message, Throwable exception) {
Timber.tag(tag).e(exception, message);
}
@Override
public void debug(String tag, String message) {
Timber.tag(tag).d(message);
}
@Override
public void info(String tag, String message) {
Timber.tag(tag).i(message);
}
}
Timber can be configured as you wish, to log everything or just in debug mode, or log to anywhere.
To allow see PjSip logs you need to set SipServiceUtils.ENABLE_SIP_LOGGING
to true
which will log all pjsip logs while in debug mode.
Refer to PJSIP Android Builder