Skip to main content

API Methods

All API methods with a return type of BOOL will return TRUE if successful, FALSE otherwise.

There is no MUTE API method for the Android SDK build. Developers are advised to implement the native Android AudioRouting API to disable access to the microphone to implement the mute functionalities.

Method NameSignatureDescription
getSDKVersionString getSDKVersion(Context context)Returns the current SDK version.
toggleRegistrationboolean toggleRegistration(boolean enabled)Enables or disables SIP registration.
startSipServiceboolean startSipService(Context context)Starts the background SIP service.
stopSipServiceboolean stopSipService(Context context)Stops the background SIP service.
registerAndroidJwtPushDeviceJSONObject registerAndroidJwtPushDevice(String deviceInfo, String deviceId, String firebaseToken, String appId, boolean isSandbox)Registers a new device for push notifications for incoming calls.
getAccountIdString getAccountId()Returns the SIP account ID string currently in use.
getCurrentSIPAccountstatic PjSipAccount getCurrentSIPAccount()Returns the SIP account object currently in use.
registerSIPThreadstatic void registerSIPThread()Registers the current thread with the SIP library.
logCallStatsstatic void logCallStats(Context context, String accountID, int callID)Writes active call statistics to the log file.
getCallStatsstatic JSONObject getCallStats(Context context, int callID)Retrieves statistics of active calls as a JSON object.
getCallLegUuidstatic String getCallLegUuid(Integer callID)Retrieves the history leg UUID of the specified call.
setCallReinviteUpdatestatic void setCallReinviteUpdate(Context context, String accountID, int callID)Sends a SIP REINVITE packet to update call information.
getRingingIncomingCallInfostatic CallInfo getRingingIncomingCallInfo(String accountID)Retrieves the incoming call object if a call is ringing.
makeSIPCallToNumberstatic void makeSIPCallToNumber(Context context, String number)Makes an outgoing call to the specified number.
getSipUsernameFromFullURIstatic String getSipUsernameFromFullURI(String sipURI)Extracts the SIP username from a full SIP URI.
disconnectCallsvoid disconnectCalls(Context context, int call_id, int hangup_code)Disconnects an existing SIP call with the given code.
disconnectAllCallsvoid disconnectAllCalls(Context context, int hangup_code)Disconnects all active calls with the given code.
answerIncomingCallvoid answerIncomingCall(Context context, int call_id)Answers an incoming call using the specified call ID.
sendDtmfDigitsvoid sendDtmfDigits(Context context, int call_id, String dtmfDigits)Sends DTMF digits via RFC2833 over an active call.
getActiveCallIDsArrayList<Integer> getActiveCallIDs(Context context)Returns a list of active call IDs.
attendedCallTransferboolean attendedCallTransfer(Context context, int call_id, String destinationNumber)Performs an attended call transfer.
cancelCallTransferboolean cancelCallTransfer(Context context, int call_id)Cancels a previous attended transfer request.
toggleHoldForCallvoid toggleHoldForCall(Context context, int call_id, boolean isHoldEnabled)Puts an active call on hold or resumes it.
toggleHoldForAllCallsvoid toggleHoldForAllCalls(Context context, boolean isHoldEnabled)Puts all active calls on hold or resumes them.
transmitWhiteNoisevoid transmitWhiteNoise(Context context, int call_id)Sends a short burst of white noise to reset idle timers.
startConferenceJSONObject startConference(Context context)Bridges two connected calls into a conference.
answerCallWaitingJSONObject answerCallWaiting(Context context)Answers an incoming call while holding the active call.
swapCallWaitingJSONObject swapCallWaiting(Context context, int mainCallId)Swaps between an active call and a held call.
processPushMsgJSONObject processPushMsg(Context context, JSONObject userInfo)Parses an incoming push message for call-related events.
onRegistrationvoid onRegistration(String accountID, int registrationStateCode)Callback for SIP registration state changes.
onCallStatevoid onCallState(String accountID, int callID, int callStateCode, int sipStateCode, String sipStateCodeText, long connectTimestamp, boolean isLocalHold, boolean isLocalMute)Callback for call state changes.
onIncomingCallvoid onIncomingCall(String accountID, int callID, String remoteUri)Callback for new incoming calls.