omikit-plugin 3.2.85 → 3.2.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -70,49 +70,52 @@ class CallManager {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
func rejectCall() -> Bool {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
} catch {
|
|
83
|
-
print("ERROR_WHEN_TRANSFER_CALL_IOS:", error)
|
|
73
|
+
do {
|
|
74
|
+
if let callInfo = omiLib.getCurrentCall(), callInfo.callState != .disconnected {
|
|
75
|
+
if callInfo.callState == .confirmed {
|
|
76
|
+
try callInfo.hangup()
|
|
77
|
+
} else {
|
|
78
|
+
try callInfo.decline(withBusyHere: true) // 486
|
|
79
|
+
}
|
|
80
|
+
return true
|
|
84
81
|
}
|
|
85
|
-
|
|
82
|
+
} catch {
|
|
83
|
+
print("ERROR_WHEN_TRANSFER_CALL_IOS:", error)
|
|
84
|
+
}
|
|
85
|
+
return false
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
func dropCall() -> Bool {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
} else {
|
|
97
|
-
try callInfo.dropCall() // 603
|
|
98
|
-
}
|
|
99
|
-
return true
|
|
89
|
+
do {
|
|
90
|
+
if let callInfo = omiLib.getCurrentCall(), callInfo.callState != .disconnected {
|
|
91
|
+
if callInfo.callState == .confirmed {
|
|
92
|
+
omiLib.callManager.end(callInfo) { error in
|
|
93
|
+
if error != nil {
|
|
94
|
+
}
|
|
100
95
|
}
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
} else {
|
|
97
|
+
try callInfo.drop() // 603
|
|
98
|
+
}
|
|
99
|
+
return true
|
|
103
100
|
}
|
|
104
|
-
|
|
101
|
+
} catch {
|
|
102
|
+
print("ERROR_WHEN_TRANSFER_CALL_IOS:", error)
|
|
103
|
+
}
|
|
104
|
+
return false
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
func configNotification(data: [String: Any]) {
|
|
108
108
|
let user = UserDefaults.standard
|
|
109
|
-
if let title = data["missedCallTitle"] as? String,
|
|
109
|
+
if let title = data["missedCallTitle"] as? String,
|
|
110
|
+
let message = data["prefixMissedCallMessage"] as? String
|
|
111
|
+
{
|
|
110
112
|
user.set(title, forKey: "omicall/missedCallTitle")
|
|
111
113
|
user.set(message, forKey: "omicall/prefixMissedCallMessage")
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
let isUserBusy = data["isUserBusy"] as? Bool ?? true
|
|
115
|
-
OmiClient.configureDeclineCallBehavior(isUserBusy
|
|
117
|
+
OmiClient.configureDeclineCallBehavior(isUserBusy)
|
|
118
|
+
|
|
116
119
|
}
|
|
117
120
|
|
|
118
121
|
|