- Added support for G7221 codec.

- Added support for WebRTC based audio echo cancellation.
- Minor call notification modifications.
This commit is contained in:
Juha Heinanen
2019-05-20 08:26:12 +03:00
parent 22747552e4
commit 97455d7ec8
6 changed files with 43 additions and 38 deletions
@@ -367,10 +367,8 @@ class BaresipService: Service() {
rejectIntent.putExtra("callp", callp)
val rejectPendingIntent = PendingIntent.getService(this,
REJECT_REQ_CODE, rejectIntent, PendingIntent.FLAG_UPDATE_CURRENT)
nb.addAction(R.drawable.ic_stat, getString(R.string.answer),
answerPendingIntent)
nb.addAction(R.drawable.ic_stat, getString(R.string.reject),
rejectPendingIntent)
nb.addAction(R.drawable.ic_stat, getString(R.string.answer), answerPendingIntent)
nb.addAction(R.drawable.ic_stat, getString(R.string.reject), rejectPendingIntent)
nm.notify(CALL_NOTIFICATION_ID, nb.build())
return
}
@@ -609,13 +607,11 @@ class BaresipService: Service() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val defaultChannel = NotificationChannel(DEFAULT_CHANNEL_ID, "Default",
NotificationManager.IMPORTANCE_LOW)
defaultChannel.description = "Tells that baresip is running"
defaultChannel.lockscreenVisibility = Notification.VISIBILITY_PUBLIC
defaultChannel.lockscreenVisibility = VISIBILITY_PUBLIC
nm.createNotificationChannel(defaultChannel)
val highChannel = NotificationChannel(HIGH_CHANNEL_ID, "High",
NotificationManager.IMPORTANCE_HIGH)
highChannel.description = "Tells about incoming call or message"
highChannel.lockscreenVisibility = Notification.VISIBILITY_PRIVATE
highChannel.lockscreenVisibility = VISIBILITY_PUBLIC
highChannel.enableVibration(true)
nm.createNotificationChannel(highChannel)
}
@@ -15,6 +15,14 @@ object Config {
config = "${config}zrtp_hash yes\n"
write = true
}
if (!config.contains(Regex("module[ ]+webrtc_aec.so"))) {
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[ ]+g7221.so"))) {
config = "${config}module g7221.so\n"
write = true
}
if (config.contains(Regex("#module_app[ ]+mwi.so"))) {
config = config.replace(Regex("#module_app[ ]+mwi.so"),
"module_app mwi.so")