This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
The Eyeball AnyBandwidth™ Engine (ABE) enables audio-video communications among multiple clients and/or servers having heterogeneous processor capacities and network connections, and/or network connections with dynamically changing properties.
AnyBandwidth provides optimized video quality (such as frame rate, picture resolution, and sharpness) to each user based on the available network bandwidth and processing power.
AnyBandwidth Engine contains Eyeball’s patented AnyBandwidth Technology, and is found in several Eyeball products including Eyeball Messenger and Eyeball Messenger SDK. Messenger SDK utilizes the SIP signaling protocol, but this does not preclude AnyBandwidth Engine from utilizing other signaling protocols based on application demand.
Eyeball AnyBandwidth Engine offers the following features:
Guaranteed voice and video quality
Packet loss concealment
Flexible voice processing (AEC, AGC, CNG, NS, VAD) for hands-free handsets and tablets
Plug-and-play voice codecs including G.711, G.729, GSM, iLBC, Siren, Speex
Plug-and-play video codecs including EyeStream, H.263, H.264
In this document, the phrase current user refers to the local user, as opposed to the remote user.
SIP references (including class or object names) don’t infer exclusive use of the SIP protocol.
We use the following conventions to define a variable’s data type:
Variable name starting with ‘n’ such as nLine refers to an Integer data type
Variable name starting with ‘s’ such as sUserID refers to a String data type
Variable name starting with ‘b’ such as bOutgoingCall refers to a Boolean data type
Variable name starting with ‘a’ such as aResponseInfo refers to a VB array data type. This is a one-dimensional array. Storing two-dimensional information is simply done by concatenating rows to each other, forming a one-dimensional array.
All strings are case-sensitive unless specified otherwise.
The calling convention for properties follows this format:
The methods and properties are defined in class CSipComm in file MediSession.h. To access these methods, an object of CSipComm needs to be created. Please see Section 3.1. Creating SIPComm objects.
Unless otherwise specified, the calling convention for properties follows this format:
AnyBandwidth Engine SDK consists of libraries of ActiveX controls (Windows)/Java (Android)/C++ (iOS) that provide programmers with a high-level interface to the main features and functions of the AnyBandwidth Engine.
There are controls available to display and handle video windows (for video calls, used together with the SIP Communicator control), and audio device detection.
In this section, we present AnyBandwidth Engine SDK from a web-programmer’s point of view. However, programmers using other languages such as C++ and Visual Basic will also get a clear understanding of the supported features and functionalities.
This control supports peer-to-peer audio/video data-transport. AnyBandwidth Engine SDK supports multiple-lines (similar to multi-line PBX phones), enabling the following features:
Identifying each call using a separate line while in multiple concurrent calls
Choosing a specific available line to make the next call
Sending DTMF tones is required for PBX calls and Touch Tone services. AnyBandwidth Engine SDK implements RFC 2833 with RTP payload type 101. In addition, DTMF using SIP INFO or in-band can be used (please see DTMFMode in Properties section for additional details).
The applications send several event notifications to the application running on AnyBandwidth Engine SDK. The application needs to handle these events as necessary. For example, SIP control will send event notifications such as:
Currently, Polycom® Siren™ (G722.1C, 24kHz, 48kHz), GSM, G.711 (A-law, µ-law), G.729 Annex A, iLBC, and Speex codecs are supported. On Android and iOS G.711, G729 and Speex (wideband) are supported. Codecs are described with space-delimited strings. This value can be changed during a call. The following codec strings are supported: “SIREN24”, “SIREN48”, “SPEEX”, “SPEEX-WB”, “ILBC”, “GSM”, “PCMU”, “PCMA”, and “G729”.
When acting as conference host, it is possible to add conference participants thus supporting different codecs in a single conference. This is useful when adding participants from PSTN gateways which usually only support a small selection of codecs.
DTMFMode
This sets or retrieves whether the SendDTMF method sends DTMF using the RTP payload (0), SIP INFO method (1), or inband DTMF (2). The default value is 0.
In-band DTMF is designed to work only with high bit rate codecs, such as G711 and G722. For low bit rate codecs such as G729, RTP payload or SIP INFO should be used instead of inband.
This sets or retrieves whether or not Auto Gain Control (AGC) is used for the microphone input signal. This is a Boolean variable and its default value is false. This value can be changed during a call.
EnableDenoise
This sets or retrieves whether or not noise is removed from the microphone input signal. This is a Boolean value and its default value is true. This value can be changed during a call.
This property should be enabled for better echo cancellation.
EnableEchoCancellation
This sets or retrieves whether or not echo cancellation is enabled. This is a Boolean property and its default value is true. This value can be changed during a call.
For better echo cancellation, EnableDenoise property must be set to true.
EnableIceSupport
This sets or retrieves whether or not ICE candidates are used in invite for firewall traversal. ICE stands for Interactive Connectivity Establishment. This is a Boolean property and its default value is true.
EnableRelaySupport
This sets or retrieves whether or not relayed candidates are used in invite for firewall traversal. AnyBandwidth Engine SDK will use a TURN server to obtain these candidates. This is a Boolean property and its default value is true.
EnableSrtp
This enables or disables Secure RTP one-to-one calls. This property does not support conferencing. This is a Boolean variable and its default value is false. It can only be set before making a call. The caller has
to enable SRTP, but the callee must support SRTP as well for the call to be secure, although it does not need to call this property.
EnableStunSupport
This sets or retrieves whether or not server reflexive candidates are used in invite for firewall traversal. AnyBandwidth Engine SDK will use a STUN server to obtain these candidates. This is a Boolean property and its default value is true.
HoldLine
This holds or un-holds SelectedLine, or retrieves whether or not SelectedLine is being held. The default value of this Boolean property is false.
ImageSize
This sets the image size to be captured, or retrieves the captured image size as an integer. The default value is 0. This property can be set at any time. OnVideoSizeChange event is fired when the image size is changed.
The possible values are:
Windows:
0:
Small image size (176 x 144, or 192 x 144, if supported by the device)
1:
Medium image size (352 x 288, or 320 x 240, if supported by the device)
This sets or retrieves the volume of a SelectedLine. The value ranges from 1 (silence) to 100 (full volume). The default value of this property is 100.
MuteReceiver
This mutes or un-mutes inbound audio on SelectedLine, or retrieves whether or not inbound audio on SelectedLine is muted. The default value of this Boolean property is false.
MuteSender
This mutes or un-mutes outbound audio, or retrieves whether or not outbound audio is muted. The default value of this Boolean property is false.
PauseReceiver
This pauses or un-pauses inbound video on SelectedLine, or retrieves whether or not inbound video on SelectedLine is paused. The default value of this Boolean property is false.
PauseSender
This pauses or un-pauses outbound video, or retrieves whether or not outbound video is paused. The default value of this Boolean property is false.
SelectedLine
This sets a line to be selected or retrieves a line that is currently being selected as an integer. Some properties and methods perform operations on the line specified by SelectedLine.
This sets or retrieves preferred video codecs. Currently, EyeStream, H.263, and H264 codecs are supported. On Android and iOS only H264 is supported. Codecs are described with space-delimited strings. This value can be changed while in a call. The possible parameters are: “Eyestream”, “H263”, “H263-1998” (H263+), and “H264”. When attempting an audio/video call to a client that does not support the codecs selected in AnyBandwidth Engine SDK, the call will be completed as an audio only call.
In a conference, only one codec is supported. It is not possible to add participants that do not support the video codec used by the existing conference participants.
This attaches a given video window to display video.
nLine:
This is the line indicating a call for video source. If nLine is -1, window is used to display the preview video for the current user.
nWnd:
This is the window handle of the video window.
iOS:
AttachVideoWindow(int iLine, void *pWnd)
pWnd:
Reference to an UIView for camera preview surface, and to an UIImageView for remote video surface.
This is not applicable to Android environment.
AttachVideoWindowEx(nLine, nIndex, nWnd)
This attaches a given video window to the display video received from the specified line. A separate instance of VideoWindowCtl is needed to display each video window.
This returns audio receiver statistics of the currently selected line as a VB array of eight elements on Windows, array of string on Android, and vector of string on iOS.
Element Description
Element 1 (Codec, String): Audio codec
Element 2 (Bit rate, Float): Audio receiving bit rate
Element 3 (Buffer size, Integer): Audio receive buffer size in ms
Element 4 (Audio resynchronization count, Integer):
Number of times the audio receive buffer is reset and re-synchronized
Element 5 (Packets received, Integer): Number of packets received
Element 6 (Packets lost, Integer): Number of packets lost
Element 7 (Packets late, Integer): Number of late packets
Element 8 (Loss rate, Float): Packet loss rate
GetAFEngine(void **pAFEngine)
Get reference of the instance of the AnyFirewallEngine used in the SIP component. This AnyFirewallEngine instance is created and destroyed in the component itself.
pAFEngine:
Reference to CAnyFirewallEngine.
GetAudioSenderStat()
This returns audio sender statistics of the currently selected line as a VB array of three elements on windows, array of string on Android and vector of string on iOS.
Element Description
Element 1 (Codec, String): Audio codec
Element 2 (Bit rate, Float): Audio receiving bit rate
Element 3 (Packets sent, Integer): Number of packets sent
Element 2 (Bit rate, Float): Video receiving bit rate
Element 3 (Frame rate, Float): Video receiver frame rate
Element 4 ((Frames received, Integer): Number of frames received
Element 5 (Packets received, Integer): Number of packets received
Element 6 (Packets lost, Integer): Number of packets lost
Element 7 (Loss rate, Float): Packet loss rate
Element 8 (Frames lost, Float): Number of frames lost
GetVideoSenderStat()
This returns the video sender statistics of the currently selected line (see SipCommCtl.SelectedLine) as a VB array of eight elements.
Element Description
Element 1 (Codec, String): Video codec
Element 2 (Bit rate, Float): Video sending bit bit rate
Element 3 (Frame rate, Float): Video sending bit frame rate
Element 4 ((Frames sent, Integer): Number of frames sent
Element 5 (Frames dropped, Integer): Number of frames dropped
Element 6 (Packets sent, Integer): Number of packets sent
Element 7 (Frames lost, Float): Number of packets not received by remote user
Element 8 (Packets rate, Float): Packet loss rate
GrabLine(nLineToGrab)
This reserves a line to make a call. There can only be one line being reserved at a time. A reserved line is released once ReleaseLine is called. If there is an error reserving the line, -1 is returned; otherwise, the line being reserved is returned as an integer.
nLineToGrab:
Specifies a line to be reserved. If this is –1, the control will choose a line that is not in use and return that line as Integer.
This un-reserves the line nLine which was grabbed by the method GrabLine.
nLine:
The line to be released.
ResetAudioReceiverStat()
This resets the audio receiver statistics.
ResetAudioSenderStat()
This resets the audio sender statistics.
ResetVideoReceiverStat()
This resets the video receiver statistics.
ResetVideoSenderStat()
This resets the video sender statistics.
SendDTMF(sKey)
This sends the DTMF message corresponding to a specified key to the current call (specified by current value of SelectedLine). If no call is established at SelectedLine, nothing is sent.
This function initializes the underlying AnyFirewall Engine by setting the necessary servers for performing firewall traversal.
nServerType:
An enum indicating the type of server to be set
bstrAddr:
IP address of the server
nPort:
Port of the server
bDone:
This is false if more servers remain to be set, and True if this is the final server to be set. Firewall detection will start after all servers have been set.
The DNS SRV domain name that is used to locate the STUN, TURN and STUN-Relay/TURN servers. The port parameter for the server type is ignored.
The following DNS SRV queries will be made:
_stun._udp.<srvdomain>STUN server (UDP)
_stun._tcp.<srvdomain>STUN server (TCP)
_turn._udp.<srvdomain>STUN-Relay/TURN server (UDP)
_turn._tc alive p.<srvdomain>STUN-Relay/TURN server (TCP)
eServerHttpProxy The HTTP Proxy server, for users using a proxy server
eServerStunUdp* The UDP STUN server
eServerStunTcp* The TCP STUN server
eServerStunRelayUdp* The UDP STUN-Relay/TURN server
eServerStunRelayTcp* The TCP STUN-Relay/TURN server
*These parameters will be used if eServerSRV is not set or the DNS SRV lookup fails.
SetSipEventHandler(sipEventHandler)
This sets the event handler for handing events from the SipComm control. This must implement the SipEventHandler interface. The SipEventHandler is an object which implements SipEventHandler. Please check the sample application code.
This is applicable to the Android environment only.
SetTURNUsernamePassword (sUsername, sPassword)
This sets the authentication information for the TURN server.
SipCommCtl returns the error code 0x80004005 (in hexadecimal format) as well as error descriptions for all errors. These errors are thrown as exceptions in JScript. The following sample code shows how to handle these errors in JScript:
Confidential Information: This document contains confidential and proprietary information. The document has been provided to you in your capacity as a customer or evaluator of Eyeball Networks Inc.'s products. Unauthorized reproduction and distribution is prohibited unless specifically approved by Eyeball Networks Inc.
Eyeball, Eyeball.com, its logos, AnyBandwidth™ and AnyFirewall™ are trademarks of Eyeball Networks Inc. All other referenced companies and product names may or may not be trademarks of their respective owners.
For more information visit Eyeball Networks Inc. at http://www.eyeball.com.