|
@@ -29,7 +29,7 @@ import org.linphone.core.Core
|
|
|
import org.linphone.core.CoreListenerStub
|
|
|
|
|
|
class SipCallFragment: BaseCallFragment() {
|
|
|
- private val TAG = "SkyCallFragment"
|
|
|
+ private val TAG = "SipCallFragment"
|
|
|
|
|
|
//来电设备id
|
|
|
var fromId: Int = -1
|
|
@@ -37,8 +37,6 @@ class SipCallFragment: BaseCallFragment() {
|
|
|
private var interactionVO: InteractionVO? = null
|
|
|
private var sipCore: Core? = null
|
|
|
|
|
|
- private val handler = Handler(Looper.getMainLooper())
|
|
|
-
|
|
|
private var audioCall: Boolean = true
|
|
|
|
|
|
private var callEnded: Boolean = false
|
|
@@ -53,6 +51,7 @@ class SipCallFragment: BaseCallFragment() {
|
|
|
state: Call.State,
|
|
|
message: String
|
|
|
) {
|
|
|
+ Log.d(TAG, "received call state: $state, ${call.remoteAddress}")
|
|
|
if (state == Call.State.IncomingReceived) {
|
|
|
//来电时将自动接听
|
|
|
if (sipCore != null) {
|
|
@@ -136,7 +135,6 @@ class SipCallFragment: BaseCallFragment() {
|
|
|
if (sky_voice_call_timer != null) {
|
|
|
sky_voice_call_timer.stop()
|
|
|
}
|
|
|
- callTerminate()
|
|
|
callEnd(true)
|
|
|
} else {
|
|
|
Constant.CALL_STATE = Constant.CALL_STANDBY
|
|
@@ -304,6 +302,8 @@ class SipCallFragment: BaseCallFragment() {
|
|
|
sky_voice_call_timer.stop()
|
|
|
}
|
|
|
|
|
|
+ callTerminate()
|
|
|
+
|
|
|
Log.e(TAG, "call end !!!!!!!!!!!!!!!!!!")
|
|
|
|
|
|
if (handoff) {
|
|
@@ -348,6 +348,7 @@ class SipCallFragment: BaseCallFragment() {
|
|
|
}
|
|
|
callEnd(true)
|
|
|
} else {
|
|
|
+ //todo: 这里需要修改target sip
|
|
|
val addressToCall = sipCore!!.interpretUrl("3309")
|
|
|
val params = sipCore!!.createCallParams(null)
|
|
|
params.enableVideo(false)
|