OmicallClient class
Methods
cancelConsult ()
→ Future <bool >
Consult transfer, step 2b: end the consult and take the customer off hold.
endCall is not a cancel: during a consult it hangs up the customer.
changeTransport ({required String type })
→ Future <Map ? >
completeConsultTransfer ({})
→ Future <bool >
Consult transfer, step 2a: once the consult is answered, hang it up and transfer the
customer to the same extension. Returns false when there is no answered consult or the
customer already ended. Follow the result with setTransferStatusListener .
configPushNotification ({required String notificationIcon , String ? prefix , String ? incomingBackgroundColor , String ? incomingAcceptButtonImage , String ? incomingDeclineButtonImage , String ? backImage , String ? userImage , String ? missedCallTitle , String ? prefixMissedCallMessage , String ? userNameKey , String ? channelId , String ? videoNotificationDescription , String ? audioNotificationDescription , String ? representName , bool ? isUseIntentFilter = true })
→ Future <void >
dispose ()
→ void
destroy event
dropCall ()
→ Future <bool >
Decline a ringing incoming call with 603, which stops ringing on every device of the
extension. Hangs up when the call is already answered.
endCall ()
→ Future <Map ? >
findSipNumberByDeviceId (List <OmiDeviceInfo > ? devices , String ? deviceId )
→ String ?
SIP number bound to deviceId in a list from getOmiDevices , or null when none matches.
getActiveCalls ()
→ Future <List <OmiCallSummary > >
Every live call with its hold state; the consult call has isConsult == true.
getAppId ()
→ Future <String ? >
App id the SDK sends when adding the device (bundle id / package name).
getCameraStatus ()
→ Future <void >
getCurrentAudio ()
→ Future <List >
getCurrentUser ()
→ Future <Map ? >
getDeviceId ()
→ Future <String ? >
Device id the SDK sends when adding the device — match it against getOmiDevices .
getFcmToken ()
→ Future <String ? >
Push token the SDK registered (FCM on Android).
getGuestUser ()
→ Future <Map ? >
getHistoryCallLog ()
→ Future <String ? >
getInitialCall ()
→ Future
getOmiDevices ()
→ Future <List <OmiDeviceInfo > >
Devices registered on the OMI backend for the current SIP user. Empty when not logged in
or on network failure; never throws. Each call is an HTTP request — do not poll.
getOutputAudios ()
→ Future <List >
getProjectId ()
→ Future <String ? >
Firebase project id used when the device was added to the OMI backend.
getSipInfo ()
→ Future <String ? >
Current SIP account (user@realm on Android).
getUserInfo ({required String phone })
→ Future <Map ? >
getVoipToken ()
→ Future <String ? >
iOS VoIP (PushKit) token; null on Android.
initCallWithApiKey ({String ? usrName , String ? usrUuid , String ? apiKey , String ? phone , String ? fcmToken , bool isVideo = true , String projectId = "" })
→ Future
initCallWithUserPassword ({String ? userName , String ? password , String ? realm , String ? host , String ? fcmToken , bool isVideo = true , String projectId = "" })
→ Future
isConsulting ()
→ Future <bool >
True from startConsultCall until the consult call has ended.
isConsultOriginalEnded ()
→ Future <bool >
True while a consult is running but the customer already hung up.
isCurrentDeviceRegistered ()
→ Future <bool >
Whether THIS device (device id + app id) is registered on the backend for the current
SIP user. False when not logged in.
joinCall ()
→ Future <bool >
logout ()
→ Future
needsReLogin ()
→ Future <bool >
True when a SIP user is set locally but the backend has no matching device:
logout + login again to re-register. False when not logged in.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register ({required String userName , required String password , required String realm , required String fcmToken , String host = "" , bool isVideo = true , String projectId = "" })
→ Future <OmiRegisterResult >
Register a SIP extension with username / password.
registerVideoEvent ()
→ Future
registerWithApiKey ({required String fullName , required String userUuid , required String apiKey , required String phone , required String fcmToken , bool isVideo = true , String projectId = "" })
→ Future <OmiRegisterResult >
Register a customer (App-to-App) with an OMICall API key.
rejectCall ()
→ Future <bool >
Reject a ringing incoming call with 486 Busy Here (other devices of the same
extension can still answer). Hangs up when the call is already answered.
removeAudioChangedListener ()
→ void
removeCallHoldChangedListener ()
→ void
removeCallLogListener ()
→ void
removeCallQualityListener ()
→ void
removeConsultStateListener ()
→ void
removeHoldListener ()
→ void
removeMissedCallListener ()
→ void
removeMuteListener ()
→ void
removePictureInPictureListener ()
→ void
removeRemoteConnectionListener ()
→ void
removeSpeakerListener ()
→ void
removeTransferStatusListener ()
→ void
removeVideoEvent ()
→ Future
removeVideoListener ()
→ void
sendDTMF (String character )
→ Future <void >
setAudioChangedListener (dynamic audioChangedListener (List ) )
→ void
setCallHoldChangedListener (dynamic callHoldChangedListener (OmiCallHoldEvent ) )
→ void
Hold state of any call (customer or consult), with its call id.
setCallLogListener (dynamic callLogListener (Map ) )
→ void
setCallQualityListener (dynamic callQualityListener (Map ) )
→ void
setConsultStateListener (dynamic consultStateListener (OmiConsultStateEvent ) )
→ void
Progress of the consult call started with startConsultCall .
setHoldListener (dynamic holdListener (bool ) )
→ void
setMissedCallListener (dynamic missedCallListener (Map ) )
→ void
setMuteListener (dynamic muteListener (bool ) )
→ void
setOutputAudio ({required dynamic portType })
→ Future <void >
setPictureInPictureListener (dynamic pictureInPictureListener (bool ) )
→ void
System Picture-in-Picture started (true) / stopped (false) — hide call controls while true.
setRemoteConnectionListener (dynamic remoteConnectionListener (OmiRemoteConnectionEvent ) )
→ void
iOS: health of the other party's media during a video call.
setRemoteConnectionOverlayTexts (Map <OmiRemoteConnectionState , String > texts )
→ Future <void >
iOS: text of the SDK's remote-connection overlay per state (multi-language apps).
States without a text keep the SDK's Vietnamese default. No effect on Android.
setSpeakerListener (dynamic speakerListener (bool ) )
→ void
setTransferStatusListener (dynamic transferStatusListener (OmiTransferStatusEvent ) )
→ void
REFER progress of transferCall and completeConsultTransfer .
setVideoListener (dynamic videoListener (Map ) )
→ void
setVideoPictureInPictureEnabled (bool enabled )
→ Future <bool >
Picture-in-Picture for video calls: the remote video moves to a floating window when the
app goes to the background during a video call, and the SDK closes it at call end.
Call before the video call starts. Returns whether the device supports PiP.
startCall (String phoneNumber , bool isVideo )
→ Future
startCallWithUUID (String uuid , bool isVideo )
→ Future <int >
startConsultCall (String extension , { })
→ Future <OmiConsultStartStatus >
Consult (attended) transfer, step 1: hold the customer (answered audio call) and call
extension. Follow the consult with setConsultStateListener .
startServices ({bool showMissedCall = true })
→ Future <void >
switchCamera ()
→ Future <void >
toggleAudio ()
→ Future <void >
toggleHold ()
→ Future <void >
toggleSpeaker ()
→ Future <void >
toggleVideo ()
→ Future <void >
toString ()
→ String
A string representation of this object.
inherited
transferCall ({String ? phoneNumber })
→ Future <bool >
omicall_flutter_plugin 3.4.0