![]() |
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 | |
void | com.portsip.OnPortSIPEvent.onPresenceRecvSubscribe (long subscribeId, String fromDisplayName, String from, String subject) |
void | com.portsip.OnPortSIPEvent.onPresenceOnline (String fromDisplayName, String from, String stateText) |
void | com.portsip.OnPortSIPEvent.onPresenceOffline (String fromDisplayName, String from) |
void | com.portsip.OnPortSIPEvent.onRecvMessage (long sessionId, String mimeType, String subMimeType, byte[] messageData, int messageDataLength) |
void | com.portsip.OnPortSIPEvent.onRecvOutOfDialogMessage (String fromDisplayName, String from, String toDisplayName, String to, String mimeType, String subMimeType, byte[] messageData, int messageDataLength, String sipMessage) |
void | com.portsip.OnPortSIPEvent.onSendMessageSuccess (long sessionId, long messageId) |
void | com.portsip.OnPortSIPEvent.onSendMessageFailure (long sessionId, long messageId, String reason, int code) |
void | com.portsip.OnPortSIPEvent.onSendOutOfDialogMessageSuccess (long messageId, String fromDisplayName, String from, String toDisplayName, String to) |
void | com.portsip.OnPortSIPEvent.onSendOutOfDialogMessageFailure (long messageId, String fromDisplayName, String from, String toDisplayName, String to, String reason, int code) |
void | com.portsip.OnPortSIPEvent.onSubscriptionFailure (long subscribeId, int statusCode) |
void | com.portsip.OnPortSIPEvent.onSubscriptionTerminated (long subscribeId) |
void com.portsip.OnPortSIPEvent.onPresenceRecvSubscribe | ( | long | subscribeId, |
String | fromDisplayName, | ||
String | from, | ||
String | subject | ||
) |
This event will be triggered when receiving the SUBSCRIBE request from a contact.
subscribeId | The ID of SUBSCRIBE request. |
fromDisplayName | The display name of contact. |
from | The contact who sends the SUBSCRIBE request. |
subject | The subject of the SUBSCRIBE request. |
void com.portsip.OnPortSIPEvent.onPresenceOnline | ( | String | fromDisplayName, |
String | from, | ||
String | stateText | ||
) |
When the contact is online or changes presence status, this event will be triggered.
fromDisplayName | The display name of contact. |
from | The contact who sends the SUBSCRIBE request. |
stateText | The presence status text. |
void com.portsip.OnPortSIPEvent.onPresenceOffline | ( | String | fromDisplayName, |
String | from | ||
) |
When the contact is offline, this event will be triggered.
fromDisplayName | The display name of contact. |
from | The contact who sends the SUBSCRIBE request |
void com.portsip.OnPortSIPEvent.onRecvMessage | ( | long | sessionId, |
String | mimeType, | ||
String | subMimeType, | ||
byte [] | messageData, | ||
int | messageDataLength | ||
) |
This event will be triggered when receiving a MESSAGE message in dialog.
sessionId | The session ID of the call. |
mimeType | The message mime type. |
subMimeType | The message sub mime type. |
messageData | The received message body. It can be text or binary data. Use the mimeType and subMimeType to differentiate them. For example, if the mimeType is "text" and subMimeType is "plain", "messageData" is text message body. If the mimeType is "application" and subMimeType is "vnd.3gpp.sms", "messageData" is binary message body. |
messageDataLength | The length of "messageData". |
void com.portsip.OnPortSIPEvent.onRecvOutOfDialogMessage | ( | String | fromDisplayName, |
String | from, | ||
String | toDisplayName, | ||
String | to, | ||
String | mimeType, | ||
String | subMimeType, | ||
byte [] | messageData, | ||
int | messageDataLength, | ||
String | sipMessage | ||
) |
This event will be triggered when receiving a MESSAGE message out of dialog. For example pager message.
fromDisplayName | The display name of sender. |
from | The message sender. |
toDisplayName | The display name of receiver. |
to | The receiver. |
mimeType | The message mime type. |
subMimeType | The message sub mime type. |
messageData | The received message body. It can be text or binary data. Use the mimeType and subMimeType to differentiate them. For example, if the mimeType is "text" and subMimeType is "plain", "messageData" is text message body. If the mimeType is "application" and subMimeType is "vnd.3gpp.sms", "messageData" is binary message body. |
messageDataLength | The length of "messageData". |
sipMessage | The SIP message received. |
void com.portsip.OnPortSIPEvent.onSendMessageSuccess | ( | long | sessionId, |
long | messageId | ||
) |
If the message is sent successfully in dialog, this event will be triggered.
sessionId | The session ID of the call. |
messageId | The message ID. It's equal to the return value of sendMessage function. |
void com.portsip.OnPortSIPEvent.onSendMessageFailure | ( | long | sessionId, |
long | messageId, | ||
String | reason, | ||
int | code | ||
) |
If the message is failed to be sent out of dialog, this event will be triggered.
sessionId | The session ID of the call. |
messageId | The message ID. It's equal to the return value of sendMessage function. |
reason | The failure reason. |
code | Failure code. |
void com.portsip.OnPortSIPEvent.onSendOutOfDialogMessageSuccess | ( | long | messageId, |
String | fromDisplayName, | ||
String | from, | ||
String | toDisplayName, | ||
String | to | ||
) |
If the message is sent successfully out of dialog, this event will be triggered.
messageId | The message ID. It's equal to the return value of SendOutOfDialogMessage function. |
fromDisplayName | The display name of message sender. |
from | The message sender. |
toDisplayName | The display name of message receiver. |
to | The message receiver. |
void com.portsip.OnPortSIPEvent.onSendOutOfDialogMessageFailure | ( | long | messageId, |
String | fromDisplayName, | ||
String | from, | ||
String | toDisplayName, | ||
String | to, | ||
String | reason, | ||
int | code | ||
) |
If the message failed to be sent out of dialog, this event would be triggered.
messageId | The message ID. It's equal to the return value of SendOutOfDialogMessage function. |
fromDisplayName | The display name of message sender |
from | The message sender. |
toDisplayName | The display name of message receiver. |
to | The message receiver. |
reason | The failure reason. |
code | The failure code. |
void com.portsip.OnPortSIPEvent.onSubscriptionFailure | ( | long | subscribeId, |
int | statusCode | ||
) |
This event will be triggered on sending SUBSCRIBE failure.
subscribeId | The ID of SUBSCRIBE request. |
statusCode | The status code. |
void com.portsip.OnPortSIPEvent.onSubscriptionTerminated | ( | long | subscribeId | ) |
This event will be triggered when a SUBSCRIPTION is terminated or expired.
subscribeId | The ID of SUBSCRIBE request. |