![]() |
PortSIP VoIP SDK Manual for iOS
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) | - PortSIPSDK::call:sendSdp:videoCall: |
Make a call. More... | |
(int) | - PortSIPSDK::rejectCall:code: |
rejectCall Reject the incoming call. More... | |
(int) | - PortSIPSDK::hangUp: |
hangUp Hang up the call. More... | |
(int) | - PortSIPSDK::answerCall:videoCall: |
answerCall Answer the incoming call. More... | |
(int) | - PortSIPSDK::updateCall:enableAudio:enableVideo: |
Use the re-INVITE to update the established call. More... | |
(int) | - PortSIPSDK::hold: |
Place a call on hold. More... | |
(int) | - PortSIPSDK::unHold: |
Take off hold. More... | |
(int) | - PortSIPSDK::muteSession:muteIncomingAudio:muteOutgoingAudio:muteIncomingVideo:muteOutgoingVideo: |
Mute the specified session audio or video. More... | |
(int) | - PortSIPSDK::forwardCall:forwardTo: |
Forward the call to another user once received an incoming call. More... | |
(long) | - PortSIPSDK::pickupBLFCall:videoCall: |
This function will be used for picking up a call based on the BLF (Busy Lamp Field) status. More... | |
(int) | - PortSIPSDK::sendDtmf:dtmfMethod:code:dtmfDration:playDtmfTone: |
Send DTMF tone. More... | |
- (long) call: | (NSString *) | callee | |
sendSdp: | (BOOL) | sendSdp | |
videoCall: | (BOOL) | videoCall | |
Make a call.
callee | The callee. It can be a name only or full SIP URI. For example, user001, sip:user0 or sip: 01@s ip.ip tel. orguser0:5068. 02@s ip.yo urdo main. com |
sendSdp | If set to false, the outgoing call will not include the SDP in INVITE message. |
videoCall | If set to true and at least one video codec was added, the outgoing call will include the video codec into SDP. |
- (int) rejectCall: | (long) | sessionId | |
code: | (int) | code | |
rejectCall Reject the incoming call.
sessionId | The session ID of the call. |
code | Reject code. For example, 486 and 480. |
- (int) hangUp: | (long) | sessionId |
hangUp Hang up the call.
sessionId | Session ID of the call. |
- (int) answerCall: | (long) | sessionId | |
videoCall: | (BOOL) | videoCall | |
answerCall Answer the incoming call.
sessionId | The session ID of the call. |
videoCall | If the incoming call is a video call and the video codec is matched, set it to true to answer the video call. If set to false, the answer call will not include video codec answer anyway. |
- (int) updateCall: | (long) | sessionId | |
enableAudio: | (BOOL) | enableAudio | |
enableVideo: | (BOOL) | enableVideo | |
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 updated call, or false to disable video in updated call. |
Example 1: A called B with the audio only, and B answered A, then there would be an audio conversation between A and B. Now if A wants to see B visually, A could use these functions to fulfill it.
Example 2: Remove video stream from current conversation.
- (int) hold: | (long) | sessionId |
Place a call on hold.
sessionId | The session ID of the call. |
- (int) unHold: | (long) | sessionId |
Take off hold.
sessionId | The session ID of call. |
- (int) muteSession: | (long) | sessionId | |
muteIncomingAudio: | (BOOL) | muteIncomingAudio | |
muteOutgoingAudio: | (BOOL) | muteOutgoingAudio | |
muteIncomingVideo: | (BOOL) | muteIncomingVideo | |
muteOutgoingVideo: | (BOOL) | muteOutgoingVideo | |
Mute the specified session audio or video.
sessionId | The session ID of the call. |
muteIncomingAudio | Set it true to mute incoming audio stream, and user cannot hear from remote side audio. |
muteOutgoingAudio | Set it true to mute outgoing audio stream, and the remote side cannot hear the audio. |
muteIncomingVideo | Set it true to mute incoming video stream, and user cannot see remote side video. |
muteOutgoingVideo | Set it true to mute outgoing video stream, and the remote side cannot see video. |
- (int) forwardCall: | (long) | sessionId | |
forwardTo: | (NSString *) | forwardTo | |
Forward the call to another user once received an incoming call.
sessionId | The session ID of the call. |
forwardTo | Target of the call forwarding. It can be "sip:number@sipserver.com" or "number" only. |
- (long) pickupBLFCall: | (const char *) | replaceDialogId | |
videoCall: | (BOOL) | 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 to be picked up. It comes with onDialogStateUpdated callback. |
videoCall | Indicates if it is video call or audio call to be picked up. |
- (int) sendDtmf: | (long) | sessionId | |
dtmfMethod: | (DTMF_METHOD) | dtmfMethod | |
code: | (int) | code | |
dtmfDration: | (int) | dtmfDuration | |
playDtmfTone: | (BOOL) | playDtmfTone | |
Send DTMF tone.
sessionId | The session ID of the call. |
dtmfMethod | Support sending DTMF tone with two methods: DTMF_RFC2833 and DTMF_INFO. The DTMF_RFC2833 is recommended. |
code | The DTMF tone (0-16). |
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 | By setting to true, the SDK plays local DTMF tone sound when sending DTMF. |