![]() |
PortSIP VoIP SDK Manual for Windows
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 | |
Int32 | PortSIP.PortSIPLib.sendOptions (String to, String sdp) |
Send OPTIONS message. More... | |
Int32 | PortSIP.PortSIPLib.sendInfo (Int32 sessionId, String mimeType, String subMimeType, String infoContents) |
Send a INFO message to remote side in a call. More... | |
Int32 | PortSIP.PortSIPLib.sendSubscription (String to, String eventName) |
Send a SUBSCRIBE message to subscribe an event. More... | |
Int32 | PortSIP.PortSIPLib.terminateSubscription (Int32 subscribeId) |
Terminate the given subscription. More... | |
Int32 | PortSIP.PortSIPLib.sendMessage (Int32 sessionId, String mimeType, String subMimeType, byte[] message, Int32 messageLength) |
Send a MESSAGE message to remote side in dialog. More... | |
Int32 | PortSIP.PortSIPLib.sendOutOfDialogMessage (String to, String mimeType, String subMimeType, Boolean isSMS, byte[] message, Int32 messageLength) |
Send an out of dialog MESSAGE message to remote side. More... | |
Int32 | PortSIP.PortSIPLib.setDefaultSubscriptionTime (Int32 secs) |
Set the default expiration time to be used when creating a subscription. More... | |
Int32 | PortSIP.PortSIPLib.setDefaultPublicationTime (Int32 secs) |
Set the default expiration time to be used when creating a publication. More... | |
Int32 | PortSIP.PortSIPLib.setPresenceMode (Int32 mode) |
Indicate the SDK uses the P2P mode for presence or presence agent mode. More... | |
Int32 PortSIP.PortSIPLib.sendOptions | ( | String | to, |
String | sdp | ||
) |
Send OPTIONS message.
to | The recipient of OPTIONS message. |
sdp | The SDP of OPTIONS message. It's optional if user does not wish to send the SDP with OPTIONS message. |
Int32 PortSIP.PortSIPLib.sendInfo | ( | Int32 | sessionId, |
String | mimeType, | ||
String | subMimeType, | ||
String | infoContents | ||
) |
Send a INFO message to remote side in a call.
sessionId | The session ID of call. |
mimeType | The mime type of INFO message. |
subMimeType | The sub mime type of INFO message. |
infoContents | The contents that is sent with INFO message. |
Int32 PortSIP.PortSIPLib.sendSubscription | ( | String | to, |
String | eventName | ||
) |
Send a SUBSCRIBE message to subscribe an event.
to | The user/extension to be subscribed. |
eventName | The event name to be subscribed. |
Example 2, to monitor a user/extension call status, You can use code: sendSubscription(mSipLib, "100", "dialog"); Extension 100 refers to the user/extension to be monitored. Once being monitored, when extension 100 hold a call or is ringing, the onDialogStateUpdated callback will be triggered.
Int32 PortSIP.PortSIPLib.terminateSubscription | ( | Int32 | subscribeId | ) |
Terminate the given subscription.
subscribeId | The ID of the subscription. |
Int32 PortSIP.PortSIPLib.sendMessage | ( | Int32 | sessionId, |
String | mimeType, | ||
String | subMimeType, | ||
byte [] | message, | ||
Int32 | messageLength | ||
) |
Send a MESSAGE message to remote side in dialog.
sessionId | The session ID of the call. |
mimeType | The mime type of MESSAGE message. |
subMimeType | The sub mime type of MESSAGE message. |
message | The contents which is sent with MESSAGE message. Binary data allowed. |
messageLength | The message size. |
Int32 PortSIP.PortSIPLib.sendOutOfDialogMessage | ( | String | to, |
String | mimeType, | ||
String | subMimeType, | ||
Boolean | isSMS, | ||
byte [] | message, | ||
Int32 | messageLength | ||
) |
Send an out of dialog MESSAGE message to remote side.
to | The message recipient, such as sip:recei ver@ ports ip.c om |
mimeType | The mime type of MESSAGE message. |
subMimeType | The sub mime type of MESSAGE message. isSMS Set to YES to specify "messagetype=SMS" in the To line, or NO to disable. |
message | The contents which is sent with MESSAGE message. Binary data allowed. |
messageLength | The message size. |
Int32 PortSIP.PortSIPLib.setDefaultSubscriptionTime | ( | Int32 | secs | ) |
Set the default expiration time to be used when creating a subscription.
secs | The default expiration time of subscription. |
Int32 PortSIP.PortSIPLib.setDefaultPublicationTime | ( | Int32 | secs | ) |
Set the default expiration time to be used when creating a publication.
secs | The default expiration time of publication. |
Int32 PortSIP.PortSIPLib.setPresenceMode | ( | Int32 | mode | ) |
Indicate the SDK uses the P2P mode for presence or presence agent mode.
mode | 0 - P2P mode; 1 - Presence Agent mode, default is P2P mode. |