# 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](https://github.com/VoiSmart/pjsip-android/blob/master/pjsip-android.png "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](https://github.com/VoiSmart/pjsip-android/blob/master/sipservice/src/main/java/net/gotev/sipservice/SipServiceCommand.java) static methods. To receive events from the service, extend [BroadcastEventReceiver](https://github.com/VoiSmart/pjsip-android/blob/master/sipservice/src/main/java/net/gotev/sipservice/BroadcastEventReceiver.java). To see which events are emitted by the service, refer to [BroadcastEventEmitter](https://github.com/VoiSmart/pjsip-android/blob/master/sipservice/src/main/java/net/gotev/sipservice/BroadcastEventEmitter.java). 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](https://github.com/VoiSmart/pjsip-android-builder)
Give it a try by checking out the project and running the [demo app](https://github.com/VoiSmart/pjsip-android/tree/master/examples/demoapp).
# 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](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) and to checkout the project. On OSX or Linux, to recompile the native libraries, just execute:
```shell
./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-Demo
共273个文件
java:226个
so:9个
xml:8个
3星 · 超过75%的资源 需积分: 27 42 下载量 55 浏览量
2017-12-26
10:57:02
上传
评论
收藏 12.53MB RAR 举报
温馨提示
PJSIP是一个开放源代码的SIP协议栈,它支持多种SIP的扩展功能 。本资料基于PJSIP的语音电话Android Demo AS工程。
资源详情
资源评论
资源推荐
收起资源包目录
PJSIP-Android-Demo (273个子文件)
gradlew.bat 2KB
build-native-libraries 188B
.gitignore 606B
.gitignore 7B
.gitignore 7B
.gitmodules 0B
build.gradle 3KB
build.gradle 932B
build.gradle 706B
settings.gradle 36B
gradlew 5KB
app.iml 10KB
sipservice.iml 8KB
pjsip-android-master.iml 901B
gradle-wrapper.jar 49KB
pjsua2JNI.java 224KB
SipService.java 31KB
SipServiceCommand.java 16KB
pj_ssl_cipher.java 15KB
Call.java 12KB
pjsip_status_code.java 12KB
SipCall.java 12KB
Endpoint.java 11KB
AudDevManager.java 8KB
AccountNatConfig.java 8KB
pjmedia_format_id.java 7KB
BroadcastEventReceiver.java 7KB
pjsip_hdr_e.java 7KB
Account.java 6KB
MediaConfig.java 6KB
CallInfo.java 6KB
PersistentDocument.java 6KB
BroadcastEventEmitter.java 5KB
SipAccountData.java 5KB
ContainerNode.java 5KB
pjmedia_aud_dev_cap.java 5KB
TlsConfig.java 5KB
AccountConfig.java 5KB
MainActivity.java 4KB
AccountRegConfig.java 4KB
SipAccount.java 4KB
pjmedia_vid_dev_cap.java 4KB
pj_log_decoration.java 4KB
JbufState.java 4KB
RtcpStreamStat.java 4KB
VidDevManager.java 4KB
CodecPriority.java 4KB
AccountSipConfig.java 4KB
UaConfig.java 4KB
RtcpStat.java 4KB
pjsip_transport_type_e.java 3KB
AccountInfo.java 3KB
AudioMediaPlayer.java 3KB
StreamInfo.java 3KB
AccountVideoConfig.java 3KB
pjmedia_event_type.java 3KB
TransportConfig.java 3KB
AuthCredInfo.java 3KB
AccountMediaConfig.java 3KB
CallMediaInfo.java 3KB
pj_ssl_sock_proto.java 3KB
pjmedia_dir.java 3KB
ToneGenerator.java 3KB
pjsua_call_vid_strm_op.java 3KB
BuddyInfo.java 3KB
pj_stun_nat_type.java 3KB
LogConfig.java 3KB
SipEventBody.java 3KB
SipTransaction.java 3KB
pjsip_tsx_state_e.java 3KB
Error.java 3KB
OnIncomingSubscribeParam.java 3KB
AudioDevInfo.java 3KB
SipTxOption.java 3KB
AccountCallConfig.java 3KB
OnInstantMessageStatusParam.java 3KB
AccountPresConfig.java 3KB
TransportInfo.java 3KB
pjsip_ssl_method.java 3KB
VideoWindowInfo.java 3KB
Buddy.java 3KB
PresNotifyParam.java 3KB
pjsip_evsub_state.java 3KB
Logger.java 3KB
OnInstantMessageParam.java 3KB
pjsip_inv_state.java 3KB
TsxStateEventSrc.java 2KB
ConfPortInfo.java 2KB
pjmedia_aud_dev_route.java 2KB
pjsip_event_id_e.java 2KB
CallOpParam.java 2KB
AudioMedia.java 2KB
MediaFormatAudio.java 2KB
pjsua_call_media_status.java 2KB
VideoPreviewOpParam.java 2KB
VideoDevInfo.java 2KB
OnTypingIndicationParam.java 2KB
MediaFormatVideo.java 2KB
pjmedia_tone_desc.java 2KB
RtcpSdes.java 2KB
共 273 条
- 1
- 2
- 3
一代程序码农
- 粉丝: 81
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1