omikit-plugin 3.2.18 → 3.2.21

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
@@ -681,12 +681,21 @@ useEffect(() => {
681
681
  + callerNumber: phone number
682
682
  + incoming: boolean - status call incoming or outgoing
683
683
  + _id: option (id of every call)
684
+ + code_end_call: This is code when end call.
684
685
 
685
686
  + `Incoming call` state lifecycle: incoming -> connecting -> confirmed -> disconnected
686
687
  + `Outgoing call` state lifecycle: calling -> early -> connecting -> confirmed -> disconnected
687
688
 
688
689
  + onSwitchboardAnswer have callback when employee answered script call.
689
690
 
691
+ - List of notable call codes `code_end_call`:
692
+ + 600, 503, 480 : These are the codes of the network operator or the user who did not answer the call
693
+ + 408: call request timeout (Each call usually has a waiting time of 30 seconds. If the 30 seconds expire, it will time out)
694
+ + 403: Your service plan only allows calls to dialed numbers. Please upgrade your service pack
695
+ + 404: The current number is not allowed to make calls to the carrier
696
+ + 603: The call was rejected. Please check your account limit or call barring configuration!
697
+ + 850: Simultaneous call limit exceeded, please try again later
698
+
690
699
 
691
700
  - Action Name value:
692
701
  - `OmiCallEvent.onMuted`: Audio changed.
@@ -104,7 +104,7 @@ dependencies {
104
104
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
105
105
  // noinspection GradleDynamicVersion
106
106
  // implementation "com.facebook.react:react-native"
107
- api 'vn.vihat.omicall:omi-sdk:2.0.71'
107
+ api 'vn.vihat.omicall:omi-sdk:2.0.80'
108
108
 
109
109
  implementation "com.facebook.react:react-native:+" // From node_modules
110
110
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
@@ -124,9 +124,9 @@ dependencies {
124
124
  implementation "com.squareup.okhttp3:okhttp-urlconnection:4.9.1"
125
125
  implementation "com.squareup.okhttp3:logging-interceptor:4.9.1"
126
126
  implementation "com.google.code.gson:gson:2.8.9"
127
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
127
+
128
128
  implementation "androidx.security:security-crypto:1.1.0-alpha06"
129
- implementation "com.github.voismart:crypto:0.1.0"
129
+
130
130
 
131
131
  implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
132
132
  implementation "com.github.bumptech.glide:glide:4.15.1"
@@ -79,7 +79,6 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
79
79
  }
80
80
 
81
81
  override fun onCallEnd(callInfo: MutableMap<String, Any?>, statusCode: Int) {
82
- Log.d("OMISDK", "=>> ON CALL END => ")
83
82
  val call = callInfo as Map<*, *>
84
83
  val map: WritableMap = WritableNativeMap()
85
84
  val timeStartToAnswer = call["time_start_to_answer"] as Long?
@@ -93,6 +92,7 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
93
92
  map.putString("sip_user", call["sip_user"] as String)
94
93
  map.putString("disposition", call["disposition"] as String)
95
94
  map.putInt("status", CallState.disconnected.value)
95
+ map.putInt("code_end_call", statusCode as Int)
96
96
  sendEvent(CALL_STATE_CHANGED, map)
97
97
  }
98
98
 
@@ -219,7 +219,7 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
219
219
  reactApplicationContext!!.addActivityEventListener(this)
220
220
  Handler(Looper.getMainLooper()).post {
221
221
  OmiClient.getInstance(reactApplicationContext!!).addCallStateListener(this)
222
- OmiClient.getInstance(reactApplicationContext!!).setDebug(true)
222
+ OmiClient.getInstance(reactApplicationContext!!).setDebug(false)
223
223
  OmiClient.isAppReady = true;
224
224
  }
225
225
  }
@@ -358,6 +358,7 @@ class CallManager {
358
358
  "time_end" : timeEnd,
359
359
  "sip_user": user,
360
360
  "disposition" : lastStatusCall == nil ? "no_answered" : "answered",
361
+ "code_end_call" : call.lastStatus
361
362
  ]
362
363
  }
363
364
 
@@ -32,5 +32,5 @@ Pod::Spec.new do |s|
32
32
  s.dependency "RCTTypeSafety"
33
33
  s.dependency "ReactCommon/turbomodule/core"
34
34
  end
35
- s.dependency "OmiKit", '1.6.4'
35
+ s.dependency "OmiKit", '1.6.14'
36
36
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omikit-plugin",
3
- "version": "3.2.18",
3
+ "version": "3.2.21",
4
4
  "description": "Omikit Plugin by ViHAT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",