Call transfer modifications

This commit is contained in:
Juha Heinanen
2021-12-08 10:03:58 +02:00
parent 798e50ffe8
commit f0523e0fb0
6 changed files with 52 additions and 50 deletions
@@ -29,14 +29,17 @@ class Call(val callp: String, val ua: UserAgent, val peerUri: String, val dir: S
}
fun hold(): Int {
return call_hold(callp)
return call_hold(callp, true)
}
fun unhold(): Int {
return call_unhold(callp)
fun resume(): Int {
return call_hold(callp, false)
}
fun refer(uri: String): Int {
fun transfer(uri: String): Int {
val err = call_hold(callp, true)
if (err != 0)
return err
referTo = uri
return call_transfer(callp, uri)
}
@@ -62,8 +65,7 @@ class Call(val callp: String, val ua: UserAgent, val peerUri: String, val dir: S
}
private external fun call_connect(callp: String, peer_uri: String): Int
private external fun call_hold(callp: String): Int
private external fun call_unhold(callp: String): Int
private external fun call_hold(callp: String, hold: Boolean): Int
private external fun call_ismuted(callp: String): Boolean
private external fun call_transfer(callp: String, peer_uri: String): Int
private external fun call_send_digit(callp: String, digit: Char): Int