Play auto-answer sound when auto-answering

This commit is contained in:
Juha Heinanen
2021-05-24 15:16:10 +03:00
parent 9e293202a4
commit 9f4c8a7fb0
3 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class Account(val accp: String) {
"$res;mwi=yes;vm_uri=\"$vmUri\""
if (answerMode == Api.ANSWERMODE_AUTO)
res += ";answermode=auto"
res += ";answermode=auto;answerdelay=1000"
res += ";ptime=20;regint=${regint};regq=0.5;pubint=0;call_transfer=yes"

View File

@ -545,6 +545,8 @@ class BaresipService: Service() {
startRinging()
}
} else {
val mediaPlayer = MediaPlayer.create(this, R.raw.autoanswer)
mediaPlayer.start()
val newIntent = Intent(this, MainActivity::class.java)
newIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP or
Intent.FLAG_ACTIVITY_NEW_TASK

Binary file not shown.