Merge branch 'amr'
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
This is very basic Android Studio project implementing <a href="https://github.com/alfredh/baresip">baresip</a> based SIP User Agent.
|
||||
This is a bare bone Android Studio project implementing <a href="https://github.com/alfredh/baresip">baresip</a> based SIP User Agent.
|
||||
|
||||
Currently supports voice calls and messages with TLS transport, voicemail MWI, incoming call transfer requests (REFER), PCMU/PCMA, iLBC, G.726, G.722, and G.722.1, and opus voice codecs, as well as ZRTP and (DTLS) SRTP media encapsulation.
|
||||
Currently the application supports voice calling and messaging, UDP, TCP, and TLS signaling transports, voicemail Message Waiting Indication, incoming call transfers (REFER), PCMU/PCMA, iLBC, G.726, G.722, G.722.1, AMR, and Opus voice codecs, as well as ZRTP and (DTLS) SRTP media encapsulation.
|
||||
|
||||
Motivated by need for a secure SIP user agent for Android that does not depend on third party push notification services.
|
||||
|
||||
@ -15,3 +15,4 @@ Then in Android Studio 3.5.1:
|
||||
Available also on <a href="https://f-droid.org/app/com.tutpro.baresip">F-Droid</a> and <a href="https://play.google.com/store/apps/details?id=com.tutpro.baresip&hl=en_US">Google Play</a>.
|
||||
|
||||
Copyright (c) 2018 TutPro Inc. Distributed under BSD-3-Clause license.
|
||||
x
|
||||
@ -21,6 +21,7 @@ rtp_stats no
|
||||
dyn_dns yes
|
||||
net_prefer_ipv6 no
|
||||
module opus.so
|
||||
module amr.so
|
||||
module ilbc.so
|
||||
module g7221.so
|
||||
module g722.so
|
||||
|
||||
@ -5,19 +5,19 @@ set(distribution_DIR ${CMAKE_SOURCE_DIR}/../../../../distribution)
|
||||
|
||||
add_library(lib_crypto STATIC IMPORTED)
|
||||
set_target_properties(lib_crypto PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/openssl/lib/${ANDROID_ABI}/libcrypto.a)
|
||||
${distribution_DIR}/openssl/lib/${ANDROID_ABI}/libcrypto.a)
|
||||
|
||||
add_library(lib_ssl STATIC IMPORTED)
|
||||
set_target_properties(lib_ssl PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/openssl/lib/${ANDROID_ABI}/libssl.a)
|
||||
${distribution_DIR}/openssl/lib/${ANDROID_ABI}/libssl.a)
|
||||
|
||||
add_library(lib_re STATIC IMPORTED)
|
||||
set_target_properties(lib_re PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/re/lib/${ANDROID_ABI}/libre.a)
|
||||
${distribution_DIR}/re/lib/${ANDROID_ABI}/libre.a)
|
||||
|
||||
add_library(lib_rem STATIC IMPORTED)
|
||||
set_target_properties(lib_rem PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/rem/lib/${ANDROID_ABI}/librem.a)
|
||||
${distribution_DIR}/rem/lib/${ANDROID_ABI}/librem.a)
|
||||
|
||||
add_library(lib_opus STATIC IMPORTED)
|
||||
set_target_properties(lib_opus PROPERTIES IMPORTED_LOCATION
|
||||
@ -25,15 +25,19 @@ set_target_properties(lib_opus PROPERTIES IMPORTED_LOCATION
|
||||
|
||||
add_library(lib_spandsp STATIC IMPORTED)
|
||||
set_target_properties(lib_spandsp PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/spandsp/lib/${ANDROID_ABI}/libspandsp.a)
|
||||
${distribution_DIR}/spandsp/lib/${ANDROID_ABI}/libspandsp.a)
|
||||
|
||||
add_library(lib_g722_1 STATIC IMPORTED)
|
||||
set_target_properties(lib_g722_1 PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/g7221/lib/${ANDROID_ABI}/libg722_1.a)
|
||||
${distribution_DIR}/g7221/lib/${ANDROID_ABI}/libg722_1.a)
|
||||
|
||||
add_library(lib_amrnb STATIC IMPORTED)
|
||||
set_target_properties(lib_amrnb PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/amr/lib/${ANDROID_ABI}/libamrnb.a)
|
||||
|
||||
add_library(lib_ilbc STATIC IMPORTED)
|
||||
set_target_properties(lib_ilbc PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/ilbc/lib/${ANDROID_ABI}/libilbc.a)
|
||||
${distribution_DIR}/ilbc/lib/${ANDROID_ABI}/libilbc.a)
|
||||
|
||||
add_library(lib_webrtc STATIC IMPORTED)
|
||||
set_target_properties(lib_webrtc PROPERTIES IMPORTED_LOCATION
|
||||
@ -49,30 +53,31 @@ set_target_properties(lib_zrtp PROPERTIES IMPORTED_LOCATION
|
||||
|
||||
add_library(lib_baresip STATIC IMPORTED)
|
||||
set_target_properties(lib_baresip PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/baresip/lib/${ANDROID_ABI}/libbaresip.a)
|
||||
${distribution_DIR}/baresip/lib/${ANDROID_ABI}/libbaresip.a)
|
||||
|
||||
add_library(baresip SHARED baresip.c)
|
||||
|
||||
target_include_directories(baresip PRIVATE
|
||||
${distribution_DIR}/openssl/include
|
||||
${distribution_DIR}/re/include
|
||||
${distribution_DIR}/rem/include
|
||||
${distribution_DIR}/baresip/include)
|
||||
${distribution_DIR}/openssl/include
|
||||
${distribution_DIR}/re/include
|
||||
${distribution_DIR}/rem/include
|
||||
${distribution_DIR}/baresip/include)
|
||||
|
||||
target_link_libraries(baresip
|
||||
android
|
||||
OpenSLES
|
||||
lib_baresip
|
||||
lib_rem
|
||||
lib_re
|
||||
lib_ssl
|
||||
lib_crypto
|
||||
lib_opus
|
||||
lib_spandsp
|
||||
lib_g722_1
|
||||
lib_ilbc
|
||||
lib_webrtc
|
||||
lib_zrtp
|
||||
lib_bn
|
||||
z
|
||||
log)
|
||||
android
|
||||
OpenSLES
|
||||
lib_baresip
|
||||
lib_rem
|
||||
lib_re
|
||||
lib_ssl
|
||||
lib_crypto
|
||||
lib_opus
|
||||
lib_spandsp
|
||||
lib_g722_1
|
||||
lib_ilbc
|
||||
lib_amrnb
|
||||
lib_webrtc
|
||||
lib_zrtp
|
||||
lib_bn
|
||||
z
|
||||
log)
|
||||
|
||||
@ -21,9 +21,10 @@ object Config {
|
||||
config = "${config}ausrc_format s16\nauplay_format s16\nauenc_format s16\naudec_format s16\nmodule webrtc_aec.so\n"
|
||||
write = true
|
||||
}
|
||||
if (!config.contains(Regex("module[ ]+g726.so"))) {
|
||||
if (!config.contains(Regex("module[ ]+amr.so"))) {
|
||||
config = config.replace(Regex("module[ ]+g7...?.so\n"), "")
|
||||
config = config.replace(Regex("module[ ]+ilbc.so\n"), "")
|
||||
config = "${config}module amr.so\n"
|
||||
config = "${config}module ilbc.so\n"
|
||||
config = "${config}module g7221.so\n"
|
||||
config = "${config}module g722.so\n"
|
||||
@ -94,6 +95,7 @@ object Config {
|
||||
write = true
|
||||
}
|
||||
}
|
||||
|
||||
if (write) {
|
||||
Log.e("Baresip", "Writing config '$config'")
|
||||
Utils.putFileContents(configPath, config.toByteArray())
|
||||
|
||||
Reference in New Issue
Block a user