METHOD
DETAILS |
|
This
document specifies the Status and Error Code Numbers and also describes
the events and functions supported by VaxVoIP Extended Version 2 SDK Components: |
|
CODE
NUMBERS: |
- Error Codes
|
- Status
Codes
|
|
EVENTS: |
- OnStatusEvent |
- OnTextEvent |
- OnConnectionEvent |
- OnAddConferenceEvent |
|
METHODS: |
- Initialize() |
- UnInitialize() |
|
- Connect() |
- Disconnect() |
|
- AddInConf() |
- AcceptAddInConf() |
- CancelAddInConf() |
|
-
StartRecording() |
-
StopRecording() |
-
ResetRecording() |
-
SaveRecordingToFile() |
|
- SetSpkVolume() |
- GetSpkVolume() |
|
- SetMicVolume() |
- GetMicVolume() |
|
- AcceptIncomingCall() |
- CancelIncomingCall() |
|
- SendTxtMsg() |
- GetLastError() |
|
- DisableBusyState() |
- EnableBusyState() |
|
- DisableNotAvailableState() |
- EnableNotAvailableState() |
|
- MuteMic() |
- MuteSpk() |
|
- GetOutBoundDataRate() |
- GetInBoundDataRate() |
- GetOutBoundTotalBytes() |
- GetInBoundTotalBytes() |
|
|
ERROR CODES DETAIL:
ERROR CODES |
DESCRIPTION |
10 |
VAXOBJECT
is not initialized properly,
To
initialize, the VaxVoIP Object Initialize method should be
called. |
11 |
Connection is already established, this
error occurs if you are already in the voice session and accepts
another incoming connection |
12 |
Connection is already established, this error occurs if
you are already in the state of connecting and accepts an incoming
connection |
13 |
Cannot
access the input device (Microphone) OR input device is already in
use.
|
14 |
Cannot access the output device |
15 |
Invalid IP or Port is provided to AcceptIncomingCall
method to accept the incoming connection |
16 |
Cannot
open local communication port, port is invalid or is already in use.
|
17 |
Invalid
License Key |
18 |
Recording
media initialization error or cannot open the recording tmp file. |
19 |
Cannot
open the channel to start recording |
20 |
Unable to
open the wave file to save the recoding voice data |
21 |
Already
in the process of adding a person into the conversation |
22 |
Person is
already in the conversation |
23 |
You are
not in the conversation, so you cannot add any remote person into
the conversation. To add any remote person into the conversation
first start the conversation and then you can add more and more
persons into the conversation |
24 |
Voice
Compression Manager initialization failed |
25 |
Failed to
initialize the VaxVoIP task manager |
|
|
STATUS
CODES DETAIL:
STATUS CODES |
DESCRIPTION |
50
|
Connection failed to connect to Remote Person |
51 |
Trying to connect to remote end |
52 |
Connection to the Remote end is Lost |
53 |
Connection Connected, you may start Conversation now,
using headphones/speakers and microphone. |
54 |
Remote end/person closed the connection |
55 |
Remote
end/person is busy.
The status of the Person to which you are trying to
connect is busy. |
56 |
Remote
end/person is unavailable.
The
status of the Person to which you are trying to connect is
unavailable. |
57 |
Remote end/person
has cancelled the Start conversation request |
58 |
Person
to which you want to add into the conversation is already having the
conversation. |
59 |
Trying
to add into the conversation/conference |
60 |
Successfully
added into the conversation / conference |
61 |
Person to
which you want to add into the conversation/conference has cancelled
the add conversation request |
62 |
Adding
into the conversation/conference failed |
|
|
EVENTS: |
|
OnTextEvent |
This
Event is triggered by the VaxVoIP control, when a text message is received
from the remote end. |
Parameters Values: |
- Text Message String |
-
Client IP |
-
Client Port |
|
OnStatusEvent |
This Event is triggered by the VaxVoIP control, to notify about the
connection status. |
Parameters Values: |
- Status Code Number |
-
Client IP |
-
Client Port |
|
OnConnectionEvent |
This Event is triggered, to notify the listening end that client is
requesting to start conversation. |
Parameters Values: |
- Client IP |
- Client Port |
Remarks: |
When
a client tries to establish a connection to the listening end, this event is triggered with Client’s IP
& Port values,
to notify the listening end about the client start conversation request. To accept
the connection, AcceptIncomingCall() method can be used. |
|
OnAddConferenceEvent |
This Event is triggered, to notify the listening end that client is
requesting to add into the conversation. |
Parameters Values: |
- Client IP |
- Client Port |
Remarks: |
When
a client tries to add listening end into the conversation, this event is triggered with Client’s IP
& Port values,
to notify the listening end about the add conversation request. To accept
the connection, AcceptAddInConf() method can be used. |
|
METHODS: |
|
Initialize() |
This method is called to initialize the VaxVoIP control. It requires Port
Number to listen for incoming connections and/or data. After initializing, VaxVoIP control starts
listening for incoming Connections. |
Parameters: |
- Listening Port Number |
Return Value: |
Non-zero
on success, otherwise 0, and a appropriate error
code can be retrieved by calling GetLastError() method.
|
|
UnInitialize() |
To uninitialize the VaxVoIP control, this method can be used. |
|
Connect() |
This method is called to send connection request to listening end. |
Parameters: |
- IP Address of listening end |
- Port Number of listening end |
- TimeOut to connect in seconds |
Return Value: |
Non-zero on success, otherwise 0, and a specific error code can be
retrieved by calling GetLastError() method. |
Remarks: |
This
method tries to establish the connection to the remote listening end and
the Status Event Codes triggers accordingly.
|
|
Disconnect()
|
Calling this
method closes the voice session.
|
Return Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError() method.
|
|
AddInConf() |
To add more
persons into the conversation, this method can be called. |
Parameters: |
- IP Address of listening end |
- Port Number of listening end |
- TimeOut to add in seconds |
Return Value: |
Non-zero on success, otherwise 0, and a specific error code can be
retrieved by calling GetLastError() method. |
Remarks: |
This
method tries to the remote listening end into the conversation and
the Status Event Codes triggers accordingly.
|
|
AcceptAddInConf() |
This
method is used to accept the incoming add conversation request |
Parameter: |
- Client IP |
- Client Port |
- Timeout to connect in seconds |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method.
|
|
CancelAddInConf() |
This
method is used to cancel the incoming add conversation request. |
Parameter: |
- Client IP |
- Client Port |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method. |
|
StartRecording() |
This method is
used to start the conversation recording. |
Remarks: |
VaxVoIP
component creates recording tmp file for buffering purposes or to store
the digital data. When this method is called, VaxVoIP component starts
storing data into the tmp file. |
|
StopRecording() |
This method is
used to stop the conversation recording. |
Remarks: |
Call to this
method stops storing data into recording tmp file. |
|
ResetRecording() |
This method can
be call to reset/clear the recording buffer. |
Remarks: |
Call to this
method clears all the saved digital data from the recording tmp file. |
|
SaveRecordingToFile() |
To save the
recording tmp file voice data into wave (.wav) file this method can be
use. |
Parameter: |
- File name (.wav) |
Remarks: |
Call to this
method save the tmp voice data into wave (.wav) file. |
|
EnableBusyState()
|
Call to this
method enables the busy state.
|
Remarks: |
Call to this method changes the
current person status to busy.
Suppose two people (A & B)
are having voice conversation. During the conversation Person B
sets his status to busy and then if another Remote Person C, tries
to connect to Person B, Person C will get the STATUS CODE: 55,
which represents the Person you are connecting to, is Busy.
|
|
DisableBusyState() |
Call
to this method, disables the busy state. |
|
EnableNotAvailableState() |
Call
to this method enables the Not-Available state. |
Remarks: |
Call
to this method, change the current Person’s state to UN-AVAILABLE. For
example, Person
A is listening on a specific port and call to this method will
change his status to unavailable, if any Remote Person B connects
for voice conversation, the connection will not be established and the
Remote Person B will get the STATUS CODE: 56
|
|
DisableNotAvailableState() |
Call
to this method, changes the state from UN-AVAILABLE to AVAILABLE. |
|
MuteSpk()
|
To
mute the speaker, this method can be called. Muting the speaker does not
affect the Master Mute Control. |
Parameter: |
- Boolean Value 0 or 1 |
Return
Value: |
Non-Zero
on success, otherwise 0
|
|
MuteMic() |
To
mute the microphone, this method can be called. Muting the Microphone does
not affect the Master Mute Control. It simply blocks the outbound voice
streaming data.
|
Parameter: |
- Boolean Value 0 or 1 |
Return
Value: |
Non-Zero
on success, otherwise 0 |
|
GetSpkVolume() |
Call
to this method returns the speaker volume value between Range [0 to
255], where |
0 = Min Volume |
255
= Max Volume
|
Return
Value: |
Speaker
Volume value on success, otherwise –1 and a specific error code can be
retrieved by calling GetLastError()
method. |
|
SetSpkVolume() |
To
set the Output volume, this method can be called. the value range should
between 0 to 255. |
Parameter: |
- Volume Value between [0 – 255] Range |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method. |
|
GetMicVolume() |
Call
the method to get the Microphone Volume. Volume value is returned, in the
range of [0 to 255], where |
0 = Min Volume |
255
= Max Volume |
Return
Value: |
Microphone
Volume value on success, otherwise –1 and a specific error code can be
retrieved by calling GetLastError()
method. |
|
SetMicVolume() |
Call
the method to set the Microphone Volume, the value range should between 0
to 255, where |
0
= Min Volume |
255
= Max Volume |
Parameter: |
- Volume Value between [0 – 255] Range |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method. |
|
AcceptIncomingCall() |
This
method is used to accept the incoming connection. |
Parameter: |
- Client IP |
- Client Port |
- Timeout to connect in seconds |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method.
|
|
CancelIncomingCall() |
This
method is used to ignore the incoming connection. |
Parameter: |
- Client IP |
- Client Port |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method. |
|
SendTxtMsg() |
This
method is used to send a text message to a remote end. |
Parameter: |
- Text Message to Send |
Return
Value: |
Non-zero
on success, otherwise 0, and a specific error code can be retrieved by
calling GetLastError()
method. |
|
GetLastError() |
Call
this method, to get the error for the last operation that failed. |
Return
Value: |
- Error Code Number |
|
GetOutBoundTotalBytes() |
Return
Value: |
Total
Outbound bytes, since the VaxVoIP Object is initialized. |
|
GetInBoundTotalBytes() |
Return
Value: |
Total
Inbound bytes, since the VaxVoIP object is initialized.
|
|
GetOutBoundDataRate()
|
Return
Value: |
Outbound
Bytes per second. |
|
GetInBoundDataRate()
|
Return
Value: |
Inbound
Bytes per second. |