omikit-plugin 3.2.37 → 3.2.38
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 +102 -133
- package/android/build.gradle +16 -16
- package/android/settings.gradle +5 -5
- package/omikit-plugin.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,13 +36,13 @@ yarn add omikit-plugin --latest
|
|
|
36
36
|
```
|
|
37
37
|
jcenter()
|
|
38
38
|
maven {
|
|
39
|
-
url "https://
|
|
40
|
-
credentials
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
40
|
+
credentials {
|
|
41
|
+
username = "omicall"
|
|
42
|
+
password = "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"
|
|
43
43
|
}
|
|
44
44
|
authentication {
|
|
45
|
-
|
|
45
|
+
basic(BasicAuthentication)
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
```
|
|
@@ -74,13 +74,13 @@ allprojects {
|
|
|
74
74
|
google()
|
|
75
75
|
maven { url 'https://www.jitpack.io' }
|
|
76
76
|
maven {
|
|
77
|
-
url "https://
|
|
78
|
-
credentials
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
78
|
+
credentials {
|
|
79
|
+
username = "omicall"
|
|
80
|
+
password = "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"
|
|
81
81
|
}
|
|
82
82
|
authentication {
|
|
83
|
-
|
|
83
|
+
basic(BasicAuthentication)
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -101,33 +101,31 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
101
101
|
- Update AndroidManifest.xml:
|
|
102
102
|
|
|
103
103
|
```
|
|
104
|
-
<manifest
|
|
105
|
-
......
|
|
104
|
+
<manifest
|
|
105
|
+
......
|
|
106
106
|
xmlns:tools="http://schemas.android.com/tools">
|
|
107
|
-
..... // your config
|
|
107
|
+
..... // your config
|
|
108
108
|
<uses-feature android:name="android.hardware.telephony" android:required="false" />
|
|
109
109
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
110
110
|
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
|
111
111
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
112
|
-
<uses-permission android:name="android.permission.
|
|
113
|
-
|
|
114
|
-
<uses-permission android:name="android.permission.CALL_PHONE"/>
|
|
115
|
-
..... // your config
|
|
112
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
113
|
+
..... // your config
|
|
116
114
|
|
|
117
115
|
<application
|
|
118
116
|
android:name=".MainApplication"
|
|
119
|
-
...... // your config
|
|
117
|
+
...... // your config
|
|
120
118
|
android:alwaysRetainTaskState="true"
|
|
121
119
|
android:largeHeap="true"
|
|
122
120
|
android:exported="true"
|
|
123
121
|
android:supportsRtl="true"
|
|
124
122
|
android:allowBackup="false"
|
|
125
123
|
android:enableOnBackInvokedCallback="true"
|
|
126
|
-
..... // your config
|
|
124
|
+
..... // your config
|
|
127
125
|
>
|
|
128
126
|
<activity
|
|
129
127
|
android:name=".MainActivity"
|
|
130
|
-
..... // your config
|
|
128
|
+
..... // your config
|
|
131
129
|
android:windowSoftInputMode="adjustResize"
|
|
132
130
|
android:showOnLockScreen="true"
|
|
133
131
|
android:launchMode="singleTask"
|
|
@@ -137,9 +135,9 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
137
135
|
android:showWhenLocked="true"
|
|
138
136
|
android:turnScreenOn="true"
|
|
139
137
|
android:exported="true"
|
|
140
|
-
..... // your config
|
|
138
|
+
..... // your config
|
|
141
139
|
>
|
|
142
|
-
..... // your config
|
|
140
|
+
..... // your config
|
|
143
141
|
<intent-filter>
|
|
144
142
|
<action android:name="android.intent.action.MAIN" />
|
|
145
143
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
@@ -151,9 +149,9 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
151
149
|
android:host="incoming_call"
|
|
152
150
|
android:scheme="omisdk" />
|
|
153
151
|
</intent-filter>
|
|
154
|
-
..... // your config
|
|
152
|
+
..... // your config
|
|
155
153
|
</activity>
|
|
156
|
-
..... // your config
|
|
154
|
+
..... // your config
|
|
157
155
|
<receiver
|
|
158
156
|
android:name="vn.vihat.omicall.omisdk.receiver.FirebaseMessageReceiver"
|
|
159
157
|
android:exported="true"
|
|
@@ -169,15 +167,16 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
169
167
|
android:enabled="true"
|
|
170
168
|
android:exported="false">
|
|
171
169
|
</service>
|
|
172
|
-
..... // your config
|
|
170
|
+
..... // your config
|
|
173
171
|
</application>
|
|
174
172
|
</manifest>
|
|
175
173
|
```
|
|
176
174
|
|
|
177
175
|
##### In file MainActivity:
|
|
176
|
+
|
|
178
177
|
```
|
|
179
178
|
public class MainActivity extends ReactActivity {
|
|
180
|
-
..... // your config
|
|
179
|
+
..... // your config
|
|
181
180
|
|
|
182
181
|
|
|
183
182
|
@Override
|
|
@@ -202,51 +201,20 @@ public class MainActivity extends ReactActivity {
|
|
|
202
201
|
if (intent != null) {
|
|
203
202
|
OmikitPluginModule.Companion.onGetIntentFromNotification(reactApplicationContext, intent, this);
|
|
204
203
|
}
|
|
205
|
-
..... // your config
|
|
204
|
+
..... // your config
|
|
206
205
|
}
|
|
207
206
|
}
|
|
208
207
|
```
|
|
209
208
|
|
|
210
|
-
You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blob/main/example/android/app/src/main/AndroidManifest.xml">AndroidManifest</a> to know more informations.
|
|
211
|
-
|
|
212
|
-
- We registered permissions into my plugin:
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
<uses-feature
|
|
216
|
-
android:name="android.hardware.camera"
|
|
217
|
-
android:required="false" />
|
|
218
|
-
<uses-feature
|
|
219
|
-
android:name="android.hardware.telephony"
|
|
220
|
-
android:required="false" />
|
|
221
|
-
|
|
222
|
-
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
|
223
|
-
|
|
224
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
225
|
-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
226
|
-
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
|
227
|
-
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
228
|
-
<uses-permission android:name="android.permission.USE_SIP" />
|
|
229
|
-
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
|
|
230
|
-
<uses-permission android:name="android.permission.CALL_PHONE" />
|
|
231
|
-
<uses-permission android:name="android.permission.CAMERA" />
|
|
232
|
-
<uses-permission android:name="android.permission.SYSTEM_CAMERA" /> // add if use targetSDK 34
|
|
233
|
-
|
|
234
|
-
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
|
235
|
-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
|
|
236
|
-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
|
|
237
|
-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
|
|
238
|
-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
239
|
-
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
|
240
|
-
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
241
|
-
```
|
|
242
|
-
|
|
243
209
|
- Setup remote push notification: Only support Firebase for remote push notification.
|
|
244
210
|
|
|
245
211
|
- Add `google-service.json` in `android/app` (For more information, you can refer <a href="https://rnfirebase.io/app/usage">Core/App</a>)
|
|
246
212
|
- Add Firebase Messaging to receive `fcm_token` (You can refer <a href="https://rnfirebase.io/messaging/usage">Cloud Messaging</a> to setup notification for React native)
|
|
247
213
|
|
|
248
214
|
- For more setting information, please refer <a href="https://api.omicall.com/web-sdk/mobile-sdk/android-sdk/cau-hinh-push-notification">Config Push for Android</a>
|
|
249
|
-
|
|
215
|
+
|
|
216
|
+
## Config for IOS
|
|
217
|
+
|
|
250
218
|
#### iOS(Object-C):
|
|
251
219
|
|
|
252
220
|
- Assets: Add `call_image` into assets folder to update callkit image. We only support png style.
|
|
@@ -268,6 +236,7 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
268
236
|
|
|
269
237
|
@end
|
|
270
238
|
```
|
|
239
|
+
|
|
271
240
|
- Add variables in **Appdelegate.h** for **New Architecture**:
|
|
272
241
|
|
|
273
242
|
```
|
|
@@ -295,7 +264,7 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
295
264
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
296
265
|
{
|
|
297
266
|
|
|
298
|
-
// ----- Start OmiKit Config ------
|
|
267
|
+
// ----- Start OmiKit Config ------
|
|
299
268
|
[OmiClient setEnviroment:KEY_OMI_APP_ENVIROMENT_SANDBOX userNameKey:@"full_name" maxCall:2 callKitImage:@"call_image" typePushVoip:TYPE_PUSH_CALLKIT_DEFAULT];
|
|
300
269
|
_provider = [[CallKitProviderDelegate alloc] initWithCallManager: [OMISIPLib sharedInstance].callManager];
|
|
301
270
|
_voipRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
|
|
@@ -303,10 +272,10 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
303
272
|
if (@available(iOS 10.0, *)) {
|
|
304
273
|
[UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self;
|
|
305
274
|
}
|
|
306
|
-
// ----- End OmiKit Config ------
|
|
275
|
+
// ----- End OmiKit Config ------
|
|
307
276
|
|
|
308
277
|
return YES;
|
|
309
|
-
|
|
278
|
+
|
|
310
279
|
}
|
|
311
280
|
|
|
312
281
|
|
|
@@ -368,8 +337,7 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
368
337
|
|
|
369
338
|
```
|
|
370
339
|
|
|
371
|
-
|
|
372
|
-
*** Only use under lines when added `Cloud Messaging` plugin in your project ***
|
|
340
|
+
**_ Only use under lines when added `Cloud Messaging` plugin in your project _**
|
|
373
341
|
|
|
374
342
|
- Setup push notification: We only support Firebase for push notification.
|
|
375
343
|
|
|
@@ -377,17 +345,20 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
377
345
|
- Add Firebase Messaging to receive `fcm_token` (You can refer <a href="https://pub.dev/packages/firebase_messaging">Cloud Messaging</a> to setup notification for React Native)
|
|
378
346
|
|
|
379
347
|
- For more setting information, please refer <a href="https://api.omicall.com/web-sdk/mobile-sdk/ios-sdk/cau-hinh-push-notification">Config Push for iOS</a>
|
|
380
|
-
|
|
381
|
-
|
|
348
|
+
|
|
349
|
+
**_ Important release note _**
|
|
350
|
+
|
|
382
351
|
```
|
|
383
352
|
We support 2 environments. So you need set correct key in Appdelegate.
|
|
384
353
|
- KEY_OMI_APP_ENVIROMENT_SANDBOX support on debug mode
|
|
385
354
|
- KEY_OMI_APP_ENVIROMENT_PRODUCTION support on release mode
|
|
386
355
|
- Visit on web admin to select correct enviroment.
|
|
387
356
|
```
|
|
388
|
-
|
|
389
|
-
|
|
357
|
+
|
|
358
|
+
\*Note: At Tab Build Setting off Target Project, you need set: **_Enable Modules (C and Objective C)_** : YES\*
|
|
359
|
+
|
|
390
360
|
#### iOS(Swift):
|
|
361
|
+
|
|
391
362
|
- Assets: Add `call_image` into assets folder to update callkit image. We only support png style.
|
|
392
363
|
|
|
393
364
|
- Add variables in Appdelegate.swift:
|
|
@@ -411,7 +382,7 @@ voipRegistry = PKPushRegistry.init(queue: .main)
|
|
|
411
382
|
pushkitManager = PushKitManager.init(voipRegistry: voipRegistry)
|
|
412
383
|
```
|
|
413
384
|
|
|
414
|
-
-
|
|
385
|
+
- Add these lines into `Info.plist`:
|
|
415
386
|
|
|
416
387
|
```
|
|
417
388
|
<key>NSCameraUsageDescription</key>
|
|
@@ -436,7 +407,7 @@ extension Data {
|
|
|
436
407
|
}
|
|
437
408
|
```
|
|
438
409
|
|
|
439
|
-
|
|
410
|
+
**_ Only use under lines when added `Cloud Messaging` plugin in your project _**
|
|
440
411
|
|
|
441
412
|
- Setup push notification: We only support Firebase for push notification.
|
|
442
413
|
|
|
@@ -444,24 +415,25 @@ extension Data {
|
|
|
444
415
|
- Add Firebase Messaging to receive `fcm_token` (You can refer <a href="https://pub.dev/packages/firebase_messaging">Cloud Messaging</a> to setup notification for React Native)
|
|
445
416
|
|
|
446
417
|
- For more setting information, please refer <a href="https://api.omicall.com/web-sdk/mobile-sdk/ios-sdk/cau-hinh-push-notification">Config Push for iOS</a>
|
|
447
|
-
|
|
418
|
+
**_ Important release note _**
|
|
419
|
+
|
|
448
420
|
```
|
|
449
421
|
We support 2 environments. So you need set correct key in Appdelegate.
|
|
450
422
|
- KEY_OMI_APP_ENVIROMENT_SANDBOX support on debug mode
|
|
451
423
|
- KEY_OMI_APP_ENVIROMENT_PRODUCTION support on release mode
|
|
452
|
-
- Visit on web admin to select correct enviroment.
|
|
424
|
+
- Visit on web admin to select correct enviroment.
|
|
453
425
|
```
|
|
454
426
|
|
|
455
|
-
|
|
456
427
|
## Implement
|
|
457
428
|
|
|
458
429
|
### Request permission
|
|
459
430
|
|
|
460
431
|
We need you request permission about call before make call:
|
|
461
|
-
|
|
432
|
+
|
|
433
|
+
- You can use <a href="https://github.com/zoontek/react-native-permissions">react-native-permissions</a> to do this
|
|
462
434
|
|
|
463
435
|
```
|
|
464
|
-
-Android:
|
|
436
|
+
-Android:
|
|
465
437
|
+ PERMISSIONS.ANDROID.RECORD_AUDIO
|
|
466
438
|
+ PERMISSIONS.ANDROID.CALL_PHONE
|
|
467
439
|
+ PERMISSIONS.ANDROID.CAMERA; (if you want to make Video calls)
|
|
@@ -490,16 +462,18 @@ We need you request permission about call before make call:
|
|
|
490
462
|
|
|
491
463
|
startServices();
|
|
492
464
|
```
|
|
465
|
+
|
|
493
466
|
- OmiKit need FCM for Android and APNS to push notification on user devices. We use more packages: <a href="https://rnfirebase.io/messaging/usage">Cloud Messaging</a>
|
|
494
467
|
|
|
495
468
|
- Create OmiKit With ApiKey: OmiKit need apikey, username, user id to init environment(All information in innit is required). ViHAT Group will provide api key for you. This function is used when making calls from customers to switchboard numbers (not making internal calls).
|
|
496
469
|
Please contact for my sale:
|
|
497
|
-
In This step, we need partner provide me
|
|
470
|
+
In This step, we need partner provide me fcmToken of firebase Message.
|
|
471
|
+
|
|
498
472
|
```
|
|
499
473
|
import { initCallWithApiKey } from 'omikit-plugin';
|
|
500
474
|
import messaging from '@react-native-firebase/messaging';
|
|
501
|
-
|
|
502
|
-
let token: String
|
|
475
|
+
|
|
476
|
+
let token: String
|
|
503
477
|
if(Platform.OS == "ios"){
|
|
504
478
|
token = await messaging.getAPNSToken()
|
|
505
479
|
} else {
|
|
@@ -519,14 +493,14 @@ We need you request permission about call before make call:
|
|
|
519
493
|
```
|
|
520
494
|
|
|
521
495
|
- Create OmiKit: OmiKit need userName, password, realm, fcmToken to init environment(All information in innit is required). ViHAT Group will provide information for you.
|
|
522
|
-
This function is used when you want to call any telecommunication number, calling back and forth between internal groups.
|
|
496
|
+
This function is used when you want to call any telecommunication number, calling back and forth between internal groups.
|
|
523
497
|
Please contact for my sale:
|
|
524
498
|
|
|
525
499
|
```
|
|
526
500
|
import { initCallWithUserPassword } from 'omikit-plugin';
|
|
527
501
|
import messaging from '@react-native-firebase/messaging';
|
|
528
|
-
|
|
529
|
-
let token: String
|
|
502
|
+
|
|
503
|
+
let token: String
|
|
530
504
|
if(Platform.OS == "ios"){
|
|
531
505
|
token = await messaging.getAPNSToken()
|
|
532
506
|
} else {
|
|
@@ -568,8 +542,6 @@ We need you request permission about call before make call:
|
|
|
568
542
|
//incomingAcceptButtonImage, incomingDeclineButtonImage, backImage, userImage: Add these into `android/app/src/main/res/drawble`
|
|
569
543
|
```
|
|
570
544
|
|
|
571
|
-
|
|
572
|
-
|
|
573
545
|
- Get call when user open application at first time:
|
|
574
546
|
|
|
575
547
|
```
|
|
@@ -593,7 +565,9 @@ We need you request permission about call before make call:
|
|
|
593
565
|
isVideo: false //allow video call: true/false
|
|
594
566
|
});
|
|
595
567
|
```
|
|
596
|
-
|
|
568
|
+
|
|
569
|
+
- The result will be in the form of object:
|
|
570
|
+
|
|
597
571
|
```
|
|
598
572
|
result = {
|
|
599
573
|
"_id": String // This is call_id. it just have id for iOS,
|
|
@@ -725,6 +699,7 @@ We need you request permission about call before make call:
|
|
|
725
699
|
|
|
726
700
|
logout();
|
|
727
701
|
```
|
|
702
|
+
|
|
728
703
|
- Permission: Check system alert window permission (only Android).
|
|
729
704
|
|
|
730
705
|
```
|
|
@@ -736,6 +711,7 @@ We need you request permission about call before make call:
|
|
|
736
711
|
//false => denied
|
|
737
712
|
}
|
|
738
713
|
```
|
|
714
|
+
|
|
739
715
|
- Setting: Open to enable system alert window (only Android).
|
|
740
716
|
|
|
741
717
|
```
|
|
@@ -827,49 +803,42 @@ useEffect(() => {
|
|
|
827
803
|
}, []);
|
|
828
804
|
```
|
|
829
805
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
- Action Name value:
|
|
834
|
-
- `onCallStateChanged`: Call state changed.
|
|
835
|
-
- `onSwitchboardAnswer`: Switchboard sip is listening.
|
|
836
|
-
- List status call:
|
|
837
|
-
+ unknown(0),
|
|
838
|
-
+ calling(1),
|
|
839
|
-
+ incoming(2),
|
|
840
|
-
+ early(3),
|
|
841
|
-
+ connecting(4),
|
|
842
|
-
+ confirmed(5),
|
|
843
|
-
+ disconnected(6);
|
|
844
|
-
+ onCallStateChanged is call state tracking event. We will return status of state. Please refer `OmiCallState`.
|
|
845
|
-
`onCallStateChanged value:`
|
|
846
|
-
+ isVideo: value boolean (true is call Video)
|
|
847
|
-
+ status: number (value matching with List status call )
|
|
848
|
-
+ callerNumber: phone number
|
|
849
|
-
+ incoming: boolean - status call incoming or outgoing
|
|
850
|
-
+ _id: option (id of every call)
|
|
851
|
-
+ code_end_call: This is code when end call.
|
|
852
|
-
|
|
853
|
-
+ `Incoming call` state lifecycle: incoming -> connecting -> confirmed -> disconnected
|
|
854
|
-
+ `Outgoing call` state lifecycle: calling -> early -> connecting -> confirmed -> disconnected
|
|
855
|
-
|
|
856
|
-
+ onSwitchboardAnswer have callback when employee answered script call.
|
|
806
|
+
- Important event `onCallStateChanged`: We provide it to listen call state change.
|
|
807
|
+
// OmiAction have 2 variables: actionName and data
|
|
857
808
|
|
|
858
|
-
-
|
|
809
|
+
- Action Name value:
|
|
810
|
+
- `onCallStateChanged`: Call state changed.
|
|
811
|
+
- `onSwitchboardAnswer`: Switchboard sip is listening.
|
|
812
|
+
- List status call:
|
|
813
|
+
- unknown(0),
|
|
814
|
+
- calling(1),
|
|
815
|
+
- incoming(2),
|
|
816
|
+
- early(3),
|
|
817
|
+
- connecting(4),
|
|
818
|
+
- confirmed(5),
|
|
819
|
+
- disconnected(6);
|
|
859
820
|
|
|
821
|
+
* onCallStateChanged is call state tracking event. We will return status of state. Please refer `OmiCallState`.
|
|
822
|
+
`onCallStateChanged value:` + isVideo: value boolean (true is call Video) + status: number (value matching with List status call ) + callerNumber: phone number + incoming: boolean - status call incoming or outgoing + \_id: option (id of every call) + code_end_call: This is code when end call.
|
|
860
823
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
| `600, 503, 480` | These are the codes of the network operator or the user who did not answer the call |
|
|
864
|
-
| `408` | Call request timeout (Each call usually has a waiting time of 30 seconds. If the 30 seconds expire, it will time out) |
|
|
865
|
-
| `403` | Your service plan only allows calls to dialed numbers. Please upgrade your service pack |
|
|
866
|
-
| `404` | The current number is not allowed to make calls to the carrier |
|
|
867
|
-
| `603` | The call was rejected. Please check your account limit or call barring configuration! |
|
|
868
|
-
| `850` | Simultaneous call limit exceeded, please try again later |
|
|
869
|
-
| `486` | The listener refuses the call and does not answer |
|
|
870
|
-
| `601` | Call ended by the customer |
|
|
871
|
-
| `602` | Call ended by the other employee |
|
|
824
|
+
* `Incoming call` state lifecycle: incoming -> connecting -> confirmed -> disconnected
|
|
825
|
+
* `Outgoing call` state lifecycle: calling -> early -> connecting -> confirmed -> disconnected
|
|
872
826
|
|
|
827
|
+
* onSwitchboardAnswer have callback when employee answered script call.
|
|
828
|
+
|
|
829
|
+
- Table describing code_end_call status
|
|
830
|
+
|
|
831
|
+
| Code | Description |
|
|
832
|
+
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
833
|
+
| `600, 503, 480` | These are the codes of the network operator or the user who did not answer the call |
|
|
834
|
+
| `408` | Call request timeout (Each call usually has a waiting time of 30 seconds. If the 30 seconds expire, it will time out) |
|
|
835
|
+
| `403` | Your service plan only allows calls to dialed numbers. Please upgrade your service pack |
|
|
836
|
+
| `404` | The current number is not allowed to make calls to the carrier |
|
|
837
|
+
| `603` | The call was rejected. Please check your account limit or call barring configuration! |
|
|
838
|
+
| `850` | Simultaneous call limit exceeded, please try again later |
|
|
839
|
+
| `486` | The listener refuses the call and does not answer |
|
|
840
|
+
| `601` | Call ended by the customer |
|
|
841
|
+
| `602` | Call ended by the other employee |
|
|
873
842
|
|
|
874
843
|
- Action Name value:
|
|
875
844
|
- `OmiCallEvent.onMuted`: Audio changed.
|
|
@@ -879,15 +848,15 @@ useEffect(() => {
|
|
|
879
848
|
- `OmiCallEvent.onCallQuality`: The calling quality.
|
|
880
849
|
- Data value: We return `callerNumber`, `sip`, `isVideo: true/false` information
|
|
881
850
|
|
|
882
|
-
|
|
883
851
|
- Forward calls to internal staff:
|
|
884
|
-
|
|
885
|
-
example:
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
852
|
+
- You can use function `transferCall` for transfer to staff you want.
|
|
853
|
+
example:
|
|
854
|
+
transferCall({
|
|
855
|
+
phoneNumber: 102
|
|
856
|
+
})
|
|
889
857
|
|
|
890
858
|
# Issues
|
|
891
859
|
|
|
892
|
-
|
|
893
|
-
|
|
860
|
+
## iOS
|
|
861
|
+
|
|
862
|
+
- Must use "Rosetta Destination" to run debug example app on macOS Apple chip
|
package/android/build.gradle
CHANGED
|
@@ -5,13 +5,13 @@ buildscript {
|
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
7
7
|
mavenCentral()
|
|
8
|
-
maven {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
8
|
+
// maven {
|
|
9
|
+
// url("https://vihatgroup.jfrog.io/artifactory/omi-voice/")
|
|
10
|
+
// credentials {
|
|
11
|
+
// username = "downloader"
|
|
12
|
+
// password = "Omi@2022"
|
|
13
|
+
// }
|
|
14
|
+
// }
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
dependencies {
|
|
@@ -83,15 +83,15 @@ allprojects {
|
|
|
83
83
|
mavenCentral()
|
|
84
84
|
jcenter() // Warning: this repository is going to shut down soon
|
|
85
85
|
maven {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
87
|
+
credentials {
|
|
88
|
+
username = "omicall"
|
|
89
|
+
password = "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"
|
|
90
|
+
}
|
|
91
|
+
authentication {
|
|
92
|
+
basic(BasicAuthentication)
|
|
93
|
+
}
|
|
90
94
|
}
|
|
91
|
-
authentication {
|
|
92
|
-
header(HttpHeaderAuthentication)
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -103,7 +103,7 @@ dependencies {
|
|
|
103
103
|
// use for OMISDK
|
|
104
104
|
implementation("androidx.work:work-runtime:2.8.1")
|
|
105
105
|
implementation "androidx.security:security-crypto:1.1.0-alpha06"
|
|
106
|
-
api 'vn.vihat.omicall:omi-sdk:2.2.
|
|
106
|
+
api 'vn.vihat.omicall:omi-sdk:2.2.85'
|
|
107
107
|
|
|
108
108
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
109
109
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
package/android/settings.gradle
CHANGED
|
@@ -14,13 +14,13 @@ dependencyResolutionManagement {
|
|
|
14
14
|
url "https://jitpack.io"
|
|
15
15
|
}
|
|
16
16
|
maven {
|
|
17
|
-
url "https://
|
|
18
|
-
credentials
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
18
|
+
credentials {
|
|
19
|
+
username = "omicall"
|
|
20
|
+
password = "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"
|
|
21
21
|
}
|
|
22
22
|
authentication {
|
|
23
|
-
|
|
23
|
+
basic(BasicAuthentication)
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
package/omikit-plugin.podspec
CHANGED