public class webphone
JVoIP SIP Stack public interface. This webphone class contains all the available API functions.
Home page: https://www.mizu-voip.com/Software/SIPSDK/JavaSIPSDK.aspx
Documentation: https://www.mizu-voip.com/Portals/0/Files/JVoIP.pdf
Example code: https://www.mizu-voip.com/Portals/0/Files/JVoIPTest.java
We recommend to use the documentation as a reference as it is much better structured and more up to date.
Also the parameters are not listed here. See the documentation for the complete list of available settings ("Parameters" chapter).
| Constructor Summary |
|---|
webphone()
Constructor to create a new SIP stack. Usually you need only one instance in your application since it has multi-account and multi-line capabilities, but if you need, you can create also multiple instances. The constructor will only create an empty phone instances. |
webphone(String parameters)
|
| Method Summary | |
|---|---|
boolean | API_Accept()
Connect incoming call. |
boolean | API_Accept(int line)
Connect incoming call on the specified line. |
boolean | API_Accept(int line,
int calltype)
Connect incoming call. |
boolean | API_Accept(int line,
int calltype,
int strict)
Connect incoming call. |
boolean | API_Accept(int line,
int calltype,
int audiodirection,
int videodirection)
Connect incoming call. |
boolean | API_Accept(int line,
int calltype,
int strict,
int audiodirection,
int videodirection)
Connect incoming call. |
boolean | API_AcceptStrict(int line)
Deprecated. by API_Accept strict parameter |
boolean | API_AddAccount(String uri)
Add/register (secondary) account. |
boolean | API_AddAccount(String server,
String proxy,
String username,
String sipusername,
String displayname,
String password,
int transport,
long registerinterval)
|
boolean | API_AddAccount(String server,
String proxy,
String username,
String sipusername,
String displayname,
String password,
int transport,
long registerinterval,
boolean ismain)
|
boolean | API_AddAccount(String server,
String proxy,
String username,
String sipusername,
String displayname,
String password,
int transport,
long registerinterval,
int ismain)
Add (secondary) account. |
boolean | API_AddContact(String params)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_AddLog(int level,
String text)
Add to sip stack log. |
boolean | API_AddLog(String text)
Add to sip stack log. |
boolean | API_AddToBlacklist(String str)
Add user to blacklist |
boolean | API_AddToWhitelist(String str)
Add user to whitelist |
boolean | API_AddVideo_Now(int line,
int type,
int direction)
|
boolean | API_AddVideo()
Add video media for an existing voice call. |
boolean | API_AddVideo(int line,
int type,
int direction)
Add video media for an existing voice call. Can be also used as video reload if it was put on hold before. |
boolean | API_AI()
|
boolean | API_AI(boolean start)
|
boolean | API_AI(int line)
|
boolean | API_AI(int line,
boolean start)
Start/stop realtime AI streaming at run-time |
boolean | API_AI(int line,
int start)
|
boolean | API_AI(int line,
int start,
String params)
|
boolean | API_AISend(int line,
String msg)
Send a message directly on the AI comnnection (usuaally a websocket) |
boolean | API_AISend(int line,
String msg,
boolean isaudio)
|
boolean | API_AsyncCall(String param1,
String param2,
String param3,
String param4,
String param5,
String param6,
String param7)
|
boolean | API_AudioDevice()
Open audio device selector dialog (built-in user interface). This function will not work with the headless version (the headless is for library/SDK or command line usage and it doesn’t have any built-in GUI). |
boolean | API_Call_Now(int line,
String number)
|
boolean | API_Call_Now(int line,
String number,
int calltype,
int audiodirection,
int videodirection)
|
boolean | API_Call_Now(int line,
String number,
int calltype,
int audiodirection,
int videodirection,
String callparameters)
|
boolean | API_Call(int line,
String number)
Initiate call to a number or sip username. If the number parameter is empty, then will redial the last number. Note: usually you should pass only the peer number, extension or username to this function and not the full SIP URI (the SIP stack will construct the full SIP URI with the serveraddress already set) |
boolean | API_Call(int line,
String peer,
int calltype)
|
boolean | API_Call(int line,
String peer,
int calltype,
int audiodirection,
int videodirection)
|
boolean | API_Call(int line,
String peer,
int calltype,
int audiodirection,
int videodirection,
String callparameters)
Initiate call to a number or sip username. If the number parameter is empty, then will redial the last number. Note: usually you should pass only the peer number, extension or username to this function and not the full SIP URI (the SIP stack will construct the full SIP URI with the serveraddress already set) |
boolean | API_Call(int line,
String peer,
int calltype,
String callparameters)
Initiate call to a number or sip username. If the number parameter is empty, then will redial the last number. Note: usually you should pass only the peer number, extension or username to this function and not the full SIP URI (the SIP stack will construct the full SIP URI with the serveraddress already set) |
boolean | API_Call(int line,
String number,
String callparameters)
|
boolean | API_Call(String number)
Initiate call to a number or sip username. If the number parameter is empty, then will redial the last number. Note: usually you should pass only the peer number, extension or username to this function and not the full SIP URI (the SIP stack will construct the full SIP URI with the serveraddress already set) |
boolean | API_CallEx(int line,
String peer,
int type)
|
boolean | API_CallEx(int line,
String peer,
int type,
String callparameters)
|
int | API_CallIDToLine(String callid)
Get the line number for a SIP Call-ID. |
boolean | API_CapabilityRequest()
Will send an OPTION request to the server. |
boolean | API_CapabilityRequest(String server,
String username)
Request server or server capabilities with SIP OPTIONS. Rarely needed if any. |
boolean | API_Chat(String peer)
Instead of calling the API_SendChat function and pass a message, with this function you can let the voip client to open its built-in chat form. Will open the chat dialog (the “number” parameter can be empty) Peer can be a SIP username or extension number. This function will not work with the headless version (the headless is for library or command line usage and it doesn’t have any built-in GUI). |
boolean | API_CheckBLF(String userlist)
To subscribe to other extensions call state, you can set the blfuserlist parameter or use the API_CheckBLF(userlist) to subscribe to other extension(s) state changes (users separated by comma). User(s) passed by the userlist parameters will be added to the existing blfuserlist. |
void | API_CheckConnection()
Verify connection state and reregister if required. Should be called from app activated and screen turned on events for the quickest possible reregistration if previous registration failed (for example due to dosing or OS paused) |
boolean | API_CheckPresence(String userlist)
Call this function to save softswitch resources, you should carefully select the contacts. (Send only the contacts which are actually used and called numbers. |
boolean | API_CheckVoicemail()
Will (re)subscribe for voicemail notifications. |
boolean | API_CheckVoicemail(int line)
Will (re)subscribe for voicemail notifications. |
boolean | API_ClearCredentials()
Clear existing user account details. |
boolean | API_Conf(int line)
|
boolean | API_Conf(int line,
String number)
|
boolean | API_Conf(int line,
String number,
boolean add)
|
boolean | API_Conf(int line,
String number,
boolean add,
int confline)
Add/remove people to/from conference. |
boolean | API_Conf(String number)
Create conference call by adding number to the current call. |
boolean | API_ConfEx(int line)
|
boolean | API_ConfEx(int line,
String number)
|
boolean | API_ConfEx(int line,
String number,
boolean add)
|
boolean | API_ConfEx(int line,
String number,
boolean add,
int confline)
|
int | API_ConvertSampleRate(byte[] buffer_in,
int offset_in,
int length,
byte[] buffer_out,
int offset_out,
int originalSampleRate,
int targetSampleRate)
|
boolean | API_CredentialsChanged(String newserver,
String newusername)
Deprecated. |
boolean | API_DelAccount(String uri)
Delete SIP account and unregister. |
boolean | API_DelAccount(String uri,
boolean unregister)
Delete SIP account. |
boolean | API_DelContact(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_DelSettings()
|
boolean | API_DelSettings(int level)
Delete settings and data. |
boolean | API_DisableBLF(String userlist)
Remove extension(s) from BLF watch list (blfuserlist). Note: existing BLF subscriptions might not be affected until next session. |
boolean | API_Dtmf(int line,
String dtmf)
Send DTMF message by In-Band,SIP INFO or RFC2833 method (depending on the “dtmfmode” parameter). |
boolean | API_Dtmf(String dtmf)
|
boolean | API_ED137PTT(int line,
int ptt)
|
boolean | API_ED137PTT(int line,
int ptt,
int pttid)
ED-137 Push to talk |
boolean | API_ED137PTT(int line,
int ptt,
int pttid,
Endpoint calledfromep)
|
void | API_Exit()
Will destroy the SIP stack. |
void | API_ExitEx()
Will destroy the SIP stack and also will exit the Java Virtial Machine. Should not be used. |
boolean | API_Forward(int line,
String peer)
Forward incoming call to peer (with 302 Moved Temporarily disconnect code) |
boolean | API_Forward(String peer)
Forward incoming call to peer (with 302 Moved Temporarily disconnect code) |
String | API_GetAccount(String uri)
Get account details. |
String | API_GetAccount(String uri,
boolean strict)
Get account details. |
String | API_GetAccountForLine(int line)
Get the account used for a call |
String | API_GetAccountForLine(int line,
boolean strict)
|
String | API_GetAccountForLine(int line,
boolean strict,
int format)
Get the account used for a call |
String | API_GetAccountForLine(int line,
int format)
|
int | API_GetAccountRegState(String uri)
Query account register state. |
int | API_GetAccountRegState(String domain,
String proxy,
String username,
String sipusername)
Query account register state. |
int | API_GetAccountRegState(String domain,
String proxy,
String username,
String sipusername,
boolean pushnotify,
boolean strict)
|
String | API_GetAccountRegStateString(String uri)
Query account register state. |
String | API_GetAccountRegStateString(String domain,
String proxy,
String username,
String sipusername)
Query account register state. |
String | API_GetAccountRegStateString(String domain,
String proxy,
String username,
String sipusername,
boolean pushnotify,
boolean strict)
|
String | API_GetAddress()
Query local address. |
SIPNotification.AI | API_GetAI(int line)
|
String | API_GetAltWorkdir()
Query the application alternative working directory (such as folder on external SD card). |
String | API_GetAudioDevice(int dev)
Query the current audio device name. |
String | API_GetAudioDeviceList(int dev)
Query the list of available audio devices. Note: usually you don’t need to use this function. |
String | API_GetBindir()
Query the application path (folder with the app binaries or app home folder) |
String | API_GetBlacklist()
Query the current blacklist |
int | API_GetBuildNumber()
Get the BUILDNUMBER |
String | API_GetCallerID()
|
String | API_GetCallerID(int line)
|
String | API_GetCallerID(int line,
int type)
Deprecated. |
String | API_GetClasses()
|
String | API_GetConfigHash()
Get a has value of the configuration. Should not be used. |
String | API_GetContact(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContactName(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContactPhone(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContactPresence(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContactPresenceStr(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContacts()
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContactSIP(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
String | API_GetContactSpeedDial(String name)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
int | API_GetCurrentConnectedCallCount()
Query the number of simultaneous calls currently in progress. |
String | API_GetDeviceID()
Get device identifier unique per user |
int | API_GetDiscReasonCode(String line)
Query the disconnect reason SIP code of the last call or register. |
String | API_GetDiscReasonText(String line)
Query the disconnect reason of the last disconnected call. |
SIPNotification.Status | API_GetEndpointDetails(int line)
|
String | API_GetEndpointDetailsStr()
|
String | API_GetEndpointDetailsStr(int line)
|
int | API_GetExeVersion()
Get the SDK version |
String | API_GetGlobalStatus()
Helper function to ask for the SIP stack state/details. |
String | API_GetGlobalStatus(boolean shortlines)
|
String | API_GetIncomingDisplay()
Get incoming caller id (might return two lines: caller id \n caller name) |
String | API_GetIncomingDisplay(int line)
Get incoming caller id (might return two lines: caller id \n caller name) |
int | API_GetIncomingVideoEndpoint(int line)
Return line number of the incoming video call if any, otherwise -1. |
String | API_GetLastCallDetails()
Get details about the last finished call. |
String | API_GetLastRecFileName()
Query recently recorded file. |
String | API_GetLastRecInvite()
Get last received INVITE message. |
String | API_GetLastRecSIPMessage(String line)
Get last received SIP message. |
String | API_GetLastSentInvite()
Get last sent INVITE message. |
int | API_GetLine()
Get the currently active line. This should be the line which you have set previously except after incoming and outgoing calls (the SIP client will automatically switch the active line to a new free line for these if the current active line is already occupied by a call). |
String | API_GetLineDetails(int line)
Get details about a line. |
String | API_GetLineParameter(int line,
String param)
Get line specific parameter for a specific current/next/all line. |
int | API_GetLineStatus(int line)
Query the state of a line. Note: this is rarely needed since you receive the status also by event notifications Use the API_GetState function instead |
String | API_GetLineStatusText(int line)
Query the state of a line. Note: this is rarely needed since you receive the status also by event notifications |
String | API_GetLogPath()
Query the application log file path. |
String | API_GetMAC()
Get the device MAC address if possible. Some devices will forbid access to MAC address |
String | API_GetMainAccount()
Get the SIP URI of the main account. |
String | API_GetMainAccount(boolean strict)
|
String | API_GetMainAccount(boolean strict,
int format)
Get the SIP URI of the main account. |
String | API_GetMainAccount(int format)
|
byte[] | API_GetMedia()
|
byte[] | API_GetMedia(int timeout)
Get RTP stream. Will return the next media (audio or video) packet as a byte buffer from the JVoIP internal queue. |
boolean | API_GetMediaEnd()
You might call this function if you don't need the media stream anymore (if you will not use the API_GetMedia anymore) |
String | API_GetMySIPURI(boolean all)
Get the SIP URI on which the current endpoint can be reached such as username@server.com or username@localip:port. |
SIPNotification | API_GetNotification()
Return the next notification object. |
String | API_GetNotifications()
|
String | API_GetNotificationsSync()
|
String | API_GetNotificationStrings()
Return the notification strings. |
String | API_GetParameter(String param)
Query parameter. Note: some basic parameters should be set before the Start function have been called (such as “register”), however most parameters can be also changed at run-time. |
String | API_GetPeer()
Query the peer username / Caller ID. |
String | API_GetPeer(int line)
Query the peer username / Caller ID. |
String | API_GetPeerDisplayname()
Query the peer displayname. |
String | API_GetPeerDisplayname(int line)
Query the peer displayname. |
String | API_GetPresenceStatus()
Query local presence state. |
String | API_GetProfileStatusText(String username)
Get the profile status text for this user. |
String | API_GetRegFailReason()
Query the reason of the last failed registration. |
String | API_GetRegFailReason(boolean extended)
Query the reason of the last failed registration. |
String | API_GetSDPField(int line,
String field)
Return a SDP field value received by JVoIP |
String | API_GetSIPHeader(int line,
String hdr)
Return a sip header value received by JVoIP. |
String | API_GetSIPHeaderInternal(int line,
String hdr)
|
String | API_GetSIPMessage(int line,
int dir,
int type)
Return the last received or sent SIP signaling message as raw text. |
int | API_GetState(int line)
|
int | API_GetState(int line,
int strict)
Returns line state or global state if you pass -2 as line parameter |
String | API_GetStateStr(int line)
Returns line state or global state if you pass -2 as line parameter |
String | API_GetStateStr(int line,
int strict)
Returns line state or global state if you pass -2 as line parameter |
String | API_GetStatus(int line)
|
String | API_GetStatus(int line,
int strict)
|
int | API_GetStatusId(int line)
Returns line state or global state id. Should not be used (use the API_GetStatus instead) |
String | API_GetUDeviceID()
Get device identifier unique per device. |
String | API_GetVersion()
Get the SIP stack version number. |
String | API_GetVideoDevice()
Query the video device in use. |
String | API_GetVideoDeviceList()
Query video recording devices. |
String | API_GetVideoDeviceList(int async,
boolean strict)
Query video recording devices. |
int | API_GetVideoEndpoint(int line)
Return line number for the video call if any, otherwise -1. |
String | API_GetVideoRTPAddrForPlayback()
Return the rtsp socket address. |
String | API_GetVideoSDPFilePath()
|
String | API_GetVideoSDPFilePath(int line)
|
String | API_GetVideoSDPFilePath(int line,
boolean force)
Return SDP file path. |
int | API_GetVolume(int dev)
|
int | API_GetVolume(int dev,
int line)
Get Volume level |
String | API_GetWhitelist()
Query the current whitelist |
String | API_GetWorkdir()
Query the application working directory (data folder) Based on appcontext.getFilesDir().getPath() and Environment.getDataDirectory().getPath(); |
String | API_GuiStarted()
Test API |
boolean | API_HandleCall(int line)
Handle incoming call (send ringing, prepare media, process early media, etc). This function should be used only if the incoming call handling have been deferred using the deferincomingcall parameter. |
boolean | API_Hangup()
Disconnect call. |
boolean | API_Hangup(int line)
Disconnect current call(s). |
boolean | API_Hangup(int line,
String reason)
Disconnect current call(s). |
boolean | API_HasAudioTricks()
|
boolean | API_HasCallInProgress()
Query of there is any call in progress (including calls in ringing or connected state). |
boolean | API_HasCallInSpeaking()
Query of there is any connected call. |
int | API_HiddenLine()
Query hiddel endpoint channel. Hidden calls are usually the result of barge-in calls. |
boolean | API_Hold()
Put call on hold. |
boolean | API_Hold(int line)
Put call on hold. |
boolean | API_Hold(int line,
boolean hold)
Put call on hold. |
boolean | API_Hold(int line,
int direction)
Put call on hold. |
boolean | API_Hold(int line,
int direction,
int media)
Put call on hold. |
boolean | API_HoldChange(int line)
Togle hold state of the call. |
boolean | API_HoldEx(int line,
int direction,
int media)
Put call on hold. |
String | API_HTTPGet(String uri)
Send a HTTP GET request. |
boolean | API_HTTPKeepAlive()
|
boolean | API_HTTPPost(String uri,
String data)
Send a HTTP POST request. |
String | API_HTTPReq(String uri,
String data)
Send a HTTP POST or GET request. |
boolean | API_HTTPReqAsync(String uri,
String data)
Send a HTTP POST or GET request. |
boolean | API_HTTPReqAsyncFavafone(String uri,
String data)
|
boolean | API_Ignore(int line)
Ignore incoming call. |
boolean | API_Info(int line,
String msg)
Send custom INFO message (for DTMF use the API_Dtmf function instead). |
int | API_IsEncrypted()
Check if the connection is encrypted. |
int | API_IsInCall()
Query of there is any call in progress. |
boolean | API_IsIncomingVideo()
Check if current incoming call is video call. |
int | API_IsMuted(int line)
Return if the selected line is muted or not. |
int | API_IsMutedIntern(int line)
|
int | API_IsMutedIntern(int line,
boolean intern)
|
void | API_IsNewBrowserConnection()
|
int | API_IsOnHold(int line)
Query if the selected line is on hold or not |
int | API_IsOnHoldIntern(int line)
|
int | API_IsOnHoldIntern(int line,
boolean intern)
|
boolean | API_IsOnline()
Query online state. This is not the same with the register state (It can return true even if not registered) |
boolean | API_IsRegistered()
Get the registered state. |
int | API_IsRegisteredEx()
Get the extended registered state. |
boolean | API_IsSpeaking()
Query of there is any connected call. |
boolean | API_IsTerminated()
Check if JVoIP is terminated |
int | API_JSSendTest(int count)
|
String | API_LcExpired()
|
String | API_LineToCallID(int line)
Get the SIP Call-ID for a line number. Note: will return the current default line if the line number is 0 or negative. |
String | API_ListAccounts()
Will return the list of the account URI's separated by semicolon ; |
String | API_ListAccounts(int format,
String markmain,
boolean withstatus,
String separator)
Will return the list of the account URI's separated by semicolon ; |
String | API_LoadFile(String filename)
Load file content from local disk. |
boolean | API_LoadFileRemote(String filename)
Load file from remote storage. The download process is performed asynchronously. You need to call this function only once and then a few seconds later call the API_LoadFile function with the same file name. It will contain “ERROR: reason” text if the download failed. |
String | API_LoadFileRemoteSync(String filename)
Will download the specified file from remote storage synchronously (will block until done or fails). |
boolean | API_Log(String str)
Deprecated. |
boolean | API_MightStop()
You might call this functions if your app might terminate soon. This will just make sure that the internal SIP stack settings are properly saved and the sipstack is prepared for an unexpected termination. Note: this function will NOT unregister or stop the SIP stack, because in some circumstances it might be better to let the app running in the background until possible to still listen for incoming calls. |
boolean | API_Mute(int line,
boolean mute)
Mute current call. |
boolean | API_Mute(int line,
boolean mute,
int what)
Mute current call. Same as the Mute API. |
boolean | API_MuteArg(int line,
boolean mute,
int what)
|
boolean | API_MuteEx(int line,
boolean mute,
int what)
|
boolean | API_NATKeepAlive(String server)
Rarely needed if any, because the siptack will do it automatically. |
boolean | API_NeedRatingRequest()
Some servers might report call rating automatically in signaling. |
boolean | API_NewUser(String user)
On newuser, you should ask the user if wish to accept it. |
String | API_NextCallID()
|
String | API_NextCallID(String callid)
Set or get the SIP Call-ID used for the first upcoming new SIP session. |
boolean | API_NoUnregister()
Signal that no unregistration is needed. For example you might call this before to stop the SIP stack if you don't wish that the server to be notified. |
boolean | API_NumExists()
Use this only with the Mizu Softswitch. On first start you might call API_NumExists. If using the Mizu VoIP server, then it will return all existing contacts with SERVERCONTACTS,userlist notification where userlist are populated with the valid users and their online status. |
boolean | API_NumExistsEx(String contactlist)
|
SIPNotification | API_ParseNotification(String notificationstring)
Helper function to convert notification String to SIPNotification object |
boolean | API_PeerIsMizu(int line)
Check if peer is Mizutech software. |
boolean | API_PlayBuff()
Stop local audio playback |
boolean | API_PlayBuff(boolean start,
byte[] buff,
int len,
boolean isring,
String audiodevice,
int samplerate,
int reset)
Play a PCM sound buffer locally (on the local audio player device) . |
boolean | API_PlayBuff(byte[] buff)
Play a PCM sound buffer locally (on the local audio player device) . |
boolean | API_PlayBuff(byte[] buff,
int len)
Play a PCM sound buffer locally (on the local audio player device) . |
boolean | API_PlayBuff(byte[] buff,
int len,
int samplerate)
Play a PCM sound buffer locally (on the local audio player device) . |
boolean | API_PlayBuffOld(boolean start,
byte[] buff,
int len,
boolean isring,
String audiodevice)
|
boolean | API_PlaySound(int line,
String file)
Play any sound file to peer. At least wave files are supported in the following format: PCM SIGNED 8000.0 Hz (8 kHz) 16 bit mono (2 bytes/frame) in little-endian (128 kbits). |
boolean | API_PlaySound(int start,
String file,
int loop,
boolean async)
|
boolean | API_PlaySound(int start,
String file,
int loop,
boolean async,
boolean localfile)
|
boolean | API_PlaySound(int start,
String file,
int loop,
boolean async,
boolean localfile,
boolean toremotepeer,
int line)
|
boolean | API_PlaySound(int start,
String file,
int loop,
boolean async,
boolean localfile,
boolean toremotepeer,
int line,
String audiodevice,
boolean isring)
Play any sound file. At least wave files are supported in the following format: PCM SIGNED 8000.0 Hz (8 kHz) 16 bit mono (2 bytes/frame) in little-endian (128 kbits). This function can be used to play audio locally, but also for remote streaming. For remote playback, it is recommended to force a narrowband codec if your file is narrowband or a wideband codec (speex, opus) if your file is wideband (16 kHz, 16 bit mono in little-endian). The file must be found locally. |
boolean | API_PlaySound(String file)
|
boolean | API_PlaySoundInternal(int start,
String file,
int loop,
boolean async,
boolean localfile,
boolean toremotepeer,
int line,
String audiodevice,
boolean isring)
|
boolean | API_PlayTone(int tone)
|
String | API_Poll()
Deprecated. |
String | API_Poll(boolean all)
|
SIPNotification | API_PollNotification()
Return the next notification object if any. |
String | API_PollNotificationStrings()
Return the notification strings. |
String | API_PollSync()
|
String | API_PollSync(boolean all)
|
boolean | API_PushContactlist(String userlist)
User for presence. Call this to pass all the usernames and phonenumbers from your external contact list if any. This is necessary, because for existing contacts JVoIP can accept the requests automatically, while for other it might ask for user permission |
boolean | API_RecFiles_Clear()
Delete old recorded files. |
boolean | API_RecFiles_Del()
Delete local recorded files. |
String | API_RecFiles_List()
List pending voice record files. |
boolean | API_RecFiles_Upload()
Upload pending recorded files (if ftp/http URI was set) |
boolean | API_RecFiles_UploadEx(String filelist,
String ftp)
|
boolean | API_Record(int record)
Deprecated. |
boolean | API_Register()
Set parameters for authentication and register to the SIP server. Will connect to the SIP server. |
boolean | API_Register(String server,
String username,
String password)
|
boolean | API_Register(String server,
String username,
String password,
String authusername,
String displayname)
|
boolean | API_Register(String server,
String username,
String password,
String authusername,
String displayname,
boolean async)
Set parameters for authentication and register to the SIP server. Will connect to the SIP server. |
boolean | API_Register(String server,
String username,
String password,
String authusername,
String displayname,
String proxy)
|
boolean | API_RegisterAsync()
|
boolean | API_Registered()
Get the registered state. |
boolean | API_RegisterEx(String accounts)
You can use this function for multiple secondary accounts (up to 99) on the same or other servers. Instead of this function you can just set the “extraregisteraccounts” parameter to the same value. |
boolean | API_RegisterNoParam()
|
boolean | API_Reject()
Reject incoming call. You could also use the Hangup API function for this. |
boolean | API_Reject(int line)
Reject incoming call. You could also use the Hangup API function for this. |
boolean | API_Reject(int line,
String reason)
Reject incoming call. You could also use the Hangup API function for this. |
boolean | API_RejectEx(int line,
String reasontext)
Reject incoming call. You could also use the Hangup API function for this. Will reject the call only if the line strictly match an incoming channel number. |
void | API_RequestStatus()
|
boolean | API_ReStart()
Will restart the SIP stack. |
boolean | API_RTPHeaderExtension(int line,
int profile,
int extension)
Set RTP header extension for the RTP packets |
boolean | API_RTPHeaderExtension(int line,
int profile,
String extension)
|
String | API_RTPStat()
|
String | API_RTPStat(int line)
Query for media quality reports. |
boolean | API_SaveFile(String filename,
String content)
Will save the text file to local disk in the working directory in encrypted format (use API_SaveFileRaw to save as-is) |
boolean | API_SaveFileRaw(String filename,
String content)
Will save the text file to local disk in the working directory as is. |
boolean | API_SaveFileRemote(String filename,
String content)
Save file to remote storage (preconfigured ftp or http server ) |
boolean | API_ScreenShare(String peer)
|
boolean | API_ScreenShareAccept(String peer)
|
boolean | API_ScreenShareReject(String peer)
|
boolean | API_SendChat(int line,
String message)
|
boolean | API_SendChat(int line,
String number,
String message)
Send a instant message. |
boolean | API_SendChat(int line,
String number,
String group,
String message)
|
boolean | API_SendChat(int line,
String number,
String group,
String message,
int msgid)
Group messaging. |
boolean | API_SendChat(String message)
|
boolean | API_SendChat(String number,
String message)
|
boolean | API_SendChatIsComposing(int line,
String number)
Send IM typing notification. |
boolean | API_SendSIP(String msg)
Send custom SIP signaling message (for example OPTIONS, NOTIFY, etc) on the current active line. |
boolean | API_SendSIPMessage(int line,
String msg)
|
boolean | API_SendSIPMessage(int line,
String msg,
String body)
|
boolean | API_SendSIPMessage(int line,
String msg,
String body,
String account)
|
boolean | API_SendSIPMessage(int line,
String msg,
String body,
String account,
String target)
Send custom SIP signaling message. |
boolean | API_SendSIPMethod(int msg)
|
boolean | API_SendSMS(int line,
String number,
String message)
|
boolean | API_SendSMS(int line,
String number,
String message,
int msgid)
Send a SMS message if softswitch has SMS delivery capabilities (Otherwise might try to deliver as IM). The message is delivered as a standard SIP MESSAGE with X-Sms: Yes header. |
boolean | API_SendSMS(int line,
String number,
String group,
String message,
int msgid)
|
boolean | API_SendSMS(String number,
String message)
|
boolean | API_SendUSSD(int line,
String method,
String ussd)
Send USSD message (After the IMS 3GPP TS 24.390 standard) |
boolean | API_SendVideoRTP(int line,
byte[] buffer,
int length)
Stream video to remote peer by passing video RTP packets with this function |
boolean | API_ServerInit(String ip)
|
boolean | API_ServerIsMizu()
Check if server is Mizutech software. |
boolean | API_SetAccount(String params)
Change (secondary) account. |
boolean | API_SetAccount(String server,
String proxy,
String username,
String sipusername,
String displayname,
String password,
int transport,
long registerinterval)
|
boolean | API_SetAccount(String server,
String proxy,
String username,
String sipusername,
String displayname,
String password,
int transport,
long registerinterval,
boolean ismain)
|
boolean | API_SetAccount(String server,
String proxy,
String username,
String sipusername,
String displayname,
String password,
int transport,
long registerinterval,
int ismain)
Change (secondary) account. |
void | API_SetAChange()
|
boolean | API_SetAudioDevice(int dev,
String devicename)
Select an audio device. |
boolean | API_SetAudioDevice(int dev,
String devicename,
int immediate)
Select an audio device. |
void | API_SetBChange()
|
boolean | API_SetBlacklist(String str)
Set whole blacklist. |
boolean | API_SetContact(String name,
String params)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetContactName(String name,
String param)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetContactPhone(String name,
String param)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetContacts(String contacts)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetContactSIP(String name,
String param)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetContactSpeedDial(String name,
String param)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetContactStatus(String name,
String param)
Helper function for contact manipulation in case if you wish contact management to be handled by the SIP stack. If necessary then you might manage the contacts by implementing your own contacts module after your needs instead of using this contact management API. |
boolean | API_SetCredentials()
Deprecated. |
boolean | API_SetCredentials(String server,
String username,
String password)
Set parameters for authentication. |
boolean | API_SetCredentials(String server,
String username,
String password,
String authusername,
String displayname)
Set parameters for authentication. |
boolean | API_SetCredentialsMD5(String server,
String username,
String md5,
String realm)
Set parameters for authentication. |
boolean | API_SetDIDChange(String did1,
String did2,
String fromcode)
|
boolean | API_SetKey(String key)
|
boolean | API_SetLine(int line)
Will set the current channel. Use only if you present line selection for the users. |
boolean | API_SetLineEx(String line)
Will set the current channel. Use only if you present line selection for the users. |
boolean | API_SetLineParameter(int line,
String param,
boolean value,
int permanent)
|
boolean | API_SetLineParameter(int line,
String param,
int value,
int permanent)
|
boolean | API_SetLineParameter(int line,
String param,
long value,
int permanent)
|
boolean | API_SetLineParameter(int line,
String param,
String value,
int permanent)
Set parameter for a specific current/next/all line. |
boolean | API_SetLogLevel(int level)
Set loglevel at runtime. |
boolean | API_SetMainAccount(String uri)
Change/switch main account. |
boolean | API_SetMediaListener(SIPMediaListener listener)
Subscribe to media packets |
boolean | API_SetNotificationListener(SIPNotificationListener listener)
Subscribe to notification events |
boolean | API_SetParameter(String param,
boolean value)
Configure the SIP stack by passing any parameter. |
boolean | API_SetParameter(String param,
int value)
Configure the SIP stack by passing any parameter. |
boolean | API_SetParameter(String param,
long value)
Configure the SIP stack by passing any parameter. |
boolean | API_SetParameter(String param,
String value)
Configure the SIP stack by passing any parameter. |
boolean | API_SetParameters(String parameters)
Configure the SIP stack with a list of parameters. |
boolean | API_SetPresenceStatus(String status)
Use the API_SetPresenceStatus(statustring) function call to change the user online status. This function will start to send NOTIFY requests to subscribed parties. |
boolean | API_SetPushNotifications(int pushnotifications,
String clientid,
String packagename,
String gateway)
|
boolean | API_SetPushNotifications(int pushnotifications,
String clientid,
String packagename,
String gateway,
int fromcode)
Call this function if you wish the SIP stack to manage push notifications, useful especially when used with the mizu server or MPUSH gateway. Should be called after API_Start. |
boolean | API_SetSDPField(int line,
String field,
int type)
|
boolean | API_SetSIPHeader(int line,
String hdr)
Set a custom sip header (a line in the SIP signaling) that will be sent with all messages. Can be used for various integration purposes (for example for sending the http session id). Multiple headers can be separated by CRLF (\r\n). You can also set this with parameter (customsipheader). |
boolean | API_SetSpeakerMode(boolean loud)
Set speaker mode, |
boolean | API_SetSSID(String ssidval)
Should not be used. |
boolean | API_SetSSLContext(javax.net.ssl.SSLContext sc)
Set custom SSLContext for new TLS connections. |
boolean | API_SetUUI(int line,
String value,
int fortarget)
Set a custom UUI (User-to-User Call Control Information as described in RFC 7433). |
boolean | API_SetVideoDevice(String devicename)
Set the video input device. |
boolean | API_SetVolume(int dev,
int volume)
|
boolean | API_SetVolume(int dev,
int volume,
int line)
Set volume for the selected device. |
boolean | API_SetVolumeIn(int val)
Deprecated. |
boolean | API_SetVolumeOut(int val)
Deprecated. |
boolean | API_SetWhitelist(String str)
Set whole whitelist. Only these peers will be allowed. |
void | API_SetXChange(int code)
|
void | API_SetXChangeOld(int vers)
|
int | API_ShouldReset()
Check if the sipstack should be restarted. |
boolean | API_ShouldResetBeforeCall()
This function might be called before calls and you should quickly restart the sipstack if returns true (the continue to make the call). |
boolean | API_ShowLog()
Show a new window with logs. |
boolean | API_SO(String peer,
boolean on,
String server,
String body)
Avaya Service Observing (barge in) https://downloads.avaya.com/elmodocs2/merlin/r1_5/html/features/service%20observing/1.htm Send a Service Observing PUBLISH request. This is a non-standard proprietary method, which might be compatible only with Avaya systems. |
boolean | API_SoftphoneScreenshare(String peer)
|
boolean | API_SoftphoneVideoCall(String peer)
|
boolean | API_Start()
Will start the SIP engine. This has to be called only if you use JVoIP as and SDK or as a java voip library. |
boolean | API_Start2()
|
boolean | API_StartGUI()
|
boolean | API_StartInner(boolean isrestart)
|
boolean | API_StartRing(int line)
Will start local ringtone. Rarely needed if any. |
boolean | API_StartStack()
This function call is optional to start the sip stack on demand. If not called, then the sip stack is started anyway if the startsipstack parameter is set, otherwise will start at first registration or outgoing call attempt. |
void | API_Stop()
|
void | API_Stop(boolean fast)
Will stop the SIP stack. |
void | API_Stop(int fast)
Will stop the SIP stack. |
void | API_Stop(int fast,
boolean fromdelayedthread)
|
boolean | API_StopRing(int line)
Will stop pending ring tone. Rarely needed if any. |
boolean | API_StopVideo_Now(int line,
int direction)
|
boolean | API_StopVideo()
Remove the video stream |
boolean | API_StopVideo(int line,
int direction)
Remove the video stream at the specified line Can be also used as an alternative for video hold |
boolean | API_StreamSoundBuff(byte[] buff)
|
boolean | API_StreamSoundBuff(byte[] buff,
int len)
|
boolean | API_StreamSoundBuff(int line,
byte[] buff,
int len)
|
boolean | API_StreamSoundBuff(int start,
int line,
byte[] buff,
int len)
Audio streaming from buffer. |
boolean | API_StreamSoundBuff(int start,
int line,
byte[] buff,
int len,
int samplerate)
|
boolean | API_StreamSoundBuff(int start,
int line,
byte[] buff,
int len,
int samplerate,
boolean from_ai)
|
boolean | API_StreamSoundStream(int start,
int line,
java.io.InputStream inputstream)
Audio streaming from InputStream. |
boolean | API_SwitchVideo_Now(int line)
|
boolean | API_SwitchVideo(int line,
int type)
|
boolean | API_Test()
Test API availability. |
String | API_TestEcho(String echo)
Test API availability. |
String | API_TestEncoded()
|
int | API_TestEx()
|
void | API_TestPrint()
|
String | API_TestService()
Test API |
boolean | API_Transfer()
|
boolean | API_Transfer(int line)
|
boolean | API_Transfer(int line,
String number)
|
boolean | API_Transfer(int line,
String number,
int calltype)
Transfer current call to peer which is usually a phone number or a SIP username. |
boolean | API_Transfer(int line,
String number,
int calltype,
String callparameters)
|
boolean | API_Transfer(int line,
String number,
String callparameters)
|
boolean | API_Transfer(String number)
|
boolean | API_TransferDialog()
Show the call transfer input box. |
boolean | API_Unregister()
Will stop all endpoints (hangup current calls if any and unregister) |
boolean | API_Unregister(int waitfor)
Will stop all endpoints (hangup current calls if any and unregister) |
boolean | API_Unregister(String account)
Will unregister an account (hangup current calls if any and unregister) |
boolean | API_Unregister(String account,
int waitfor)
Will unregister an account (hangup current calls if any and unregister) |
boolean | API_Unregister(String account,
int waitfor,
int stopallsessions)
|
boolean | API_Unregister(String account,
int waitfor,
int stopallsessions,
boolean delaccount)
|
boolean | API_Unregister(String account,
String server,
int waitfor)
Will unregister an account (hangup current calls if any and unregister) |
boolean | API_Unregister(String account,
String server,
int waitfor,
int stopallsessions)
Unregister a SIP account |
boolean | API_Unregister(String account,
String server,
int waitfor,
int stopallsessions,
boolean delaccount)
Unregister a SIP account |
boolean | API_Unregister(String account,
String server,
int waitfor,
int stopallsessions,
int delaccount)
|
boolean | API_Unsubscribe()
You might use the API_UnSubscribe() API to unsubscribe all endpoints (this includes presence, voicemail and BLF subscribes). |
String | API_VAD()
Query for global voice activity statistics. |
String | API_VAD(boolean fromexternapi)
|
String | API_VAD(int line)
Query line for received voice activity statistics. |
boolean | API_VideoAccept(int accept,
int direction,
boolean remember)
|
boolean | API_VideoDisplayAccept()
|
String | API_VideoFileExt()
|
String | API_VideoGetCodec()
|
String | API_VideoGetCointainer()
|
int | API_VideoGetPayload()
|
boolean | API_VideoPreview()
|
boolean | API_VideoPreview(int line)
|
boolean | API_VideoPreview(int line,
int type)
Launch local video preview |
boolean | API_VideoTest()
|
boolean | API_VoiceRecord()
|
boolean | API_VoiceRecord(int startstop)
|
boolean | API_VoiceRecord(int startstop,
int now)
|
boolean | API_VoiceRecord(int startstop,
int now,
String filename)
Will start/stop a voice recording session This function should be used only if you would like to control the recording duration. If all conversations have to be recorded, then just set the “voicerecording” parameter after your needs. |
boolean | API_VoiceRecord(int startstop,
int now,
String filename,
int line)
Will start/stop a voice recording session. Same as the API_VoiceRecord above but with an extra line parameter which you can use to record call only for a specific line. This function should be used only if you would like to control the recording duration. If all conversations have to be recorded, then just set the “voicerecording” parameter after your needs. |
boolean | API_VoiceRecord(String filename)
|
boolean | API_WaitFor()
Wait max 3 seconds for sipstack to finish after Stop Should not be used. |
boolean | API_WaitFor(int maxmsec)
Wait for sipstack to finish after Stop Should not be used. |
SIPNotification | API_WaitForNotification(int notification)
Helper function to wait for a notification |
SIPNotification | API_WaitForNotification(int notification,
int line,
String filter,
long timeout)
Helper function to wait for a notification |
SIPNotification | API_WaitForNotification(int notification,
long timeout)
Helper function to wait for a notification |
SIPNotification | API_WaitForNotification(int notification,
String filter)
Helper function to wait for a notification |
SIPNotification | API_WaitForNotification(int notification,
String filter,
long timeout)
Helper function to wait for a notification |
| Constructor Detail |
|---|
public webphone()
startsipstack - Set to 0 if you don't want to auto start the sip stack (same as the startsipstack parameter). If the start parameter is set to 0, then you will need to call the API_Start function later to actually start the SIP stack.public webphone(int startsipstack)
public webphone(String parameters)
public webphone(int startsipstack, String userdir)
public webphone(int startsipstack, String userdir, int loglevel)
public webphone(SIPNotificationListener listener)
| Method Detail |
|---|
public boolean API_StartGUI()
public boolean API_HasAudioTricks()
public String API_GetAddress()
public String API_GetClasses()
public boolean API_AsyncCall(String param1, String param2, String param3, String param4, String param5, String param6, String param7)
public boolean API_SetCredentialsMD5(String server, String username, String md5, String realm)
server - SIP server address (domain or IP:port)username - SIP usernamemd5 - md5 checksum for username:realm:passwordrealm - This parameter is optional (can be set as an empty string) but it is recommended for easy error detection. If present and the server realm don’t match with this one, an error message will be displayed
public String API_GetLastRecFileName()
public boolean API_Test()
public int API_TestEx()
public String API_TestEcho(String echo)
echo - any string
public boolean API_SetParameters(String parameters)
parameters - You can pass a set of parameters with this function in value=key lines separated by CRLF (\r\n).
public String API_GetParameter(String param)
param - parameter name (setting name)
public boolean API_SetParameter(String param, String value)
param - parameter name (setting name)
public boolean API_SetParameter(String param, int value)
param - parameter name (setting name)
public boolean API_SetParameter(String param, long value)
param - parameter name (setting name)
public boolean API_SetParameter(String param, boolean value)
param - parameter name (setting name)
public boolean API_SetCredentials(String server, String username, String password, String authusername, String displayname)
server - SIP server address (domain or IP:port)username - SIP usernamepassword - SIP passwordauthusername - SIP auth username (if different from username)displayname - user full name (can be empty)
public boolean API_SetCredentials(String server, String username, String password)
server - SIP server address (domain or IP:port)username - SIP usernamepassword - SIP password
public boolean API_SetCredentials()
public boolean API_DelSettings(int level)
level - 0: settings only if it was not already cleared, 1: settings only forced, 2: force all, 3: delete also library cache
public boolean API_DelSettings()
public String API_GetConfigHash()
public boolean API_HTTPKeepAlive()
public boolean API_SetSSID(String ssidval)
public void API_SetAChange()
public void API_SetBChange()
public void API_SetXChange(int code)
public void API_SetXChangeOld(int vers)
public void API_IsNewBrowserConnection()
public void API_RequestStatus()
public boolean API_SetDIDChange(String did1, String did2, String fromcode)
public int API_IsEncrypted()
public String API_GetWorkdir()
public String API_GetAltWorkdir()
public String API_GetLogPath()
public boolean API_RecFiles_Del()
public boolean API_RecFiles_Clear()
public String API_RecFiles_List()
public boolean API_RecFiles_UploadEx(String filelist, String ftp)
public boolean API_RecFiles_Upload()
public String API_GetBindir()
public boolean API_IsOnline()
public String API_RTPStat(int line)
line - channel number
public String API_RTPStat()
public String API_VAD()
public String API_VAD(int line)
line - channel number
public String API_VAD(boolean fromexternapi)
public int API_IsInCall()
public boolean API_IsSpeaking()
public boolean API_IsRegistered()
public boolean API_Registered()
public int API_IsRegisteredEx()
public String API_GetRegFailReason()
public int API_GetAccountRegState(String uri)
uri - the account uri in user@server format (or only the user or the server part if there are no other similar accounts)
public int API_GetAccountRegState(String domain, String proxy, String username, String sipusername)
public int API_GetAccountRegState(String domain, String proxy, String username, String sipusername, boolean pushnotify, boolean strict)
public String API_GetAccountRegStateString(String uri)
uri - the account uri in user@server format (or only the user or the server part if there are no other similar accounts)
public String API_GetAccountRegStateString(String domain, String proxy, String username, String sipusername)
public String API_GetAccountRegStateString(String domain, String proxy, String username, String sipusername, boolean pushnotify, boolean strict)
public String API_GetGlobalStatus()
public String API_GetGlobalStatus(boolean shortlines)
public String API_GetRegFailReason(boolean extended)
extended - set to true for extended report
public int API_GetCurrentConnectedCallCount()
public boolean API_SaveFile(String filename, String content)
filename - file pathcontent - file content
public boolean API_SaveFileRaw(String filename, String content)
filename - file pathcontent - file content
public String API_LoadFile(String filename)
filename - file path
public boolean API_SaveFileRemote(String filename, String content)
filename - file pathcontent - file content
public boolean API_LoadFileRemote(String filename)
filename - file path
public String API_LoadFileRemoteSync(String filename)
filename - file path
public boolean API_NeedRatingRequest()
public String API_HTTPGet(String uri)
uri - HTTP URI
public boolean API_HTTPPost(String uri, String data)
public String API_HTTPReq(String uri, String data)
uri - HTTP URIdata - conent to post
public boolean API_HTTPReqAsync(String uri, String data)
uri - HTTP URIdata - conent to post
public boolean API_HTTPReqAsyncFavafone(String uri, String data)
public int API_ShouldReset()
public int API_JSSendTest(int count)
public boolean API_ShouldResetBeforeCall()
public boolean API_RegisterNoParam()
public void API_CheckConnection()
public boolean API_Register()
public boolean API_StartStack()
public boolean API_Start()
public boolean API_Start2()
public boolean API_ReStart()
public boolean API_StartInner(boolean isrestart)
public boolean API_Register(String server, String username, String password, String authusername, String displayname)
public boolean API_Register(String server, String username, String password, String authusername, String displayname, boolean async)
server - SIP server address (domain or IP:port)username - SIP usernamepassword - SIP passwordauthusername - SIP auth username (if different from username)displayname - user full name (can be empty)async - false if register have to be dow from this thread. true if from separate thread. It is recommended to set to true.
public boolean API_Register(String server, String username, String password, String authusername, String displayname, String proxy)
public boolean API_RegisterEx(String accounts)
accounts - must have the following format: server,usr,pwd,ival;server2,usr2,pwd2, ival;
public boolean API_AddAccount(String uri)
uri - SIP URI (Example: user@domain. Can include also the password and port like usr:password@domain:port)
public boolean API_AddAccount(String server, String proxy, String username, String sipusername, String displayname, String password, int transport, long registerinterval, int ismain)
server - SIP server address: domain or IP:portproxy - outbound SIP proxy if any (required only if it is different then the above server addressusername - SIP account user ID / extension IDsipusername - SIP auth username for authentication (if different then the above username)displayname - optional displayname / caller-idpassword - SIP account passwordtransport - -1: auto, 0: UDP, 1: TCP, 2: TLSregisterinterval - register refresh timer in seconds (default is 3600)ismain - -1: auto, 0: secondary account, 1: main account
public boolean API_AddAccount(String server, String proxy, String username, String sipusername, String displayname, String password, int transport, long registerinterval)
public boolean API_AddAccount(String server, String proxy, String username, String sipusername, String displayname, String password, int transport, long registerinterval, boolean ismain)
public boolean API_SetAccount(String params)
params - account parameters separated by command as described at the extraregisteraccounts parameter.
public boolean API_SetAccount(String server, String proxy, String username, String sipusername, String displayname, String password, int transport, long registerinterval, int ismain)
server - SIP server address: domain or IP:portproxy - outbound SIP proxy if any (required only if it is different then the above server addressusername - SIP account user ID / extension IDsipusername - SIP auth username for authentication (if different then the above username)displayname - optional displayname / caller-idpassword - SIP account passwordtransport - -1: auto, 0: UDP, 1: TCP, 2: TLSregisterinterval - register refresh timer in seconds (default is 3600)ismain - -1: auto, 0: secondary account, 1: main account
public boolean API_SetAccount(String server, String proxy, String username, String sipusername, String displayname, String password, int transport, long registerinterval)
public boolean API_SetAccount(String server, String proxy, String username, String sipusername, String displayname, String password, int transport, long registerinterval, boolean ismain)
public boolean API_DelAccount(String uri)
uri - SIP URI (Example: user@domain)public boolean API_DelAccount(String uri, boolean unregister)
uri - SIP URI (Example: user@domain)unregister - true if also unregister, false if keep the endpointpublic String API_GetMainAccount(boolean strict, int format)
strict - if set to true, then it will return the main global account (even if no accounts have been configured)format - 1: full string, 2: SIP URI, 3: compact/display, 4: user part only, 5: domain part only .Default is 2public String API_GetMainAccount()
public String API_GetMainAccount(boolean strict)
public String API_GetMainAccount(int format)
public boolean API_SetMainAccount(String uri)
uri - SIP URIpublic String API_ListAccounts()
public String API_ListAccounts(int format, String markmain, boolean withstatus, String separator)
format - 1: full string, 2: SIP URI, 3: compact/display .Default is 2markmain - any string to prefix the main account with (for example “*” or “[MAIN]”. Default is empty.separator - string to separate the accounts. Default is semicolon;
Example to display accounts for selection: API_ListAccounts(3, "*", true, "\r\n");public String API_GetAccountForLine(int line)
line - the call line
public String API_GetAccountForLine(int line, boolean strict)
public String API_GetAccountForLine(int line, int format)
public String API_GetAccountForLine(int line, boolean strict, int format)
line - the call linestrict - if false then it will return local endpoint URI even if account doesn't exists; if true then it will return only exact account match; default is falseformat - 1: full string, 2: SIP URI, 3: compact/display, 4: user part only, 5: domain part only .Default is 2
public String API_GetAccount(String uri)
uri - SIP URI (Example: user@domain)
public String API_GetAccount(String uri, boolean strict)
uri - SIP URI (Example: user@domain)if - strict is false, then will accept also partial match. if true then requires exact match. default is false.
public boolean API_RegisterAsync()
public String API_GetVersion()
public int API_GetExeVersion()
public int API_GetBuildNumber()
public String API_TestService()
public String API_GuiStarted()
public void CleanCredentials()
public boolean API_ClearCredentials()
public boolean API_Unregister()
public boolean API_Unregister(int waitfor)
waitfor - -1 (auto), 0 (do not wait) or 1 (wait for unregister to complete before to return).
public boolean API_Unregister(String account)
account - username or SIP URI or Call-ID to unregister (in case if you have multiple/extra registered accounts)
public boolean API_Unregister(String account, int waitfor)
account - username or SIP URI or Call-ID to unregister (in case if you have multiple/extra registered accounts)waitfor - -1 (auto), 0 (do not wait) or 1 (wait for unregister to complete before to return)
public boolean API_Unregister(String account, String server, int waitfor)
account - username or SIP URI or Call-ID (in case if you have multiple/extra registered accounts)server - ths SIP server address (in case if you have accounts across multiple servers)waitfor - -1 (auto), 0 (do not wait) or 1 (wait for unregister to complete before to return)
public boolean API_Unregister(String account, String server, int waitfor, int stopallsessions)
account - username or SIP URI (user@server) or Call-ID (in case if you have multiple/extra registered accounts)server - SIP server address (optional. might be used in case if you have accounts across multiple servers)waitfor - -1 (auto), 0 (do not wait) or 1 (wait for unregister to complete before to return)stopallsessions - -1 (auto), 0 (only unregister) or 1 (disconnect all other sessions belonging to this account)
public boolean API_Unregister(String account, int waitfor, int stopallsessions)
public boolean API_Unregister(String account, int waitfor, int stopallsessions, boolean delaccount)
public boolean API_Unregister(String account, String server, int waitfor, int stopallsessions, boolean delaccount)
account - username or SIP URI or Call-ID (in case if you have multiple/extra registered accounts)server - SIP server address (optional. might be used in case if you have accounts across multiple servers)waitfor - -1 (auto), 0 (do not wait) or 1 (wait for unregister to complete before to return)stopallsessions - -1 (auto), 0 (only unregister) or 1 (disconnect all other sessions belonging to this account)
public boolean API_Unregister(String account, String server, int waitfor, int stopallsessions, int delaccount)
public void API_Exit()
public void API_ExitEx()
public boolean API_CapabilityRequest(String server, String username)
server - peer or server SIP signaling address (IP:port or domain)username - user name to be sent in the SIP request
public boolean API_CapabilityRequest()
public boolean API_SendSIPMessage(int line, String msg, String body, String account, String target)
line - endpoint where the message will be sent. -3: new endpoint, -2: all endpoints, -1: current active, 0: register endpoint, 1+: call channel numbermsg - SIP message to send. It can be just the method name (OPTIONS,MESSAGE,NOTIFY,INVITE,etc), the full message header or the full message including also a body (such as SDP)body - optional SIP message body (such as SDP, xml payload or chat text, etc). It might be set if for the msg you just pass the method name. Set to "null" if body must not be sent.account - optional SIP account details if you wish to use other parameters then the configured one. same format like the extraregisteraccounts parametertarget - optional target username, number of SIP URI if not specified in the msg
public boolean API_SendSIPMessage(int line, String msg, String body, String account)
public boolean API_SendSIPMessage(int line, String msg, String body)
public boolean API_SendSIPMessage(int line, String msg)
public boolean API_SO(String peer, boolean on, String server, String body)
peer - the extension, username or phone number of the peer to be “observed”on - set to true to turn on the Service Observing feature or false to turn it offserver - set this only if the request have to be sent to another server (not the configured one). same format like the extraregisteraccounts parameter (you can specify only the server address).body - custom message body. Might be useful if the default implementation doesn’t fulfill your needs. In this case you can send any custom body (usually an xml)
Example: API_SO("111", true, "serveraddress", "");public boolean API_SendSIP(String msg)
msg - SIP message to send
public boolean API_SendSIPMethod(int msg)
public String API_GetSIPHeader(int line, String hdr)
line - channel numberhdr - SIP header to request
public String API_GetSIPHeaderInternal(int line, String hdr)
public String API_GetSDPField(int line, String field)
line - endpointfield - SDP key
public String API_GetSIPMessage(int line, int dir, int type)
line - channel numberdir - 0: in (incoming/received message), 1: out (outgoing/sent message)type - 0: any, 1: SIP request (such as INVITE, REGISTER, BYE), 2: SIP answer (such as 200 OK, 401 Unauthorized and other response codes), 3: INVITE (the last INVITE received or sent), 4: the last 200 OK (call connect, ok for register or other)
public boolean API_AI(int line, boolean start)
line - channel number. -2: all current calls, -1 the current active line, 0: only enable/disable the AI module globally, 1+: start/stop AI on the specific line.start - true to start/connect, false to stop/disconnectpublic boolean API_AI(int line, int start)
public boolean API_AI(int line)
public boolean API_AI(boolean start)
public boolean API_AI()
public boolean API_AI(int line, int start, String params)
public SIPNotification.AI API_GetAI(int line)
public boolean API_AISend(int line, String msg)
line - endpoint channel numbermsg - message to send (usually JSON)public boolean API_AISend(int line, String msg, boolean isaudio)
public boolean API_SetLineParameter(int line, String param, String value, int permanent)
line - channel number. If -2 then it will be set as global config like the API_SetParameter. If -1 then for the active line. If 0, then it will be applied for all next/new channel(s). Otherwise it will be applied for the specific line.param - parameter name (setting key name)value - param value as string (or "NULL" to clear any old preset)permanent - param if 1 then the setting will be kept for all future lines with the same line number, if 0 then the setting will be applied only for the current or very next channel with the same line
public boolean API_SetLineParameter(int line, String param, int value, int permanent)
public boolean API_SetLineParameter(int line, String param, long value, int permanent)
public boolean API_SetLineParameter(int line, String param, boolean value, int permanent)
public String API_GetLineParameter(int line, String param)
line - channel number. If -2 then it will get the global config like the API_GetParameter. If -1 then for the active line. If 0, then it will get for all next/new channel(s). Otherwise it read from the the specific line.param - parameter name (setting key name)
public boolean API_SetSIPHeader(int line, String hdr)
line - channel numberhdr - SIP header (line) to set
public boolean API_SetSDPField(int line, String field, int type)
public boolean API_RTPHeaderExtension(int line, int profile, int extension)
line - channel numberprofile - profile numberextension - bytes to send as string or int
public boolean API_RTPHeaderExtension(int line, int profile, String extension)
public boolean API_ED137PTT(int line, int ptt)
public boolean API_ED137PTT(int line, int ptt, int pttid)
line - channel numberptt - (0: off (not speaking), 1: on (Normal PTT ON), 2: Coupling PTT ON, 3: Priority PTT ON, 4: Emergency PTT ON)pttid - optional PTT-ID (otherwise if default / -1 is passed then it will be loaded from global config)
public boolean API_ED137PTT(int line, int ptt, int pttid, Endpoint calledfromep)
public boolean API_SetUUI(int line, String value, int fortarget)
line - channel numbervalue - UUI data (can include also parameters. Example: 56a390f3d2b7310023a2;encoding=hex;purpose=foo;content=barfortarget - specify if the UUI have to be sent to target party with call transfer or redirect. 0: no (to peer with the User-to-User header), 1: yes (to target escaped in Contact or Refer-To URI), 2: both
public boolean API_ServerInit(String ip)
public boolean API_NATKeepAlive(String server)
server - target server addressspublic boolean API_Register(String server, String username, String password)
public String API_LineToCallID(int line)
line - channel number
public String LineToCallID(int line)
public int API_CallIDToLine(String callid)
callid - SIP Call-ID string
public int CallIDToLine(String callid)
public String API_NextCallID(String callid)
callid - the new SIP Call-ID or empty string
public String API_NextCallID()
public boolean API_SetLine(int line)
line - channel number
public boolean API_SetLineEx(String line)
line - channel number, SIP Call-ID or peer username/number
public int API_GetLine()
public boolean API_SetKey(String key)
public boolean API_Call(String number)
number - peer, destinationnumber, SIP username or SIP URI to call
public boolean API_Call(int line, String number)
line - channel numbernumber - peer, destinationnumber, SIP username or SIP URI to call
public boolean API_Call(int line, String number, String callparameters)
public boolean API_CallEx(int line, String peer, int type)
public boolean API_CallEx(int line, String peer, int type, String callparameters)
public boolean API_Call(int line, String peer, int calltype, String callparameters)
line - channel numberpeer - destinationnumber, SIP username or SIP URI to calltype - optinal call type: -1: auto/default, 0: audio, 1: video, 2: screen-sharingcallparameters - optinal parameters for the call session
public boolean API_Call(int line, String peer, int calltype)
public boolean API_Call(int line, String peer, int calltype, int audiodirection, int videodirection)
public boolean API_Call(int line, String peer, int calltype, int audiodirection, int videodirection, String callparameters)
line - channel numberpeer - destinationnumber, SIP username or SIP URI to callcalltype - call type: -1: auto/default, 0: audio, 1: video, 2: screen-sharingaudiodirection - initial hold state for audio: -1: inactive, 0: send only, 1: receive only, 2: both way (default)videodirection - initial hold state for video: -1: inactive, 0: send only, 1: receive only, 2: both way (default)callparameters - optinal parameters for the call session
public boolean API_Call_Now(int line, String number)
public boolean API_Call_Now(int line, String number, int calltype, int audiodirection, int videodirection)
public boolean API_Call_Now(int line, String number, int calltype, int audiodirection, int videodirection, String callparameters)
public boolean API_VideoTest()
public String API_GetVideoDeviceList()
public String API_GetVideoDeviceList(int async, boolean strict)
async - optional parameter: 2: immediately never blocking, 1: returns immediately only if already cached, 0: always blocking reloadstrict - ptional parameter: false: might failback to old cached result, true: it will return empty string if can’t list the video input devices
public String API_GetVideoDevice()
public boolean API_SetVideoDevice(String devicename)
devicename - camera/webcam device name. Set to "Default" to try using the default device.
public boolean API_VideoAccept(int accept, int direction, boolean remember)
public boolean API_VideoDisplayAccept()
public String API_VideoGetCodec()
public int API_VideoGetPayload()
public String API_VideoFileExt()
public String API_VideoGetCointainer()
public String API_GetVideoRTPAddrForPlayback()
public boolean API_SendVideoRTP(int line, byte[] buffer, int length)
line - channel numberbuffer - video RTP datalength - buffer size
public boolean API_VideoPreview()
public boolean API_VideoPreview(int line)
public boolean API_VideoPreview(int line, int type)
line - optional channel number. default is -1. 3 means to be launched separatelytype - optinal video_preview type
public boolean API_AddVideo()
public boolean API_AddVideo(int line, int type, int direction)
line - channel numbertype - call-type: 1: add video 2: add screen-sharingdirection - set hold state: -1: inactive, 0: sendonly, 1: recvonly, 2: both
public boolean API_AddVideo_Now(int line, int type, int direction)
public boolean API_StopVideo()
public boolean API_StopVideo(int line, int direction)
line - channel numberdirection - 0: stop send, 1: stop receive, 2: stop both way
public boolean API_StopVideo_Now(int line, int direction)
public boolean API_SwitchVideo(int line, int type)
public boolean API_SwitchVideo_Now(int line)
public boolean API_Hangup()
public boolean API_Hangup(int line)
line - channel number
public boolean API_Hangup(int line, String reason)
line - channel numberreason - disconnect reason text
public String API_GetLastCallDetails()
public String API_GetProfileStatusText(String username)
public String API_GetMySIPURI(boolean all)
all - if set to true, then it will return all possible URI’s separated by comma. Otherwise it will return single main URI
public boolean API_SetSSLContext(javax.net.ssl.SSLContext sc)
sc - SSLContext object prepared by you
public String API_GetIncomingDisplay()
public String API_GetIncomingDisplay(int line)
line - channel number
public boolean HandleConfRequest()
public boolean API_Accept()
public boolean API_Accept(int line)
line - channel number
public boolean API_Accept(int line, int calltype)
line - channel numbercalltype - -1: default, 0: audio only, 1: with video, 2: force video
public boolean API_Accept(int line, int calltype, int audiodirection, int videodirection)
line - channel numbercalltype - specify call type: -1: default, 0: audio only, 1: with video, 2: force videoaudiodirection - audio hold state: -1: inactive, 0: sendonly, 1: recvonly, 2: both (defult)videodirection - video hold state: -1: inactive, 0: sendonly, 1: recvonly, 2: both (defult)
public boolean API_Accept(int line, int calltype, int strict)
line - channel numbercalltype - specify call type: -1: default, 0: audio only, 1: with video, 2: force videostrict - set to 1 to strictly treat the line parameter. otherwise might auto guess the best line if incorrect
public boolean API_Accept(int line, int calltype, int strict, int audiodirection, int videodirection)
line - channel numbercalltype - specify call type: -1: default, 0: audio only, 1: with video, 2: force videostrict - set to 1 to strictly treat the line parameter. otherwise might auto guess the best line if incorrectaudiodirection - audio hold state: -1: inactive, 0: sendonly, 1: recvonly, 2: both (defult)videodirection - video hold state: -1: inactive, 0: sendonly, 1: recvonly, 2: both (defult)
public boolean API_AcceptStrict(int line)
line - channel number
public boolean API_Ignore(int line)
line - channel number
public boolean API_Forward(String peer)
peer - forward to target
public boolean API_Forward(int line, String peer)
line - channel numberpeer - forward to target
public boolean API_Reject()
public boolean API_Reject(int line)
line - channel number
public boolean API_Reject(int line, String reason)
line - channel numberreason - disconnect reason text
public boolean API_HandleCall(int line)
line - channel number
public boolean API_SoftphoneVideoCall(String peer)
public boolean API_SoftphoneScreenshare(String peer)
public boolean API_RejectEx(int line, String reasontext)
line - channel number
public boolean API_ScreenShare(String peer)
public boolean API_ScreenShareAccept(String peer)
public boolean API_ScreenShareReject(String peer)
public boolean API_IsIncomingVideo()
public int API_GetIncomingVideoEndpoint(int line)
line - preferred channel number
public int API_GetVideoEndpoint(int line)
line - preferred channel number
public String API_GetVideoSDPFilePath(int line, boolean force)
line - preferred channel numberforce - if true, then it will check only for endpoints with video. if false, then will return the path even if the endpoint is audio only
public String API_GetVideoSDPFilePath(int line)
public String API_GetVideoSDPFilePath()
public String API_GetLastRecInvite()
public String API_GetLastSentInvite()
public boolean API_AddLog(String text)
text - log text
public boolean API_AddLog(int level, String text)
level - log leveltext - log text
public boolean API_Log(String str)
str - the log message
public String API_GetLastRecSIPMessage(String line)
line - channel number
public String API_GetDiscReasonText(String line)
line - can be line number or SIP call-id
public int API_GetDiscReasonCode(String line)
line - can be line number or SIP call-id
public boolean API_TransferDialog()
public boolean API_PushContactlist(String userlist)
userlist - users separated by comma (or a single user)
public boolean API_SetBlacklist(String str)
str - users/numbers separated by comma
public String API_GetBlacklist()
public boolean API_AddToBlacklist(String str)
str - username, phone number or SIP URI to block
public boolean API_SetWhitelist(String str)
str - users/numbers separated by comma
public String API_GetWhitelist()
public boolean API_AddToWhitelist(String str)
str - username, phone number or SIP URI to block
public boolean API_NumExists()
public boolean API_NumExistsEx(String contactlist)
public String API_GetPresenceStatus()
public boolean API_SetPresenceStatus(String status)
status - one of the followings strings: Online, Away, DND, Invisible , Offline (case sensitive) .
public boolean API_NewUser(String user)
user - username of the user to accept
public boolean API_Unsubscribe()
public boolean API_CheckPresence(String userlist)
userlist - users separated by comma (or a single user)
public boolean API_CheckBLF(String userlist)
userlist - users/extensions/phone numbers separated by comma (it can be a single entry)
public boolean API_DisableBLF(String userlist)
userlist - users/extensions/phone numbers separated by comma (it can be a single entry)
public boolean API_SetContact(String name, String params)
public boolean API_SetContactPhone(String name, String param)
public boolean API_SetContactSIP(String name, String param)
public boolean API_SetContactName(String name, String param)
public boolean API_SetContactSpeedDial(String name, String param)
public boolean API_SetContactStatus(String name, String param)
public String API_GetContactPhone(String name)
public String API_GetContactSIP(String name)
public String API_GetContactName(String name)
public String API_GetContactSpeedDial(String name)
public boolean API_AddContact(String params)
public boolean API_DelContact(String name)
public String API_GetContact(String name)
public String API_GetContactPresence(String name)
public String API_GetContactPresenceStr(String name)
public boolean API_SetContacts(String contacts)
public String API_GetContacts()
public boolean API_Conf(String number)
number - destination number, username or SIP URI
public boolean API_Conf(int line, String number, boolean add, int confline)
line - channel number (to be created/added or removed)number - destination number, username or SIP URIadd - set to true to add this number or false to removeconfline - existing line in conference in which this new conference party will be added
public boolean API_ConfEx(int line, String number, boolean add, int confline)
public boolean API_ConfEx(int line, String number, boolean add)
public boolean API_ConfEx(int line, String number)
public boolean API_ConfEx(int line)
public boolean API_Conf(int line, String number, boolean add)
public boolean API_Conf(int line, String number)
public boolean API_Conf(int line)
public boolean API_Transfer(int line, String number, int calltype)
line - channel numbernumber - destination number (transfer-to)calltype - -1: auto guess, 0: audio only, 1: audio + video, 2: screen sharing
public boolean API_Transfer(int line, String number, String callparameters)
public boolean API_Transfer(int line, String number, int calltype, String callparameters)
public boolean API_Transfer(int line, String number)
public boolean API_Transfer(int line)
public boolean API_Transfer(String number)
public boolean API_Transfer()
public boolean API_Mute(int line, boolean mute)
line - channel number (-2 for all or -1 for current line)mute - Set the mute parameter to true for mute or false to un-mute.
public boolean API_MuteArg(int line, boolean mute, int what)
public boolean API_Mute(int line, boolean mute, int what)
line - channel number (-2 for all or -1 for current line)mute - Set the mute parameter to true for mute or false to un-mute.what - The direction can have the following values: 0: mute in and out, 1: mute out (speakers), 2: mute in (microphone), 3: mute in and out (same as 0), 4: mute default (set by the “defmute” parameter, which is “mute microphone only” by default)
public boolean API_MuteEx(int line, boolean mute, int what)
public boolean API_ServerIsMizu()
public boolean API_PeerIsMizu(int line)
public int API_IsMuted(int line)
line - channel number
public int API_IsMutedIntern(int line)
public int API_IsMutedIntern(int line, boolean intern)
public int API_IsOnHold(int line)
line - channel number
public int API_IsOnHoldIntern(int line)
public int API_IsOnHoldIntern(int line, boolean intern)
public boolean API_Hold(int line, boolean hold)
line - channel number.hold - true for hold and false to reload. If true, then it will hold the call as specified by the holdtypeonhold parameter.
public boolean API_HoldEx(int line, int direction, int media)
line - channel number (-3 means for next INVITE/OK)direction - hold direction: -2: no hold change, -1: default (holdtypeonhold), 0: unhold, 1: mute instead of hold (not recommended. use API_Mute instead), 2: send only (mute playback. JVoIP will send a=sendonly), 3: receive only (mute recording. JVoIP will send a=recvonly),4: both in hold (inactive)media - 0: audio, 1: video, 2: both (default)
public boolean API_Hold(int line, int direction)
line - channel number (-3 means for next INVITE/OK)direction - hold direction: -2: no hold change, -1: default (holdtypeonhold), 0: unhold, 1: mute instead of hold (not recommended. use API_Mute instead), 2: send only (mute playback. JVoIP will send a=sendonly), 3: receive only (mute recording. JVoIP will send a=recvonly),4: both in hold (inactive)
public boolean API_Hold(int line)
line - channel number (-3 means for next INVITE/OK)
public boolean API_Hold()
public boolean API_Hold(int line, int direction, int media)
line - channel number. If -3 then it will be applied for the next action.direction - -1: default (holdtypeonhold), 0=unhold,2=hold (mute microphone. this: sendonly, peer: recvonly),3=other party hold (mute speaker. this: recvonly, peer: sendonly),4=both in holdmedia - 0=audio, 1=video, 2=both
public boolean API_HoldChange(int line)
line - channel number
public boolean API_Dtmf(int line, String dtmf)
line - channel numberdtmf - one or more dtmf digits. Use the space char to insert delays between the digits.
public boolean API_Dtmf(String dtmf)
public boolean API_Info(int line, String msg)
line - channel numbermsg - message to send
public boolean API_SendChat(int line, String number, String message)
line - channel numbernumber - phone number or SIP username/extension numbermessage - text (chat body content)
public boolean API_SendChat(String number, String message)
public boolean API_SendChat(int line, String message)
public boolean API_SendChat(String message)
public boolean API_SendSMS(int line, String number, String message, int msgid)
line - channel numbernumber - target mobile phone numbermessage - text (SMS text)msgid - optional id to be reported by the CHATREPORT (can be used the match the message)
public boolean API_SendSMS(int line, String number, String group, String message, int msgid)
public boolean API_SendSMS(int line, String number, String message)
public boolean API_SendSMS(String number, String message)
public boolean API_SendChat(int line, String number, String group, String message, int msgid)
line - channel numbernumber - phone number or SIP username/extension numbergroup - groupname (members separated by | )message - text (chat body content)msgid - optional id to be reported by the CHATREPORT (can be used the match the message)
public boolean API_SendChat(int line, String number, String group, String message)
public boolean API_SendUSSD(int line, String method, String ussd)
line - channel numbermethod - INVITE, INFO, BYE (if INVITE, then a new session will be created. otherwise will use the session suggested by the line parameter)ussd - the USSD string or the whole XML
public boolean API_SendChatIsComposing(int line, String number)
line - channel numbernumber - phone number or SIP username/extension number
public boolean API_CheckVoicemail(int line)
line - channel number. should be set to -1.
public boolean API_CheckVoicemail()
public boolean API_Record(int record)
record - 0=no,1=local,2=remote ftp,3=both
public boolean API_Chat(String peer)
public boolean API_VoiceRecord(int startstop, int now, String filename)
startstop - 0 to stop, 1 to start locally, 2 to start remote ftp, 3 start to record both locally and to remote ftp, 4 start to record as it is set by the “voicerecording” parameternow - used if the startstop is set to 0. 0 means that the recorded file will be saved and/or uploaded at the end of the conversation only. 2 means that the file will be saved immediatelyfilename - file name used for storing the recorded voice (if empty string, than will use a default file name)
public boolean API_VoiceRecord(int startstop, int now, String filename, int line)
startstop - 0 to stop, 1 to start locally, 2 to start remote, 3 start to record both locally and to remote, 4 start to record as it is set by the “voicerecording” parameternow - used if the startstop is set to 0. 0 means that the recorded file will be saved and/or uploaded at the end of the conversation only. 2 means that the file will be saved immediatelyfilename - file name used for storing the recorded voice (if empty string, than will use a default file name)line - set to -2 for all or other to specify current line
public boolean API_VoiceRecord(int startstop, int now)
public boolean API_VoiceRecord(int startstop)
public boolean API_VoiceRecord()
public boolean API_VoiceRecord(String filename)
public boolean API_AudioDevice()
public String API_GetMAC()
public void API_TestPrint()
public String API_TestEncoded()
public String API_GetAudioDeviceList(int dev)
dev - Set to 0 to list the recording device names or set to 1 for to get the playback or ringer devices.
public boolean API_SetAudioDevice(int dev, String devicename)
dev - 0: recording device (microphone), 1: playback device (speaker, headset), 2: ringer device (speaker, headset)devicename - name of the audio device. Should be a valid audio device name (you can list them with the GetAudioDeviceList call)
public String API_GetAudioDevice(int dev)
dev - 0 for recording, 1 for playback, 2 for ringer
public boolean API_SetAudioDevice(int dev, String devicename, int immediate)
dev - 0: recording device (microphone), 1: playback device (speaker, headset), 2: ringer device (speaker, headset)devicename - name of the audio device. Should be a valid audio device name (you can list them with the GetAudioDeviceList call)immediate - 0: default (after the “changeaudiodevimmediate” parameter), 1: next call only, 2: immediately for active calls
public boolean API_SetVolume(int dev, int volume, int line)
dev - specify the device: 0 for the recording (microphone) audio device, 1 for the playback (speaker) audio device, 2 for the ringback (speaker) audio devicevolume - volume level from 0 to 100 (percent value: 0-100%)line - optional channel number
public boolean API_SetVolume(int dev, int volume)
public boolean SetVolumeForEp(int dev, float volume2, int line)
public int API_GetVolume(int dev, int line)
dev - specify the device to query: 0 for the recording (microphone) audio device, 1 for the playback (speaker) audio device, 2 for the ringback (speaker) audio device
public int API_GetVolume(int dev)
public boolean API_SetVolumeIn(int val)
val - volume level 0-100%
public boolean API_SetVolumeOut(int val)
val - volume level 0-100%
public boolean API_HasCallInProgress()
public boolean API_HasCallInSpeaking()
public boolean API_SetLogLevel(int level)
level - loglevel from 1-5 (0 is not recommended because it will mute also the important notifications. values higher then 5 will increase the system load)
public boolean API_ShowLog()
public boolean API_SetNotificationListener(SIPNotificationListener listener)
public SIPNotification API_GetNotification()
public SIPNotification API_PollNotification()
public String API_GetNotificationStrings()
public String API_GetNotificationsSync()
public String API_PollNotificationStrings()
public String API_GetNotifications()
public SIPNotification API_ParseNotification(String notificationstring)
public SIPNotification API_WaitForNotification(int notification, int line, String filter, long timeout)
notificaton - the notification even constants (SIPNotification.NOTIFICATION_*)line - filter for line (set to -9 if not needed)filter - filter for string (if the notification string contains this filter)timeout - max wait time
public SIPNotification API_WaitForNotification(int notification, long timeout)
notificaton - the notification even constants (SIPNotification.NOTIFICATION_*)timeout - max wait time
public SIPNotification API_WaitForNotification(int notification)
notificaton - the notification even constants (SIPNotification.NOTIFICATION_*)
public SIPNotification API_WaitForNotification(int notification, String filter)
notificaton - the notification even constants (SIPNotification.NOTIFICATION_*)filter - filter for string (if the notification string contains this filter)
public SIPNotification API_WaitForNotification(int notification, String filter, long timeout)
notificaton - the notification even constants (SIPNotification.NOTIFICATION_*)filter - filter for string (if the notification string contains this filter)timeout - max wait time
public String API_Poll()
public String API_Poll(boolean all)
public String API_PollSync()
public String API_PollSync(boolean all)
public boolean API_SetMediaListener(SIPMediaListener listener)
public byte[] API_GetMedia(int timeout)
timeout - specified in milliseconds. If it is higher then 0, then JVoIP will use an additional waiting lock. If 0 then will issue a simple/fast blocking read.
public byte[] API_GetMedia()
public boolean API_GetMediaEnd()
public boolean API_IsTerminated()
public boolean API_SetPushNotifications(int pushnotifications, String clientid, String packagename, String gateway, int fromcode)
pushnotifications - -1=auto guess, 0=disabled, 1=enabled auto, 2=enabled direct,3=enabled via gatewayclientid - token received from FCMpackagename - your app package name to be used for push notification. If empty then it will readed from your app context. If using mizu push gateway then leave it empty or set to "com.mizuvoip.mizudroid.app"gateway - address of the gateway if you wish to use a gateway for push notifications
public boolean API_SetPushNotifications(int pushnotifications, String clientid, String packagename, String gateway)
public String API_GetEndpointDetailsStr()
public String API_GetEndpointDetailsStr(int line)
public SIPNotification.Status API_GetEndpointDetails(int line)
public String GetLineDetails(int line)
public String API_GetLineDetails(int line)
line - channel number
public String API_GetPeer()
public String API_GetCallerID()
public String API_GetPeer(int line)
line - channel number
public String API_GetCallerID(int line)
public String API_GetPeerDisplayname()
public String API_GetPeerDisplayname(int line)
line - channel number
public String API_GetCallerID(int line, int type)
line - channel number
public int API_HiddenLine()
public int API_GetLineStatus(int line)
line - channel number
public String API_GetLineStatusText(int line)
line - channel number
public String API_GetStateStr(int line)
line - channel number
public String API_GetStatus(int line)
public String API_GetStateStr(int line, int strict)
line - channel numberstrict - If set to 1, then it will return “Unknown” if no such line is activated. If set to 0, then it will return the default active line if the line doesn’t exists.
public String API_GetStatus(int line, int strict)
public int API_GetState(int line, int strict)
line - channel numberstrict - If set to 1, then it will return “Unknown” if no such line is activated. If set to 0, then it will return the default active line if the line doesn’t exists.
public int API_GetState(int line)
public int API_GetStatusId(int line)
line - channel number
public void button2_actionPerformed(java.awt.event.ActionEvent e)
public void Hangup(String reason)
public boolean API_SetSpeakerMode(boolean loud)
loud - set to true if you wish to set to loudspeaker. otherwise false for normal earspeaker.public boolean API_MightStop()
public boolean API_WaitFor()
public boolean API_WaitFor(int maxmsec)
public void API_Stop()
public boolean API_CredentialsChanged(String newserver, String newusername)
public boolean API_NoUnregister()
public String API_GetDeviceID()
public String API_GetUDeviceID()
public void API_Stop(boolean fast)
public void API_Stop(int fast)
fast - set to false if you can't wait a bit for graceful shutdown, or set to true for immediate shutdown.public void API_Stop(int fast, boolean fromdelayedthread)
public void SetModuleStatus(int newstatus, int fromcode)
public void DestroyCachedAudio()
public void DoStop(int fast)
public void Terminate()
public int API_ConvertSampleRate(byte[] buffer_in, int offset_in, int length, byte[] buffer_out, int offset_out, int originalSampleRate, int targetSampleRate)
public boolean API_StopRing(int line)
line - channel number
public boolean API_StartRing(int line)
line - channel number
public boolean API_PlaySound(int line, String file)
line - used with toremotepeer if there are multiple calls in progress to specify the call (usually set to -1 for the current call if any)file - file path
public boolean API_PlaySound(String file)
public boolean API_PlaySound(int start, String file, int loop, boolean async, boolean localfile, boolean toremotepeer, int line, String audiodevice, boolean isring)
start - 1 for start or 0 to stop the playback, -1 to pre-cachefile - file nameloop - 1 to repeat, 0 to play once (only for local playback)async - false if no, true if playback should be done in a separate thread (false can be used only for local playback, not for streaming)localfile - true if the file have to be read from the device file system. False if remote file (for example if the file is on the webserver)toremotepeer - stream the playback to the connected peerline - used with toremotepeer if there are multiple calls in progress to specify the call (usually set to -1 for the current call if any)
public boolean API_PlayBuff(byte[] buff, int len, int samplerate)
buff - PCM audio data (16 bit mono)len - length of the data to be played from buff (usually buff.size())
public boolean API_PlayBuff(byte[] buff, int len)
buff - PCM audio data (16 bit mono. def: 8000Hz)len - length of the data to be played from buff (usually buff.size())
public boolean API_PlayBuff(byte[] buff)
buff - PCM audio data (16 bit mono. def: 8000Hz)
public boolean API_PlayBuff()
public boolean API_PlayBuff(boolean start, byte[] buff, int len, boolean isring, String audiodevice, int samplerate, int reset)
start - true to start or false to stop the playbackbuff - PCM audio data (16 bit mono)len - length of the data to be played from buff (usually buff.size())isring - set to true if this is a ring toneaudiodevice - output audio device. empty means defaultreset - -1: auto (1 if small, 0 if big and no otherr changes), 0: no (append), 1: reset, but skip if we already have a non-reset (for tones), 2: yes, reset, 3: reset and new player. (Note: it might not flush the internal audio buffer if any)
public boolean API_PlayBuffOld(boolean start, byte[] buff, int len, boolean isring, String audiodevice)
public boolean API_PlayTone(int tone)
public void TerminateAllAudioPlayers()
public void TerminateAllAudioPlayers(boolean onlyifring)
public void TerminateAllAudioPlayers(boolean onlyifring, AudioPlayer except)
public boolean API_PlaySound(int start, String file, int loop, boolean async)
public boolean API_PlaySound(int start, String file, int loop, boolean async, boolean localfile)
public boolean API_PlaySound(int start, String file, int loop, boolean async, boolean localfile, boolean toremotepeer, int line)
public void PlayRingTone(int play, int calledfrom)
public void PlayRingTone(int play)
public void PlayRingTone(boolean play, int calledfrom)
public void PlayRingTone(boolean play, int calledfrom, boolean outgoingcall)
public void PlayRingToneInner(boolean play, int calledfrom, boolean outgoingcall)
public boolean PlayRingToneInner2(boolean play, int calledfrom, boolean outgoingcall, String ringwav, String ringtonefile)
public boolean API_StreamSoundStream(int start, int line, java.io.InputStream inputstream)
start - 1 for start or 0 to stop the playback, -1 to pre-cacheline - channel numberinputstream - audio data stream
public void SaveDebugStream()
public boolean API_StreamSoundBuff(int start, int line, byte[] buff, int len)
start - 1 for start or continue the playback, 0 to stop the playbackline - channel numberbuff - audio data bufferlen - audio data size in bytes
public boolean API_StreamSoundBuff(int line, byte[] buff, int len)
public boolean API_StreamSoundBuff(byte[] buff, int len)
public boolean API_StreamSoundBuff(byte[] buff)
public boolean API_StreamSoundBuff(int start, int line, byte[] buff, int len, int samplerate)
public boolean API_StreamSoundBuff(int start, int line, byte[] buff, int len, int samplerate, boolean from_ai)
public boolean API_PlaySoundInternal(int start, String file, int loop, boolean async, boolean localfile, boolean toremotepeer, int line, String audiodevice, boolean isring)