Play auto-answer sound when auto-answering
This commit is contained in:
@@ -116,7 +116,7 @@ class Account(val accp: String) {
|
|||||||
"$res;mwi=yes;vm_uri=\"$vmUri\""
|
"$res;mwi=yes;vm_uri=\"$vmUri\""
|
||||||
|
|
||||||
if (answerMode == Api.ANSWERMODE_AUTO)
|
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"
|
res += ";ptime=20;regint=${regint};regq=0.5;pubint=0;call_transfer=yes"
|
||||||
|
|
||||||
|
|||||||
@@ -545,6 +545,8 @@ class BaresipService: Service() {
|
|||||||
startRinging()
|
startRinging()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
val mediaPlayer = MediaPlayer.create(this, R.raw.autoanswer)
|
||||||
|
mediaPlayer.start()
|
||||||
val newIntent = Intent(this, MainActivity::class.java)
|
val newIntent = Intent(this, MainActivity::class.java)
|
||||||
newIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP or
|
newIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP or
|
||||||
Intent.FLAG_ACTIVITY_NEW_TASK
|
Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user