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