omikit-plugin 4.1.4 → 4.1.5
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/LICENSE +18 -16
- package/README.md +11 -3
- package/ios/CallProcess/CallManager.swift +22 -4
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
OMICALL SDK License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022 ViHAT Group
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
in the Software without restriction, including without limitation the rights
|
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
furnished to do so, subject to the following conditions:
|
|
3
|
+
Copyright (c) 2022-2026 ViHAT Group (VIHAT JSC). All rights reserved.
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
This SDK is provided exclusively for customers of the OMICALL platform
|
|
6
|
+
(https://omicall.com). By using this SDK, you agree to the following terms:
|
|
7
|
+
|
|
8
|
+
PERMITTED:
|
|
9
|
+
- Use the SDK to integrate OMICALL services into your applications
|
|
10
|
+
- Include the SDK in applications distributed to your end users
|
|
11
|
+
|
|
12
|
+
PROHIBITED:
|
|
13
|
+
- Use the SDK without an active OMICALL account or subscription
|
|
14
|
+
- Redistribute, sublicense, or sell the SDK as a standalone product
|
|
15
|
+
- Use the SDK to build competing communication platforms
|
|
16
|
+
- Reverse engineer, decompile, or disassemble the SDK
|
|
13
17
|
|
|
14
18
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
SOFTWARE.
|
|
19
|
+
IMPLIED. IN NO EVENT SHALL VIHAT GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY ARISING FROM THE USE OF THIS SOFTWARE.
|
|
21
|
+
|
|
22
|
+
Contact: support@omicall.com
|
package/README.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# OMICALL SDK for React Native
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/omikit-plugin)
|
|
4
|
+
[](https://www.npmjs.com/package/omikit-plugin)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install omikit-plugin
|
|
9
|
+
```
|
|
10
|
+
|
|
3
11
|
The [omikit-plugin](https://www.npmjs.com/package/omikit-plugin) enables VoIP/SIP calling via the OMICALL platform with support for both Old and **New Architecture** (TurboModules + Fabric).
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
> **⚠️ Expo is not supported.** This SDK requires native modules (SIP/VoIP, CallKit, PushKit) that are not compatible with Expo managed workflow. Please use React Native CLI.
|
|
6
14
|
|
|
7
15
|
---
|
|
8
16
|
|
|
@@ -33,8 +41,8 @@ The [omikit-plugin](https://www.npmjs.com/package/omikit-plugin) enables VoIP/SI
|
|
|
33
41
|
|
|
34
42
|
| omikit-plugin | React Native | Architecture | Installation |
|
|
35
43
|
|---------------|--------------|--------------|--------------|
|
|
36
|
-
| **4.
|
|
37
|
-
| 3.3.x | 0.60 – 0.73 | Old Architecture only | `npm install omikit-plugin@3.3.29` |
|
|
44
|
+
| **4.x** (latest) | 0.74+ | Old + New (auto-detect) | `npm install omikit-plugin` |
|
|
45
|
+
| 3.3.x (legacy) | 0.60 – 0.73 | Old Architecture only | `npm install omikit-plugin@3.3.29` |
|
|
38
46
|
|
|
39
47
|
**v4.0.x highlights:**
|
|
40
48
|
- **TurboModules (JSI)** — 4-10x faster native method calls via direct C++ bridge
|
|
@@ -394,9 +394,27 @@ class CallManager {
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
@objc func callDealloc(_ notification: NSNotification) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
// Extract endCause from OMICallDealloc notification — this is the reliable source
|
|
398
|
+
// for the SIP end code (486=busy, 603=decline, 408=timeout, etc.)
|
|
399
|
+
let endCause = notification.userInfo?[OMINotificationEndCauseKey] as? Int
|
|
400
|
+
|
|
401
|
+
if var info = tempCallInfo, !info.isEmpty {
|
|
402
|
+
info["status"] = OMICallState.disconnected.rawValue
|
|
403
|
+
if let endCause = endCause {
|
|
404
|
+
info["code_end_call"] = endCause
|
|
405
|
+
info["codeEndCall"] = endCause
|
|
406
|
+
}
|
|
407
|
+
OmikitPlugin.instance?.sendEvent(withName: CALL_STATE_CHANGED, body: info)
|
|
408
|
+
tempCallInfo = [:]
|
|
409
|
+
} else if let endCause = endCause {
|
|
410
|
+
// No tempCallInfo (callStateChanged fired first and cleared it),
|
|
411
|
+
// but we still have an endCause — send minimal event so JS gets the code
|
|
412
|
+
let fallback: [String: Any] = [
|
|
413
|
+
"status": OMICallState.disconnected.rawValue,
|
|
414
|
+
"code_end_call": endCause,
|
|
415
|
+
"codeEndCall": endCause
|
|
416
|
+
]
|
|
417
|
+
OmikitPlugin.instance?.sendEvent(withName: CALL_STATE_CHANGED, body: fallback)
|
|
400
418
|
}
|
|
401
419
|
}
|
|
402
420
|
|
|
@@ -457,7 +475,7 @@ class CallManager {
|
|
|
457
475
|
}
|
|
458
476
|
OmikitPlugin.instance?.sendEvent(withName: CALL_STATE_CHANGED, body: combinedDictionary )
|
|
459
477
|
lastTimeCall = Date()
|
|
460
|
-
tempCallInfo
|
|
478
|
+
// Keep tempCallInfo for callDealloc — it will clear after use
|
|
461
479
|
break
|
|
462
480
|
default:
|
|
463
481
|
break
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omikit-plugin",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"description": "Omikit Plugin by ViHAT",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"url": "git+https://github.com/VIHATTeam/OMICALL-React-Native-SDK"
|
|
47
47
|
},
|
|
48
48
|
"author": "ViHAT Group <tranhoaihung05@gmail.com>",
|
|
49
|
-
"license": "
|
|
49
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
50
50
|
"bugs": {
|
|
51
51
|
"url": "https://github.com/VIHATTeam/OMICALL-React-Native-SDK/issues"
|
|
52
52
|
},
|