![]() |
PortSIP VoIP SDK Manual for Android
16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
|
Functions | |
long | com.portsip.PortSipSdk.call (String callee, boolean sendSdp, boolean videoCall) |
int | com.portsip.PortSipSdk.rejectCall (long sessionId, int code) |
int | com.portsip.PortSipSdk.hangUp (long sessionId) |
int | com.portsip.PortSipSdk.answerCall (long sessionId, boolean videoCall) |
int | com.portsip.PortSipSdk.updateCall (long sessionId, boolean enableAudio, boolean enableVideo) |
int | com.portsip.PortSipSdk.hold (long sessionId) |
int | com.portsip.PortSipSdk.unHold (long sessionId) |
int | com.portsip.PortSipSdk.muteSession (long sessionId, boolean muteIncomingAudio, boolean muteOutgoingAudio, boolean muteIncomingVideo, boolean muteOutgoingVideo) |
int | com.portsip.PortSipSdk.forwardCall (long sessionId, String forwardTo) |
long | com.portsip.PortSipSdk.pickupBLFCall (String replaceDialogId, boolean videoCall) |
int | com.portsip.PortSipSdk.sendDtmf (long sessionId, int enum_dtmfMethod, int code, int dtmfDuration, boolean playDtmfTone) |
long com.portsip.PortSipSdk.call | ( | String | callee, |
boolean | sendSdp, | ||
boolean | videoCall | ||
) |
Make a call
callee | The callee. It can be a name only or full SIP URI, for example: user001 or sip:user0 or sip: 01@s ip.ip tel. orguser0:5068 02@s ip.yo urdo main. com |
sendSdp | If it is set to false, the outgoing call will not include the SDP in INVITE message. |
videoCall | If it is set to true and at least one video codec was added, the outgoing call will include the video codec into SDP. Otherwise no video codec will be added into outgoing SDP. |
int com.portsip.PortSipSdk.rejectCall | ( | long | sessionId, |
int | code | ||
) |
rejectCall Reject the incoming call.
sessionId | The session ID of the call. |
code | Reject code, for example, 486, 480 etc. |
int com.portsip.PortSipSdk.hangUp | ( | long | sessionId | ) |
hangUp Hang up the call.
sessionId | Session ID of the call. |
int com.portsip.PortSipSdk.answerCall | ( | long | sessionId, |
boolean | videoCall | ||
) |
answerCall Answer the incoming call.
sessionId | The session ID of call. |
videoCall | If the incoming call is a video call and the video codec is matched, set to true to answer the video call. If set to false, the answer call does not include video codec answer anyway. |
int com.portsip.PortSipSdk.updateCall | ( | long | sessionId, |
boolean | enableAudio, | ||
boolean | enableVideo | ||
) |
updateCall Use the re-INVITE to update the established call.
sessionId | The session ID of call. |
enableAudio | Set to true to allow the audio in updated call, or false to disable audio in updated call. |
enableVideo | Set to true to allow the video in update call, or false to disable video in updated call. |
Example 2: Remove video stream from the current conversation.
int com.portsip.PortSipSdk.hold | ( | long | sessionId | ) |
To place a call on hold.
sessionId | The session ID of call. |
int com.portsip.PortSipSdk.unHold | ( | long | sessionId | ) |
Take off hold.
sessionId | The session ID of call. |
int com.portsip.PortSipSdk.muteSession | ( | long | sessionId, |
boolean | muteIncomingAudio, | ||
boolean | muteOutgoingAudio, | ||
boolean | muteIncomingVideo, | ||
boolean | muteOutgoingVideo | ||
) |
Mute the specified audio or video session.
sessionId | The session ID of the call. |
muteIncomingAudio | Set it to true to mute incoming audio stream. Once set, remote side audio cannot be heard. |
muteOutgoingAudio | Set it to true to mute outgoing audio stream. Once set, the remote side cannot hear the audio. |
muteIncomingVideo | Set it to true to mute incoming video stream. Once set, remote side video cannot be seen. |
muteOutgoingVideo | Set it to true to mute outgoing video stream, the remote side cannot see the video. |
int com.portsip.PortSipSdk.forwardCall | ( | long | sessionId, |
String | forwardTo | ||
) |
Forward call to another one when receiving the incoming call.
sessionId | The session ID of the call. |
forwardTo | Target of the forward. It can be either "sip:number@sipserver.com" or "number". |
long com.portsip.PortSipSdk.pickupBLFCall | ( | String | replaceDialogId, |
boolean | videoCall | ||
) |
This function will be used for picking up a call based on the BLF (Busy Lamp Field) status.
replaceDialogId | The ID of the call which will be pickup. It comes with onDialogStateUpdated callback. |
videoCall | Indicates pickup video call or audio call |
int com.portsip.PortSipSdk.sendDtmf | ( | long | sessionId, |
int | enum_dtmfMethod, | ||
int | code, | ||
int | dtmfDuration, | ||
boolean | playDtmfTone | ||
) |
Send DTMF tone.
sessionId | The session ID of the call. |
enum_dtmfMethod | DTMF tone could be sent via two methods: DTMF_RFC2833 or DTMF_INFO. The DTMF_RFC2833 is recommend. |
code | The DTMF tone. Values include: |
code | Description |
---|---|
0 | The DTMF tone 0. |
1 | The DTMF tone 1. |
2 | The DTMF tone 2. |
3 | The DTMF tone 3. |
4 | The DTMF tone 4. |
5 | The DTMF tone 5. |
6 | The DTMF tone 6. |
7 | The DTMF tone 7. |
8 | The DTMF tone 8. |
9 | The DTMF tone 9. |
10 | The DTMF tone *. |
11 | The DTMF tone #. |
12 | The DTMF tone A. |
13 | The DTMF tone B. |
14 | The DTMF tone C. |
15 | The DTMF tone D. |
16 | The DTMF tone FLASH. |
dtmfDuration | The DTMF tone samples. Recommended value 160. |
playDtmfTone | Set to true the SDK play local DTMF tone sound during send DTMF. |