omikit-plugin 3.2.74 → 3.2.75
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.
package/README.md
CHANGED
|
@@ -765,11 +765,13 @@ const result = await startCall({
|
|
|
765
765
|
| `"COULD_NOT_FIND_END_POINT"` | 5 | Please login before making your call |
|
|
766
766
|
| `"REGISTER_ACCOUNT_FAIL"` | 6 | Can't log in to OMI (maybe wrong login information) |
|
|
767
767
|
| `"START_CALL_FAIL"` | 7 | Call failed, please try again |
|
|
768
|
-
| `"HAVE_ANOTHER_CALL"` | 9 | There is another call in progress; please wait for that call to end
|
|
768
|
+
| `"HAVE_ANOTHER_CALL"` | 9 | There is another call in progress; please wait for that call to end |
|
|
769
|
+
| `"EXTENSION_NUMBER_IS_OFF"` | 10 | Extension number off User is turn Off |
|
|
769
770
|
| `"START_CALL_SUCCESS"` | 8 | START CALL SUCCESSFULLY |
|
|
770
771
|
|
|
771
772
|
<br>
|
|
772
773
|
|
|
774
|
+
|
|
773
775
|
📌 **startCallWithUuid()**
|
|
774
776
|
|
|
775
777
|
✅ Description: Call with UUID (only support with Api key):
|
|
@@ -396,7 +396,8 @@ func startCall(_ phoneNumber: String, isVideo: Bool, completion: @escaping (_: S
|
|
|
396
396
|
var dataToSend: [String: Any] = [
|
|
397
397
|
"status": status.rawValue,
|
|
398
398
|
"_id": "",
|
|
399
|
-
"message": OmiUtils.messageCall(type: status.rawValue)
|
|
399
|
+
"message": OmiUtils.messageCall(type: status.rawValue),
|
|
400
|
+
"message_detail": OmiUtils.messageCallDetail(type: statusCall.rawValue)
|
|
400
401
|
]
|
|
401
402
|
|
|
402
403
|
// ✅ Kiểm tra và lấy ID cuộc gọi nếu có
|
|
@@ -429,6 +430,7 @@ func startCall(_ phoneNumber: String, isVideo: Bool, completion: @escaping (_: S
|
|
|
429
430
|
"status": statusCall.rawValue,
|
|
430
431
|
"_id": "",
|
|
431
432
|
"message": OmiUtils.messageCall(type: statusCall.rawValue)
|
|
433
|
+
"message_detail": OmiUtils.messageCallDetail(type: statusCall.rawValue)
|
|
432
434
|
]
|
|
433
435
|
if(callCurrent != nil){
|
|
434
436
|
dataToSend["_id"] = String(describing: OmiCallModel(omiCall: callCurrent!).uuid)
|
|
@@ -35,6 +35,8 @@ public class OmiUtils {
|
|
|
35
35
|
return "START_CALL_FAIL"
|
|
36
36
|
case 9:
|
|
37
37
|
return "HAVE_ANOTHER_CALL"
|
|
38
|
+
case 10:
|
|
39
|
+
return "EXTENSION_NUMBER_IS_OFF"
|
|
38
40
|
default:
|
|
39
41
|
return "START_CALL_SUCCESS"
|
|
40
42
|
}
|
|
@@ -64,10 +66,28 @@ public class OmiUtils {
|
|
|
64
66
|
case 6: return "REGISTER_ACCOUNT_FAIL"
|
|
65
67
|
case 7: return "START_CALL_FAIL"
|
|
66
68
|
case 9: return "HAVE_ANOTHER_CALL"
|
|
69
|
+
case 10: return "EXTENSION_NUMBER_IS_OFF"
|
|
67
70
|
default: return "START_CALL_SUCCESS"
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
/// trả về mã lỗi chi tiết
|
|
75
|
+
static func messageCallDetail(type: Int) -> String {
|
|
76
|
+
switch type {
|
|
77
|
+
case 0: return "UUID đang trống hoặc không chính xác"
|
|
78
|
+
case 1: return "SIP_USER đang trống hoặc không chính xác"
|
|
79
|
+
case 2: return "Bạn đang gọi chính mình"
|
|
80
|
+
case 3: return "Vượt quá số lần gọi, vui lòng thử lại sau 2s"
|
|
81
|
+
case 4: return "Bạn chưa cấp quyền"
|
|
82
|
+
case 5: return "Vui lòng log in vào OMI"
|
|
83
|
+
case 6: return "Đăng nhập vào OMI thất bại, thông tin đăng nhập không chính xác"
|
|
84
|
+
case 7: return "Khởi tạo cuộc gọi không thành công"
|
|
85
|
+
case 9: return "Có một cuộc gọi khác chưa kết thúc"
|
|
86
|
+
case 10: return "Số nội bộ đã tắt"
|
|
87
|
+
default: return "Khởi tạo cuộc gọi thành công"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
71
91
|
static func checkTypeNumber(phoneNumber: String) -> String {
|
|
72
92
|
var result = "phone"
|
|
73
93
|
|
package/omikit-plugin.podspec
CHANGED