IVR Class
Properties Methods Events Config Settings Errors
The IVR class can be used to implement an Interactive Voice Response (IVR) menu.
Syntax
class ipworksvoip.IVR
Remarks
The IVR class can be used to implement an IVR menu utilizing modern Voice over Internet Protocol (VoIP) technology. This softphone offers a comprehensive set of features, including the ability to handle incoming calls, detect touch-tone inputs from the caller, and perform other common Voice over Internet Protocol (VoIP) operations. With this, you have a level of flexibility and control when it comes to designing and customizing menu options.
Registration
To begin, the first step is activating, or registering, the class. The server, port, user, and password properties must be set to the appropriate values to register with your SIP server/provider. After these values are set, call activate. If the class has successfully activated/registered, the on_activated event will fire and active will be set to true. The class will now be able to make/receive phone calls. For example:
component.OnActivated += (o, e) => {
Console.WriteLine("Activation Successful");
};
component.User = "sip_user";
component.Password = "sip_password";
component.Server = "sip_server";
component.Port = 5060 // Default, 5061 is typical for SSL/TLS
component.Activate();
Additionally, it's important to note that the registration of a SIP client will expire if not refreshed. The expiration time is negotiated with the server when registering.
By default, the class will attempt to negotiate a value of 60 seconds. This value can be changed via the RegistrationInterval configuration.
Note this is merely a suggestion to the server, and the server can change this accordingly. If the server does change this, after registration is complete, RegistrationInterval will be updated.
To prevent the registration from expiring, the class will refresh the registration within do_events, when needed. To ensure this occurs, we recommend calling do_events frequently. In a form-based application, we recommend doing so within a timer. For example, this could look something like:
private void timer1_Tick(object sender, EventArgs e)
{
component.DoEvents();
}
private System.Windows.Forms.Timer timer1;
timer1.Interval = 1000;
timer1.Tick += new System.EventHandler(this.timer1_Tick);
timer1.Enabled = true;
Note that in console applications, you must call do_events in a loop in order to provide accurate message processing, in addition to this case.
Security
By default, the class operates in plaintext for both SIP signaling and RTP (audio) communication. To enable completely secure communication using the class, both SIPS (Secure SIP) and SRTP (Secure RTP) must be enabled.
Enable SIPS
To enable SIPS (Secure SIP, or SIP over SSL/TLS), the sip_transport_protocol property must be set to 2 (TLS). The port property will typically need to be set to 5061 (this may vary). Additionally, the on_ssl_server_authentication event must be handled, allowing users to check the server identity and other security attributes related to server authentication. Once this is complete, the class can then be activated. All subsequent SIP signaling will now be secured. For example:
component.OnSSLServerAuthentication += (o, e) => {
if (!e.Accept) {
if (e.CertSubject == "SIPS_SAMPLE_SUBJECT" && e.CertIssuer == "SIPS_CERT_ISSUER") {
e.Accept = true;
}
}
};
// Enable SIPS
component.SIPTransportProtocol = 2; // TLS
component.User = "sip_user";
component.Password = "sip_password";
component.Server = "sip_server";
component.Port = 5061; // 5061 is typical for SSL/TLS
component.Activate();
Information related to the SSL/TLS handshake will be available within the on_ssl_status event with the prefix [SIP TLS].
Enable SRTP
While the above process secures SIP signaling, it does not secure RTP (audio) communication. The rtp_security_mode property can be used to specify the security mode that will be used when transmitting RTP packets. By default, this property is 0 (None), and RTP packets will remain unencrypted during communication with the remote party.
To ensure the audio data is encrypted and SRTP is enabled, the rtp_security_mode must be set to either of the following modes: 1 (SDES), or 2 (DTLS-SRTP). The selected mode will be used to securely derive a key used to encrypt and decrypt RTP packets, enabling secure audio communication with the remote party. The appropriate mode to use may depend on the service provider and configuration of a particular user. For example:
component.OnSSLServerAuthentication += (o, e) => {
if (!e.Accept) {
if (e.CertSubject == "SIPS_SAMPLE_SUBJECT" && e.CertIssuer == "SIPS_CERT_ISSUER") {
e.Accept = true;
}
}
};
component.RTPSecurityMode = 1; // Enable SRTP (SDES)
//component.RTPSecurityMode = 2; // Enable SRTP (DTLS-SRTP)
component.SIPTransportProtocol = 2; // TLS
component.User = "sip_user";
component.Password = "sip_password";
component.Server = "sip_server";
component.Port = 5061; // 5061 is typical for SSL/TLS
component.Activate();
component.Dial("123456789", "", true);
Note it is highly recommended that sip_transport_protocol is set to TLS when enabling SRTP. Additionally, if SRTP is enabled, the remote party must support the selected mode, otherwise no call will be established.
Handle Incoming Calls
After successful activation, incoming calls will be detected, and on_incoming_call will fire for each call. Within this event, answer or decline can be used to handle these calls. For example:
ivr1.OnIncomingCall += (o, e) => {
ivr1.Answer(e.CallId);
};
Automated Responses
Throughout the menu, there are various ways to prompt a caller. For example, you may want to play an initial message to an answered call. Once a call has been answered, the on_call_ready event will fire, where you can use either play_text, play_file, or play_bytes to do so. For example:
ivr1.OnCallReady += (o, e) => {
ivr1.PlayText(e.CallId, "Please press 1 to be transferred to sales. Press 2 to be transferred to support. Press 3 to hear the options again.");
};
Only audio data with a sampling rate of 8 kHz and a bit depth of 16 bits per sample can be played (PCM 8 kHz 16-bit format). Note that these methods are non-blocking. The class can play audio to multiple calls at once.
Once the audio has finished playing to a particular call, the on_played event will fire, with the CallId as a parameter. Please see play_bytes and on_played for more information on expected behavior when playing bytes.
Handle User Input
A main focus of an IVR menu revolves around handling user input. The class keeps track of the touch-tone inputs of a caller in the call's "UserInput" field. Additionally, the on_digit event will fire whenever user input is detected. The event will contain parameters for the Digit pressed, and the associated CallId. The class can detect digits 0-9, *, and # tones. Based on current and previous inputs, you can implement various menu options, from transferring calls to certain extensions, checking a user's account status, placing user's on hold, etc. For example:
ivr1.OnDigit += (o, e) => {
if (e.Digit.Equals("1")) {
ivr1.Transfer(e.CallId, "Sales Number");
} else if (e.Digit.Equals("2")) {
ivr1.Transfer(e.CallId, "Support Number");
} else if (e.Digit.Equals("3")) {
ivr1.PlayText(e.CallId, "Please press 1 to be transferred to sales. Press 2 to be transferred to support. Press 3 to hear the options again.");
} else {
// Unhandled input
}
};
Call Termination
Ongoing calls are terminated by passing the appropriate Call-ID to hangup. All ongoing calls can be terminated with hangup_all. When a call has been terminated (by either party), on_call_terminated will fire.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
active | The current activation status of the class. |
call_count | The number of records in the Call arrays. |
call_call_id | String representation of an immutable universally unique identifier (UUID) specific to the call. |
call_conference_id | A unique identifier for a conference call. |
call_duration | Elapsed time, in seconds, since the call has begun. |
call_last_status | This property indicates the call's last response code. |
call_local_address | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
call_local_port | The UDP port in the local host where UDP binds. |
call_microphone | The microphone currently in use during the call. |
call_mute_microphone | This property can be set to mute the Microphone being used by the class in the given call. |
call_mute_speaker | This property can be set to mute the Speaker being used by the class in the given call. |
call_outgoing | Indicates whether the current call is outgoing. |
call_playing | Indicates whether the current call is playing audio via PlayText or PlayFile , or PlayBytes . |
call_recording | Indicates whether the current call is recording the received voice from the peer. |
call_remote_address | The address of the remote host we are communicating with. |
call_remote_port | The port of the remote host we are communicating with. |
call_remote_uri | This property communicates who to call via SIP. |
call_remote_user | The username or telephone number of the remote user associated with the call. |
call_speaker | The speaker currently in use during the call. |
call_started_at | The number of milliseconds since 12:00:00 AM January 1, 1970 when this call started. |
call_state | This property indicates the state of the current call. |
call_user_input | String representation of digits typed by the callee using their keypad. |
call_via | The Via header sent in the most recent SIP request. |
local_host | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
local_port | The UDP port in the local host where UDP binds. |
password | The password that is used when connecting to the SIP Server. |
port | The port on the SIP server the class is connecting to. |
rtp_security_mode | Specifies the security mode that will be used when transmitting RTP. |
server | The address of the SIP Server. |
sip_transport_protocol | Specifies the transport protocol the class will use for SIP signaling. |
ssl_accept_server_cert_encoded | This is the certificate (PEM/base64 encoded). |
ssl_cert_encoded | This is the certificate (PEM/base64 encoded). |
ssl_cert_store | This is the name of the certificate store for the client certificate. |
ssl_cert_store_password | If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store. |
ssl_cert_store_type | This is the type of certificate store for this certificate. |
ssl_cert_subject | This is the subject of the certificate used for client authentication. |
user | The username that is used when connecting to the SIP Server. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
activate | Activates the class. |
answer | Answers an incoming phone call. |
config | Sets or retrieves a configuration setting. |
deactivate | Deactivates the class. |
decline | Declines an incoming phone call. |
dial | Used to make a call. |
do_events | Processes events from the internal message queue. |
hangup | Used to hang up a specific call. |
hangup_all | Used to hang up all calls. |
hold | Places a call on hold. |
ping | Used to ping the server. |
play_bytes | This method is used to play bytes to a call. |
play_file | Plays audio from a WAV file to a call. |
play_text | Plays audio from a string to a call using Text-to-Speech. |
reset | Reset the class. |
start_recording | Used to start recording the audio of a call. |
stop_playing | Stops audio from playing to a call. |
stop_recording | Stops recording the audio of a call. |
transfer | Transfers a call. |
unhold | Takes a call off hold. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_activated | This event is fired immediately after the class is activated. |
on_call_ready | This event is fired after a call has been answered, declined, or ignored. |
on_call_state_changed | This event is fired after a call's state has changed. |
on_call_terminated | This event is fired after a call has been terminated. |
on_deactivated | This event is fired immediately after the class is deactivated. |
on_dial_completed | This event is fired after the dial process has finished. |
on_digit | This event fires every time a digit is pressed using the keypad. |
on_error | Information about errors during data delivery. |
on_incoming_call | This event is fired when there's an incoming call. |
on_log | This event is fired once for each log message. |
on_outgoing_call | This event is fired when an outgoing call has been made. |
on_played | This event is fired after the class finishes playing available audio. |
on_record | This event is fired when recorded audio data is available. |
on_silence | This event is fired when the class detects silence from incoming audio streams. |
on_ssl_server_authentication | Fired after the server presents its certificate to the client. |
on_ssl_status | Shows the progress of the secure connection. |
Config Settings
The following is a list of config settings for the class with short descriptions. Click on the links for further details.
AuthUser | Specifies the username to be used during client authentication. |
Codecs | Comma-separated list of codecs the class can use. |
DialTimeout | Specifies the amount of time to wait for a response when making a call. |
Domain | Can be used to set the address of the SIP domain. |
DtmfMethod | The method used for delivering the signals/tones sent when typing a digit. |
LogEncodedAudioData | Whether the class will log encoded audio data. |
LogLevel | The level of detail that is logged. |
LogRTPPackets | Whether the class will log RTP packets. |
RecordType | The type of recording the class will use. |
RedirectLimit | The maximum number of redirects an outgoing call can experience. |
RegistrationInterval | Specifies the interval between subsequent registration messages. |
SilenceInterval | Specifies the interval the class uses to detect periods of silence. |
STUNPort | The port of the STUN server. |
STUNServer | The address of the STUN Server. |
UnregisterOnActivate | Specifies whether the class will unregister from the SIP Server before registration. |
VoiceIndex | The voice that will be used when playing text. |
VoiceRate | The speaking rate of the voice when playing text. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
MaskSensitive | Whether sensitive data is masked in log messages. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |
active Property
The current activation status of the class.
Syntax
def get_active() -> bool: ...
active = property(get_active, None)
Default Value
FALSE
Remarks
This property indicates the activation status of the class. active will be True if the class has been successfully activated (registered) with the SIP Server, and False otherwise. If False, the class is not registered and will not be able to make or receive calls.
The class can be activated via activate and deactivated through deactivate.
This property is read-only.
call_count Property
The number of records in the Call arrays.
Syntax
def get_call_count() -> int: ...
call_count = property(get_call_count, None)
Default Value
0
Remarks
This property controls the size of the following arrays:
- call_call_id
- call_conference_id
- call_duration
- call_last_status
- call_local_address
- call_local_port
- call_microphone
- call_mute_microphone
- call_mute_speaker
- call_outgoing
- call_playing
- call_recording
- call_remote_address
- call_remote_port
- call_remote_uri
- call_remote_user
- call_speaker
- call_started_at
- call_state
- call_user_input
- call_via
The array indices start at 0 and end at call_count - 1.
This property is read-only.
call_call_id Property
String representation of an immutable universally unique identifier (UUID) specific to the call.
Syntax
def get_call_call_id(call_index: int) -> str: ...
Default Value
""
Remarks
String representation of an immutable universally unique identifier (UUID) specific to the call.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_conference_id Property
A unique identifier for a conference call.
Syntax
def get_call_conference_id(call_index: int) -> str: ...
Default Value
""
Remarks
A unique identifier for a conference call.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_duration Property
Elapsed time, in seconds, since the call has begun.
Syntax
def get_call_duration(call_index: int) -> int: ...
Default Value
0
Remarks
Elapsed time, in seconds, since the call has begun. Calculated using the value in call_started_at.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_last_status Property
This property indicates the call's last response code.
Syntax
def get_call_last_status(call_index: int) -> int: ...
Default Value
0
Remarks
This field indicates the call's last response code. Response codes are defined in RFC 3261.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_local_address Property
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
Syntax
def get_call_local_address(call_index: int) -> str: ...
Default Value
""
Remarks
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_local_port Property
The UDP port in the local host where UDP binds.
Syntax
def get_call_local_port(call_index: int) -> int: ...
Default Value
0
Remarks
The UDP port in the local host where UDP binds.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_microphone Property
The microphone currently in use during the call.
Syntax
def get_call_microphone(call_index: int) -> str: ...
Default Value
""
Remarks
The microphone currently in use during the call. Set through set_microphone.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_mute_microphone Property
This property can be set to mute the Microphone being used by the class in the given call.
Syntax
def get_call_mute_microphone(call_index: int) -> bool: ... def set_call_mute_microphone(call_index: int, value: bool) -> None: ...
Default Value
FALSE
Remarks
This field can be set to mute the call_microphone being used by the class in the given call. When True, the call_microphone is muted.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
call_mute_speaker Property
This property can be set to mute the Speaker being used by the class in the given call.
Syntax
def get_call_mute_speaker(call_index: int) -> bool: ... def set_call_mute_speaker(call_index: int, value: bool) -> None: ...
Default Value
FALSE
Remarks
This field can be set to mute the call_speaker being used by the class in the given call. When True, the call_speaker is muted.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
call_outgoing Property
Indicates whether the current call is outgoing.
Syntax
def get_call_outgoing(call_index: int) -> bool: ...
Default Value
FALSE
Remarks
Indicates whether the current call is outgoing. If false, the call is incoming.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_playing Property
Indicates whether the current call is playing audio via PlayText or PlayFile , or PlayBytes .
Syntax
def get_call_playing(call_index: int) -> bool: ...
Default Value
FALSE
Remarks
Indicates whether the current call is playing audio via play_text or play_file, or play_bytes. After audio transmission is complete, or stopped using stop_playing, this flag will be false.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_recording Property
Indicates whether the current call is recording the received voice from the peer.
Syntax
def get_call_recording(call_index: int) -> bool: ...
Default Value
FALSE
Remarks
Indicates whether the current call is recording the received voice from the peer. When the recording is done, this flag will be false. If the recording is stopped via stop_recording, this flag will be false.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_remote_address Property
The address of the remote host we are communicating with.
Syntax
def get_call_remote_address(call_index: int) -> str: ...
Default Value
""
Remarks
The address of the remote host we are communicating with.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_remote_port Property
The port of the remote host we are communicating with.
Syntax
def get_call_remote_port(call_index: int) -> int: ...
Default Value
0
Remarks
The port of the remote host we are communicating with. This field is typically 5060.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_remote_uri Property
This property communicates who to call via SIP.
Syntax
def get_call_remote_uri(call_index: int) -> str: ...
Default Value
""
Remarks
This field communicates who to call via SIP. This value contains the call_remote_user, call_remote_address, and the call_remote_port, and has the following format:
sip:user@host:port
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_remote_user Property
The username or telephone number of the remote user associated with the call.
Syntax
def get_call_remote_user(call_index: int) -> str: ...
Default Value
""
Remarks
The username or telephone number of the remote user associated with the call.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_speaker Property
The speaker currently in use during the call.
Syntax
def get_call_speaker(call_index: int) -> str: ...
Default Value
""
Remarks
The speaker currently in use during the call. Set through set_speaker.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_started_at Property
The number of milliseconds since 12:00:00 AM January 1, 1970 when this call started.
Syntax
def get_call_started_at(call_index: int) -> int: ...
Default Value
0
Remarks
The number of milliseconds since 12:00:00 AM January 1, 1970 when this call started.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_state Property
This property indicates the state of the current call.
Syntax
def get_call_state(call_index: int) -> int: ...
Default Value
0
Remarks
This property indicates the state of the current call. The applicable values are as follows:
csInactive (0) | The call is inactive (default setting). |
csConnecting (1) | The call is establishing a connection to the callee. |
csAutConnecting (2) | The call is establishing a connection to the callee with authorization credentials. |
csRinging (3) | The call is ringing. |
csActive (4) | The call is active. |
csActiveInConference (5) | The call is active and in a conference. |
csDisconnecting (6) | The call is disconnecting with the callee. |
csAutDisconnecting (7) | The call is disconnecting with the callee with authorization credentials. |
csHolding (8) | The call is currently being placed on hold, but the hold operation has not finished. |
csOnHold (9) | The call is currently on hold. |
csUnholding (10) | The call is currently being unheld, but the unhold operation has not finished. |
csTransferring (11) | The call is currently being transferred. |
csAutTransferring (12) | The call is currently being transferred with authorization credentials. |
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_user_input Property
String representation of digits typed by the callee using their keypad.
Syntax
def get_call_user_input(call_index: int) -> str: ...
Default Value
""
Remarks
String representation of digits typed by the callee using their keypad.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
call_via Property
The Via header sent in the most recent SIP request.
Syntax
def get_call_via(call_index: int) -> str: ...
Default Value
""
Remarks
The Via header sent in the most recent SIP request. Identifies the protocol name/version, transport type, IP Address of the User Agent Client, and port of the request.
The call_index parameter specifies the index of the item in the array. The size of the array is controlled by the call_count property.
This property is read-only.
local_host Property
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
Syntax
def get_local_host() -> str: ... def set_local_host(value: str) -> None: ...
local_host = property(get_local_host, set_local_host)
Default Value
""
Remarks
The local_host property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the class initiate connections (or accept in the case of server classs) only through that interface.
If the class is connected, the local_host property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).
NOTE: local_host is not persistent. You must always set it in code, and never in the property window.
local_port Property
The UDP port in the local host where UDP binds.
Syntax
def get_local_port() -> int: ... def set_local_port(value: int) -> None: ...
local_port = property(get_local_port, set_local_port)
Default Value
0
Remarks
The local_port property must be set before UDP is activated (active is set to True). It instructs the class to bind to a specific port (or communication endpoint) in the local machine.
Setting it to 0 (default) enables the TCP/IP stack to choose a port at random. The chosen port will be shown by the local_port property after the connection is established.
local_port cannot be changed once the class is active. Any attempt to set the local_port property when the class is active will generate an error.
The local_port property is useful when trying to connect to services that require a trusted port in the client side.
password Property
The password that is used when connecting to the SIP Server.
Syntax
def get_password() -> str: ... def set_password(value: str) -> None: ...
password = property(get_password, set_password)
Default Value
""
Remarks
This property contains the password of the client attempting to connect to the SIP Server. This value will be used when activating the class via activate.
port Property
The port on the SIP server the class is connecting to.
Syntax
def get_port() -> int: ... def set_port(value: int) -> None: ...
port = property(get_port, set_port)
Default Value
5060
Remarks
This property specifies the port on the SIP server that the class will connect to. This value will be used when activating the class via activate.
rtp_security_mode Property
Specifies the security mode that will be used when transmitting RTP.
Syntax
def get_rtp_security_mode() -> int: ... def set_rtp_security_mode(value: int) -> None: ...
rtp_security_mode = property(get_rtp_security_mode, set_rtp_security_mode)
Default Value
0
Remarks
This property is used to specify the security mode that will be used when transmitting RTP (audio data). Possible modes are:
0 (None) | SRTP is disabled. |
1 (SDES) | SRTP is enabled, utilizing SDES. |
2 (DTLS) | SRTP is enabled, utilizing DTLS (DTLS-SRTP). |
By default, the security mode will be 0 (None), and RTP packets will remain unencrypted during communication with the remote party. To enable SRTP (Secure RTP), the security mode must be set to either: 1 (SDES), or 2 (DTLS).
When SRTP is enabled, the selected mode will be used to securely derive a key used to encrypt and decrypt RTP packets, enabling secure audio communication with the remote party. The appropriate mode to use may depend on the service provider and configuration of a particular user. Additionally, if SRTP is enabled, the remote party must support the selected mode, otherwise no call will be established.
Note it is highly recommended that sip_transport_protocol is set to TLS when enabling SRTP.
server Property
The address of the SIP Server.
Syntax
def get_server() -> str: ... def set_server(value: str) -> None: ...
server = property(get_server, set_server)
Default Value
""
Remarks
This property contains the address of the SIP Server the class will attempt to connect to. This value will be used when activating the class via activate.
sip_transport_protocol Property
Specifies the transport protocol the class will use for SIP signaling.
Syntax
def get_sip_transport_protocol() -> int: ... def set_sip_transport_protocol(value: int) -> None: ...
sip_transport_protocol = property(get_sip_transport_protocol, set_sip_transport_protocol)
Default Value
0
Remarks
This property specifies which transport protocol (UDP, TCP, TLS) the class will use for SIP signaling and can be used to enable SIPS (Secure SIP). Note it is important to set the sip_transport_protocol property before setting any additional properties and configurations.
This value is 0 (UDP) by default. Possible values are:
0 (UDP - Default) | Signaling will be performed over UDP (plaintext). |
1 (TCP) | Signaling will be performed over TCP (plaintext). |
2 (TLS) | Signaling will be performed using TLS over TCP (SIPS). |
Note when TLS is specified, the port will typically need to be set to 5061.
ssl_accept_server_cert_encoded Property
This is the certificate (PEM/base64 encoded).
Syntax
def get_ssl_accept_server_cert_encoded() -> bytes: ... def set_ssl_accept_server_cert_encoded(value: bytes) -> None: ...
ssl_accept_server_cert_encoded = property(get_ssl_accept_server_cert_encoded, set_ssl_accept_server_cert_encoded)
Default Value
""
Remarks
This is the certificate (PEM/base64 encoded). This property is used to assign a specific certificate. The ssl_accept_server_cert_store and ssl_accept_server_cert_subject properties also may be used to specify a certificate.
When ssl_accept_server_cert_encoded is set, a search is initiated in the current ssl_accept_server_cert_store for the private key of the certificate. If the key is found, ssl_accept_server_cert_subject is updated to reflect the full subject of the selected certificate; otherwise, ssl_accept_server_cert_subject is set to an empty string.
ssl_cert_encoded Property
This is the certificate (PEM/base64 encoded).
Syntax
def get_ssl_cert_encoded() -> bytes: ... def set_ssl_cert_encoded(value: bytes) -> None: ...
ssl_cert_encoded = property(get_ssl_cert_encoded, set_ssl_cert_encoded)
Default Value
""
Remarks
This is the certificate (PEM/base64 encoded). This property is used to assign a specific certificate. The ssl_cert_store and ssl_cert_subject properties also may be used to specify a certificate.
When ssl_cert_encoded is set, a search is initiated in the current ssl_cert_store for the private key of the certificate. If the key is found, ssl_cert_subject is updated to reflect the full subject of the selected certificate; otherwise, ssl_cert_subject is set to an empty string.
ssl_cert_store Property
This is the name of the certificate store for the client certificate.
Syntax
def get_ssl_cert_store() -> bytes: ... def set_ssl_cert_store(value: bytes) -> None: ...
ssl_cert_store = property(get_ssl_cert_store, set_ssl_cert_store)
Default Value
"MY"
Remarks
This is the name of the certificate store for the client certificate.
The ssl_cert_store_type property denotes the type of the certificate store specified by ssl_cert_store. If the store is password protected, specify the password in ssl_cert_store_password.
ssl_cert_store is used in conjunction with the ssl_cert_subject property to specify client certificates. If ssl_cert_store has a value, and ssl_cert_subject or ssl_cert_encoded is set, a search for a certificate is initiated. Please see the ssl_cert_subject property for details.
Designations of certificate stores are platform-dependent.
The following are designations of the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).
ssl_cert_store_password Property
If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.
Syntax
def get_ssl_cert_store_password() -> str: ... def set_ssl_cert_store_password(value: str) -> None: ...
ssl_cert_store_password = property(get_ssl_cert_store_password, set_ssl_cert_store_password)
Default Value
""
Remarks
If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.
ssl_cert_store_type Property
This is the type of certificate store for this certificate.
Syntax
def get_ssl_cert_store_type() -> int: ... def set_ssl_cert_store_type(value: int) -> None: ...
ssl_cert_store_type = property(get_ssl_cert_store_type, set_ssl_cert_store_type)
Default Value
0
Remarks
This is the type of certificate store for this certificate.
The class supports both public and private keys in a variety of formats. When the cstAuto value is used the class will automatically determine the type. This property can take one of the following values:
0 (cstUser - default) | For Windows, this specifies that the certificate store is a certificate store owned by the current user. Note: this store type is not available in Java. |
1 (cstMachine) | For Windows, this specifies that the certificate store is a machine store. Note: this store type is not available in Java. |
2 (cstPFXFile) | The certificate store is the name of a PFX (PKCS12) file containing certificates. |
3 (cstPFXBlob) | The certificate store is a string (binary or base64-encoded) representing a certificate store in PFX (PKCS12) format. |
4 (cstJKSFile) | The certificate store is the name of a Java Key Store (JKS) file containing certificates. Note: this store type is only available in Java. |
5 (cstJKSBlob) | The certificate store is a string (binary or base64-encoded) representing a certificate store in Java Key Store (JKS) format. Note: this store type is only available in Java. |
6 (cstPEMKeyFile) | The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate. |
7 (cstPEMKeyBlob) | The certificate store is a string (binary or base64-encoded) that contains a private key and an optional certificate. |
8 (cstPublicKeyFile) | The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate. |
9 (cstPublicKeyBlob) | The certificate store is a string (binary or base64-encoded) that contains a PEM- or DER-encoded public key certificate. |
10 (cstSSHPublicKeyBlob) | The certificate store is a string (binary or base64-encoded) that contains an SSH-style public key. |
11 (cstP7BFile) | The certificate store is the name of a PKCS7 file containing certificates. |
12 (cstP7BBlob) | The certificate store is a string (binary) representing a certificate store in PKCS7 format. |
13 (cstSSHPublicKeyFile) | The certificate store is the name of a file that contains an SSH-style public key. |
14 (cstPPKFile) | The certificate store is the name of a file that contains a PPK (PuTTY Private Key). |
15 (cstPPKBlob) | The certificate store is a string (binary) that contains a PPK (PuTTY Private Key). |
16 (cstXMLFile) | The certificate store is the name of a file that contains a certificate in XML format. |
17 (cstXMLBlob) | The certificate store is a string that contains a certificate in XML format. |
18 (cstJWKFile) | The certificate store is the name of a file that contains a JWK (JSON Web Key). |
19 (cstJWKBlob) | The certificate store is a string that contains a JWK (JSON Web Key). |
21 (cstBCFKSFile) | The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store). Note: this store type is only available in Java and .NET. |
22 (cstBCFKSBlob) | The certificate store is a string (binary or base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format. Note: this store type is only available in Java and .NET. |
23 (cstPKCS11) | The certificate is present on a physical security key accessible via a PKCS11 interface.
To use a security key the necessary data must first be collected using the CertMgr class. The list_store_certificates method may be called after setting cert_store_type to cstPKCS11, cert_store_password to the PIN, and cert_store to the full path of the PKCS11 dll. The certificate information returned in the on_cert_list event's CertEncoded parameter may be saved for later use. When using a certificate, pass the previously saved security key information as the ssl_cert_store and set ssl_cert_store_password to the PIN. Code Example: SSH Authentication with Security Key
|
99 (cstAuto) | The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically. |
ssl_cert_subject Property
This is the subject of the certificate used for client authentication.
Syntax
def get_ssl_cert_subject() -> str: ... def set_ssl_cert_subject(value: str) -> None: ...
ssl_cert_subject = property(get_ssl_cert_subject, set_ssl_cert_subject)
Default Value
""
Remarks
This is the subject of the certificate used for client authentication.
This property must be set after all other certificate properties are set. When this property is set, a search is performed in the current certificate store to locate a certificate with a matching subject.
If a matching certificate is found, the property is set to the full subject of the matching certificate.
If an exact match is not found, the store is searched for subjects containing the value of the property.
If a match is still not found, the property is set to an empty string, and no certificate is selected.
The special value "*" picks a random certificate in the certificate store.
The certificate subject is a comma separated list of distinguished name fields and values. For instance "CN=www.server.com, OU=test, C=US, E=support@nsoftware.com". Common fields and their meanings are displayed below.
Field | Meaning |
CN | Common Name. This is commonly a host name like www.server.com. |
O | Organization |
OU | Organizational Unit |
L | Locality |
S | State |
C | Country |
E | Email Address |
If a field value contains a comma it must be quoted.
user Property
The username that is used when connecting to the SIP Server.
Syntax
def get_user() -> str: ... def set_user(value: str) -> None: ...
user = property(get_user, set_user)
Default Value
""
Remarks
This property contains the username of the client attempting to connect to the SIP Server. This value will be used when activating the class via activate.
activate Method
Activates the class.
Syntax
def activate() -> None: ...
Remarks
This method is used to activate the class by registering to a SIP Server specified in the server and port properties. The username and password of the SIP Server must be provided via user and password properties for authorization, if applicable.
Example:
ipphone.User = "MyUsername";
ipphone.Password = "MyPassword";
ipphone.Server = "HostNameOrIP";
ipphone.Port = 5060;
ipphone.Activate();
Upon successful activation, the on_activated event will fire.
answer Method
Answers an incoming phone call.
Syntax
def answer(call_id: str) -> None: ...
Remarks
This method can be used to answer an incoming phone call, specified by callId. This method can be used in conjunction with the on_incoming_call event, for example:
ipphone.onIncomingCall += (sender, e) => {
ipphone.Answer(e.CallId);
};
If successful, on_call_ready will fire.
config Method
Sets or retrieves a configuration setting.
Syntax
def config(configuration_string: str) -> str: ...
Remarks
config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the config method.
To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).
To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.
deactivate Method
Deactivates the class.
Syntax
def deactivate() -> None: ...
Remarks
This method is used to unregister the class from the SIP Server. If deactivation is successful, on_deactivated will fire.
decline Method
Declines an incoming phone call.
Syntax
def decline(call_id: str) -> None: ...
Remarks
This method can be used to decline an incoming phone call, specified by callId. This method can be used in conjunction with the on_incoming_call event, for example:
ipphone.onIncomingCall += (sender, e) => {
ipphone.Decline(e.CallId);
};
dial Method
Used to make a call.
Syntax
def dial(number: str, caller_number: str, wait: bool) -> str: ...
Remarks
This method is used to make a call to a particular user, given by number. This method should only be called after the class has been successfully activated via activate. Initially, the on_outgoing_call event will fire after calling this method. on_dial_completed may fire when the dial process is complete. If successful, on_call_ready will fire after the outgoing call has been answered, declined, or ignored. If the call is declined or ignored, the class will be sent to voicemail, which can be ended with hangup.
The callerNumber parameter specifies the optional caller ID. If given, the P-Asserted-Identity Header, specified in RFC 3325, will be sent in requests to the connected SIP Server. If left as an empty string, this header will not be sent.
The wait parameter specifies whether the class should connect synchronously or asynchronously to the call. If True, the class will connect synchronously, and won't return until the call has been answered, declined, or ignored. If False, the class will connect asynchronously. The call's status can be checked through various events, such as on_outgoing_call, on_call_ready, and on_call_state_changed, or found in the call's State field. Exceptions throughout the call process will be reported in on_dial_completed, along with other call details.
NOTE: This method will return the CallId field of the call. This returned value may not always reflect the accurate CallId. In the case that wait is true, this method will always return the accurate value. In the case that wait is false, the returned value may not be accurate if the outgoing call is forwarded, or redirected, as the class must change this field. Both the updated and original CallId will be present within the on_dial_completed event. Any references to the original CallId must be updated accordingly. Please see on_dial_completed for more details. The below examples assume the outgoing call has been answered:
Example: "wait" is true
string callId = "";
bool connected = false;
ipphone.OnCallReady += (sender, e) => {
connected = true;
}
try {
callId = ipphone.Dial("123456789", "", true);
} catch (IPWorksVoIPException e) {
MessageBox.Show(e.Code + ": " + e.Message);
}
if (connected) {
ipphone.PlayText(callId, "Hello");
}
Example: "wait" is false
bool connected = false;
string callId = "";
ipphone.OnDialCompleted += (sender, e) => {
if (e.ErrorCode != 0) {
MessageBox.Show(e.ErrorCode + ": " + e.Description);
// Handle error
}
if (e.OriginalCallId != e.CallId) {
callId = e.CallId; // Update callId if redirect occurred
}
}
ipphone.OnCallReady += (sender, e) => {
connected = true;
}
string callId = ipphone.Dial("123456789", "", false);
...
...
...
// Somewhere else...
if (connected) {
ipphone.PlayText(callId, "Hello");
}
do_events Method
Processes events from the internal message queue.
Syntax
def do_events() -> None: ...
Remarks
When do_events is called, the class processes any available events. If no events are available, it waits for a preset period of time, and then returns.
hangup Method
Used to hang up a specific call.
Syntax
def hangup(call_id: str) -> None: ...
Remarks
This method is used to terminate a specific call, specified by callId. After the call has been successfully terminated, on_call_terminated will fire.
hangup_all Method
Used to hang up all calls.
Syntax
def hangup_all() -> None: ...
Remarks
This method is used to terminate all calls currently in the Call* properties. on_call_terminated will fire for each successfully terminated call.
hold Method
Places a call on hold.
Syntax
def hold(call_id: str) -> None: ...
Remarks
This method is used to place a call, specified by callId, on hold.
ping Method
Used to ping the server.
Syntax
def ping(timeout: int) -> None: ...
Remarks
This method is used to ping the SIP server by sending an OPTIONS request. If no server response is received by the class in timeout seconds, ping will throw an error.
Note this method is only applicable when the component is active.
play_bytes Method
This method is used to play bytes to a call.
Syntax
def play_bytes(call_id: str, bytes_to_play: bytes, last_block: bool) -> None: ...
Remarks
This method is used to play bytes to a call, specified by the callId parameter. These bytes are expected to have a sampling rate of 8 kHz and a bit depth of 16 bits per sample (PCM 8 kHz 16-bit format). The bytesToPlay parameter specifies the bytes that will be sent to the call. Internally, these bytes will be stored within a buffer. Once all bytes have played and the buffer is empty, the on_played event will fire.
The lastBlock parameter indicates whether the class will expect further uses of play_bytes. When true, this indicates that no additional bytes will be provided for this particular audio stream, and on_played will fire once after the bytes have been played. Until this parameter is specified as true, the class will be considered to be playing audio.
If lastBlock is false, this indicates that the class should expect more calls to play_bytes. Once all bytes have played and the buffer is empty, on_played will fire as expected, and will continue firing until the lastBlock parameter is set to true. Within on_played, the user can provide further bytes to play_bytes. Please see below for detailed examples on how to use this method with on_played.
Example: Playing audio from a stream
MemoryStream playBytesStream = new MemoryStream(byteSource);
phone.PlayBytes("callId", new byte[0], false);
phone.OnPlayed += (o, e) => {
if (e.Completed) {
Console.WriteLine("Playing Bytes Completed");
} else {
byte[] data = new byte[4096]; // Arbitrary length
int dataLen = playBytesStream.Read(data, 0, data.Length);
if (dataLen > 0) {
byte[] newData = new byte[dataLen];
Array.Copy(data, newData, dataLen) // Normalize array
phone.PlayBytes(e.CallId, newData, false);
} else {
phone.PlayBytes(e.CallId, null, true);
}
}
};
Exmaple: Playing single audio block
MemoryStream playBytesStream = new MemoryStream(byteSource);
phone.PlayBytes("callId", playBytesStream.ToArray(), true);
phone.OnPlayed += (o, e) => {
Console.WriteLine("Done!"); // No further calls to PlayBytes are expected in this case
}
play_file Method
Plays audio from a WAV file to a call.
Syntax
def play_file(call_id: str, wav_file: str) -> None: ...
Remarks
This method is used to play the audio from a WAV file to a particular call, given by callId. Audio transmission will only occur when the call has connected and on_call_ready has fired. Only WAV files with a sampling rate of 8 kHz and a bit depth of 16 bits per sample are supported (PCM 8 kHz 16-bit format).
Note that this class can handle playing audio to concurrent calls. This method is non-blocking and will return immediately. The on_played event will fire when the audio for the specified call has finished playing. Consecutive uses of play_text or play_file can prevent prior audio transmissions from being completed. In the below example, on_played will only fire for the second call to play_text:
ipphone.PlayFile("callId", "C:\\hello.wav"); // Played will not fire for this
ipphone.PlayText("callId", "This will interrupt the previous use if it has not finished playing.");
The wavFile parameter specifies the path to the WAV file.
play_text Method
Plays audio from a string to a call using Text-to-Speech.
Syntax
def play_text(call_id: str, text: str) -> None: ...
Remarks
This method is used to play the text from a string to a particular call, given by callId, using Text-to-Speech. Audio transmission will only occur when the call has connected and on_call_ready has fired.
Note that this class can handle playing audio to concurrent calls. This method is non-blocking and will return immediately. The on_played event will fire when the audio for the specified call has finished playing. Consecutive uses of play_text and play_file can prevent prior audio transmissions from completing. In the below example, on_played will only fire for the second call to play_text:
ipphone.PlayFile("callId", "C:\\hello.wav"); // Played will not fire for this
ipphone.PlayText("callId", "This will interrupt the previous use if it has not finished playing.");
The text parameter must be a string representation of the text to be transmitted.
reset Method
Reset the class.
Syntax
def reset() -> None: ...
Remarks
This method will reset the class's properties to their default values.
start_recording Method
Used to start recording the audio of a call.
Syntax
def start_recording(call_id: str, filename: str) -> None: ...
Remarks
This method is used to start recording the incoming and outgoing audio of a call, specified by callId. If you wish to record the audio to file, you may specify the filename parameter. Note that when this parameter is specified, you must record to a WAV file.
You may also leave the filename parameter blank if you want more direct control over the recorded data. This will cause the on_record event to fire containing the call's audio data once the recording is finished.
In both scenarios, you can stop recording the call's audio via stop_recording. By default, the recording will end if the call is terminated. Note the recorded audio will have a sampling rate of 8 kHz and a bit depth of 16 bits per sample (PCM 8 kHz 16-bit format).
Example: Using the 'Record' event
MemoryStream recordStream = new MemoryStream();
phone.StartRecording("callId", "");
phone.OnRecord += (o, e) => {
recordStream.Write(e.RecordedDataB, 0, e.RecordedDataB.Length);
File.WriteAllBytes(recordFile, recordStream.ToArray());
};
stop_playing Method
Stops audio from playing to a call.
Syntax
def stop_playing(call_id: str) -> None: ...
Remarks
This method is used to stop the audio playing to a call, given by callId. Note that this will not stop audio from transmitting with an external device set using set_microphone, however, will stop audio transmitting from usage of play_text, play_file, and play_bytes.
Note that on_played will not fire when this method is used.
stop_recording Method
Stops recording the audio of a call.
Syntax
def stop_recording(call_id: str) -> None: ...
Remarks
This method is used to stop recording the audio of a call, given by callId. The class will automatically stop recording upon call termination.
transfer Method
Transfers a call.
Syntax
def transfer(call_id: str, number: str) -> None: ...
Remarks
This method is used to transfer a call, specified by callId, to the phone number given by number. The class supports the following types of transfers:
Basic Transfers
Basic transfers are very simple to perform. First, the user must establish a call with the number they will be transferring (transferee). After the call is established, the user can transfer the call to the appropriate number (transfer target). The call will then be removed. For example:
string callId = ipphone1.Dial("123456789", "", true); // Establish call with transferee, hold if needed
//ipphone1.Hold(callId);
ipphone1.Transfer(callId, "number");
Attended Transfers
Typically, attended transfers are used to manually check if the number (or transfer target) is available for a call, provide extra information about the call, etc., before transferring. In addition to establishing a call with the transferee, the class must also establish a call with the transfer target. Once both of these calls are active, you may perform an attended transfer by calling transfer at any moment. Afterwards, a session between these calls will be established and they will be removed. Note that transfer must be used with the callId of the call you wish to transfer (transferee) and the number of the call you wish to transfer to (transfer target). For example:
string callId1 = ipphone1.Dial("123456789", "", true); // Establish call with Transferee, hold if needed
//ipphone1.Hold(callId1);
string callId2 = ipphone1.Dial("number", "", true); // Establish call with Transfer Target, hold if needed
//ipphone1.Hold(callId2);
ipphone1.Transfer(callId1, "number");
Note in these examples, hold can be used to place a call on hold before a transfer. This is optional.
unhold Method
Takes a call off hold.
Syntax
def unhold(call_id: str) -> None: ...
Remarks
This method is used to take a call, specified by callId, off hold.
on_activated Event
This event is fired immediately after the class is activated.
Syntax
class IVRActivatedEventParams(object): # In class IVR: @property def on_activated() -> Callable[[IVRActivatedEventParams], None]: ... @on_activated.setter def on_activated(event_hook: Callable[[IVRActivatedEventParams], None]) -> None: ...
Remarks
The on_activated event will fire after the class has successfully registered with the SIP Server via activate.
on_call_ready Event
This event is fired after a call has been answered, declined, or ignored.
Syntax
class IVRCallReadyEventParams(object): @property def call_id() -> str: ... # In class IVR: @property def on_call_ready() -> Callable[[IVRCallReadyEventParams], None]: ... @on_call_ready.setter def on_call_ready(event_hook: Callable[[IVRCallReadyEventParams], None]) -> None: ...
Remarks
For all calls, this event will fire when audio can be transmitted and received. For incoming calls, it will fire after the call has been answered.
For outgoing calls, this event will fire after the call has either been answered, declined, or ignored. In the case that the call is declined or ignored, it will fire and the class will be sent to voicemail. hangup can be used to end the call in all scenarios.
Note that this event will fire after on_outgoing_call and on_dial_completed, assuming dial was successful.
The CallId parameter is the unique Call-ID of the call.
on_call_state_changed Event
This event is fired after a call's state has changed.
Syntax
class IVRCallStateChangedEventParams(object): @property def call_id() -> str: ... @property def state() -> int: ... # In class IVR: @property def on_call_state_changed() -> Callable[[IVRCallStateChangedEventParams], None]: ... @on_call_state_changed.setter def on_call_state_changed(event_hook: Callable[[IVRCallStateChangedEventParams], None]) -> None: ...
Remarks
The on_call_state_changed event will fire each time the state of a call has changed.
The CallId parameter is the unique Call-ID of the call.
The State parameter denotes the state the call has changed to. The following values are applicable:
csInactive (0) | The call is inactive (default setting). |
csConnecting (1) | The call is establishing a connection to the callee. |
csAutConnecting (2) | The call is establishing a connection to the callee with authorization credentials. |
csRinging (3) | The call is ringing. |
csActive (4) | The call is active. |
csActiveInConference (5) | The call is active and in a conference. |
csDisconnecting (6) | The call is disconnecting with the callee. |
csAutDisconnecting (7) | The call is disconnecting with the callee with authorization credentials. |
csHolding (8) | The call is currently being placed on hold, but the hold operation has not finished. |
csOnHold (9) | The call is currently on hold. |
csUnholding (10) | The call is currently being unheld, but the unhold operation has not finished. |
csTransferring (11) | The call is currently being transferred. |
csAutTransferring (12) | The call is currently being transferred with authorization credentials. |
on_call_terminated Event
This event is fired after a call has been terminated.
Syntax
class IVRCallTerminatedEventParams(object): @property def call_id() -> str: ... # In class IVR: @property def on_call_terminated() -> Callable[[IVRCallTerminatedEventParams], None]: ... @on_call_terminated.setter def on_call_terminated(event_hook: Callable[[IVRCallTerminatedEventParams], None]) -> None: ...
Remarks
The on_call_terminated event will fire after a call has been terminated by either end of the call.
The CallId parameter is the unique Call-ID of the call.
on_deactivated Event
This event is fired immediately after the class is deactivated.
Syntax
class IVRDeactivatedEventParams(object): # In class IVR: @property def on_deactivated() -> Callable[[IVRDeactivatedEventParams], None]: ... @on_deactivated.setter def on_deactivated(event_hook: Callable[[IVRDeactivatedEventParams], None]) -> None: ...
Remarks
The on_deactivated event will fire after the class has unregistered from the SIP Server via deactivate.
on_dial_completed Event
This event is fired after the dial process has finished.
Syntax
class IVRDialCompletedEventParams(object): @property def original_call_id() -> str: ... @property def call_id() -> str: ... @property def caller() -> str: ... @property def callee() -> str: ... @property def error_code() -> int: ... @property def description() -> str: ... # In class IVR: @property def on_dial_completed() -> Callable[[IVRDialCompletedEventParams], None]: ... @on_dial_completed.setter def on_dial_completed(event_hook: Callable[[IVRDialCompletedEventParams], None]) -> None: ...
Remarks
This event will fire when the dial process, initiated by calling dial, has completed. Note that this event will not fire if an exception occurs when the "wait" parameter of dial is true. In this case, the class will throw an exception. However, it will fire if "wait" is true and no exception occurs, indicating dial was successful.
The OriginalCallId parameter is the value returned by dial.
The value of the CallId parameter depends on the redirection status of the call. There are two scenarios:
- The outgoing call has not been redirected. In this case, CallId is equal to OriginalCallId, and the value returned by dial is correct.
- The outgoing call has been redirected any number of times. In this case, the OriginalCallId is no longer applicable, and the CallId parameter is the new unique identifier for this call. Any reference to the past value, OriginalCallId, should be updated accordingly to reflect the change due to redirection. This would also include references to the original value returned by dial.
Errors during the dial process are reported via the ErrorCode and Description parameters. An error code of 0 and description of "Dialed Successfully" indicate dial has completed with no issues. A list of error codes can be found in the Error Codes section. In the case of a non-zero ErrorCode, the Description parameter will contain the error message (and SIP response code, if applicable), for example, "Dial Timeout" or "486: Busy Here".
on_digit Event
This event fires every time a digit is pressed using the keypad.
Syntax
class IVRDigitEventParams(object): @property def call_id() -> str: ... @property def digit() -> str: ... # In class IVR: @property def on_digit() -> Callable[[IVRDigitEventParams], None]: ... @on_digit.setter def on_digit(event_hook: Callable[[IVRDigitEventParams], None]) -> None: ...
Remarks
The on_digit event will fire after every detected keypad input from a call.
The detected input will be present in the Digit parameter. Note, this event will not fire after the class's inputs via type_digit. Detectable inputs include: 0-9, *, #
The CallId parameter is the unique Call-ID of the call.
on_error Event
Information about errors during data delivery.
Syntax
class IVRErrorEventParams(object): @property def error_code() -> int: ... @property def description() -> str: ... # In class IVR: @property def on_error() -> Callable[[IVRErrorEventParams], None]: ... @on_error.setter def on_error(event_hook: Callable[[IVRErrorEventParams], None]) -> None: ...
Remarks
The on_error event is fired in case of exceptional conditions during message processing. Normally the class fails with an error.
ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.
on_incoming_call Event
This event is fired when there's an incoming call.
Syntax
class IVRIncomingCallEventParams(object): @property def call_id() -> str: ... @property def remote_user() -> str: ... # In class IVR: @property def on_incoming_call() -> Callable[[IVRIncomingCallEventParams], None]: ... @on_incoming_call.setter def on_incoming_call(event_hook: Callable[[IVRIncomingCallEventParams], None]) -> None: ...
Remarks
The on_incoming_call event will fire after an incoming call is detected.
The CallId parameter specifies the unique Call-ID of the call, and can be used to answer or decline the call.
The RemoteUser parameter indicates the username or telephone number of the remote user associated with the call.
on_log Event
This event is fired once for each log message.
Syntax
class IVRLogEventParams(object): @property def log_level() -> int: ... @property def message() -> str: ... @property def log_type() -> str: ... # In class IVR: @property def on_log() -> Callable[[IVRLogEventParams], None]: ... @on_log.setter def on_log(event_hook: Callable[[IVRLogEventParams], None]) -> None: ...
Remarks
This event fires once for each log message generated by the class. The verbosity is controlled by the LogLevel configuration.
LogLevel indicates the detail level of the message. Possible values are:
0 (None) | No messages are logged. |
1 (Info - Default) | Informational events such as a call's status are logged. |
2 (Verbose) | Detailed data such as SIP/SDP packet information is logged. |
3 (Debug) | Debug data including all relevant sent and received audio bytes are logged. |
Message is the log message.
LogType identifies the type of log entry. Possible values are as follows:
- Info
- Packet
- RTP
on_outgoing_call Event
This event is fired when an outgoing call has been made.
Syntax
class IVROutgoingCallEventParams(object): @property def call_id() -> str: ... @property def remote_user() -> str: ... # In class IVR: @property def on_outgoing_call() -> Callable[[IVROutgoingCallEventParams], None]: ... @on_outgoing_call.setter def on_outgoing_call(event_hook: Callable[[IVROutgoingCallEventParams], None]) -> None: ...
Remarks
The on_outgoing_call event is fired when an outgoing call has been made using dial. This event signifies the start of the invite process.
The CallId parameter is the unique Call-ID of the call.
The RemoteUser parameter indicates the username or telephone number of the remote user associated with the call.
on_played Event
This event is fired after the class finishes playing available audio.
Syntax
class IVRPlayedEventParams(object): @property def call_id() -> str: ... @property def completed() -> bool: ... # In class IVR: @property def on_played() -> Callable[[IVRPlayedEventParams], None]: ... @on_played.setter def on_played(event_hook: Callable[[IVRPlayedEventParams], None]) -> None: ...
Remarks
The on_played event will fire after the class finishes playing available audio to a call. When using play_text or play_file, Completed will always be true. However, this will not always be the case when using play_bytes.
When playing audio via play_bytes, this event will fire when the internal byte queue is empty. In the event that the internal byte queue is empty, and the class is still expecting calls to play_bytes (i.e., lastBlock is false), this event will continue to fire with the Completed parameter as false. In this case, additional bytes are expected to be provided. Completed will be true once all bytes have been played and the class is no longer expecting calls to play_bytes (i.e., lastBlock is true). Please see the method description for more details.
The CallId parameter is the unique Call-ID of the call.
on_record Event
This event is fired when recorded audio data is available.
Syntax
class IVRRecordEventParams(object): @property def call_id() -> str: ... @property def recorded_data() -> bytes: ... # In class IVR: @property def on_record() -> Callable[[IVRRecordEventParams], None]: ... @on_record.setter def on_record(event_hook: Callable[[IVRRecordEventParams], None]) -> None: ...
Remarks
This event is fired when a call's recorded data is available. This data is made available when either stop_recording is called or the call is terminated. Note that for this event to fire, start_recording must be specified with no filename parameter.
The recorded data will be available in the RecordedData and RecordedDataB parameters, and will have a sampling rate of 8 kHz and a bit depth of 16 bits per sample (PCM 8 kHz 16-bit format).
The CallId parameter is the unique Call-ID of the call.
on_silence Event
This event is fired when the class detects silence from incoming audio streams.
Syntax
class IVRSilenceEventParams(object): @property def call_id() -> str: ... # In class IVR: @property def on_silence() -> Callable[[IVRSilenceEventParams], None]: ... @on_silence.setter def on_silence(event_hook: Callable[[IVRSilenceEventParams], None]) -> None: ...
Remarks
The on_silence event will fire every second the class detects silence from a call's incoming audio stream. Note that this event can fire while an outgoing call is ringing.
The CallId parameter is the unique Call-ID of the call.
on_ssl_server_authentication Event
Fired after the server presents its certificate to the client.
Syntax
class IVRSSLServerAuthenticationEventParams(object): @property def cert_encoded() -> bytes: ... @property def cert_subject() -> str: ... @property def cert_issuer() -> str: ... @property def status() -> str: ... @property def accept() -> bool: ... @accept.setter def accept(value) -> None: ... # In class IVR: @property def on_ssl_server_authentication() -> Callable[[IVRSSLServerAuthenticationEventParams], None]: ... @on_ssl_server_authentication.setter def on_ssl_server_authentication(event_hook: Callable[[IVRSSLServerAuthenticationEventParams], None]) -> None: ...
Remarks
This event is where the client can decide whether to continue with the connection process or not. The Accept parameter is a recommendation on whether to continue or close the connection. This is just a suggestion: application software must use its own logic to determine whether to continue or not.
When Accept is False, Status shows why the verification failed (otherwise, Status contains the string "OK"). If it is decided to continue, you can override and accept the certificate by setting the Accept parameter to True.
on_ssl_status Event
Shows the progress of the secure connection.
Syntax
class IVRSSLStatusEventParams(object): @property def message() -> str: ... # In class IVR: @property def on_ssl_status() -> Callable[[IVRSSLStatusEventParams], None]: ... @on_ssl_status.setter def on_ssl_status(event_hook: Callable[[IVRSSLStatusEventParams], None]) -> None: ...
Remarks
The event is fired for informational and logging purposes only. Used to track the progress of the connection.
IVR Config Settings
The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the config method.IPPhone Config Settings
This configuration is used to specify the username to be used when authenticating a SIP client, for example, when registering or initiating a call. When specified, this value will replace the user property within the Authorization and Proxy-Authorization headers sent in the mentioned requests.
By default, this value is empty, and the user property will be used within the mentioned headers.
This configuration contains a comma-separated list of codecs, represented as integers, that the class can use to compress call data. By default, this value is:
8,0,3
The following integers correspond to these supported codecs:
0 | PCMU (G711MU) |
3 | GSM |
8 | PCMA (G711A) |
This configuration is used to specify the amount of time (in seconds) the class will wait for the outgoing call to be answered, declined, or ignored when using dial. Note this value will be 60 by default.
When using dial with the wait parameter as false, the timeout will be reported within on_dial_completed.
This configuration is used to specify the domain name the component will use in SIP requests, if needed. By default this value will be empty.
This configuration is used to describe the method being used to transmit the signals/tones when calling type_digit. Possible values of supported methods are:
1 | Inband (Default) |
2 | RFC 2833 |
3 | Info (SIP Info) |
This configuration controls whether the class will log encoded audio data when LogLevel is set to 3 (Debug). By default, this configuration is false, and the class will only log raw audio data.
This configuration controls the level of detail that is logged through the on_log event. Possible values are:
0 (None) | No messages are logged. |
1 (Info - Default) | Informational events such as a call's status are logged. |
2 (Verbose) | Detailed data such as SIP/SDP packet information is logged. |
3 (Debug) | Debug data including all relevant sent and received audio bytes are logged. |
This configuration controls whether the class will log received RTP packets when LogLevel is set to 3 (Debug). By default, this configuration is false, and the class will only log audio data.
This configuration sets the recording type the class will use when calling start_recording. Possible values are 0 (Mono) and 1 (Stereo - Default).
This configuration limits the number of redirects, also known as forwards or diversions, an outgoing call can experience. If the number of redirects exceeds this value, an exception will be thrown. Note this value is 0 by default.
Once the class is activated, this configuration specifies the amount of time (in seconds) between subsequent registrations. This is used to refresh the current registration and prevent the session's expiration.
This configuration is used to specify the interval (in milliseconds) that the class uses to detect silence from a call's incoming audio stream. This will also directly control the rate that on_silence will fire in the case silence is detected. Note this value is 1000 by default.
This configuration sets the port of the corresponding STUNServer. This value will be 3478 by default.
This configuration sets the address of the STUN Server the class will use to communicate with the SIP Server.
When calling activate, this configuration will specify whether the component will unregister with the SIP Server before the initial registration. If False (default), the component will not attempt to unregister first, and will only perform registration.
This configuration sets the voice that will be used when calling play_text. The available voice tokens are listed in the registry at HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices. Note this value will be 0 by default.
This configuration specifies the speaking rate of the voice when calling play_text. Supported values range from -10 (slowest) to 10 (fastest). Note this value will be 0 by default.
Base Config Settings
When queried, this setting will return a string containing information about the product's build.
The default code page is Unicode UTF-8 (65001).
The following is a list of valid code page identifiers:
Identifier | Name |
037 | IBM EBCDIC - U.S./Canada |
437 | OEM - United States |
500 | IBM EBCDIC - International |
708 | Arabic - ASMO 708 |
709 | Arabic - ASMO 449+, BCON V4 |
710 | Arabic - Transparent Arabic |
720 | Arabic - Transparent ASMO |
737 | OEM - Greek (formerly 437G) |
775 | OEM - Baltic |
850 | OEM - Multilingual Latin I |
852 | OEM - Latin II |
855 | OEM - Cyrillic (primarily Russian) |
857 | OEM - Turkish |
858 | OEM - Multilingual Latin I + Euro symbol |
860 | OEM - Portuguese |
861 | OEM - Icelandic |
862 | OEM - Hebrew |
863 | OEM - Canadian-French |
864 | OEM - Arabic |
865 | OEM - Nordic |
866 | OEM - Russian |
869 | OEM - Modern Greek |
870 | IBM EBCDIC - Multilingual/ROECE (Latin-2) |
874 | ANSI/OEM - Thai (same as 28605, ISO 8859-15) |
875 | IBM EBCDIC - Modern Greek |
932 | ANSI/OEM - Japanese, Shift-JIS |
936 | ANSI/OEM - Simplified Chinese (PRC, Singapore) |
949 | ANSI/OEM - Korean (Unified Hangul Code) |
950 | ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC) |
1026 | IBM EBCDIC - Turkish (Latin-5) |
1047 | IBM EBCDIC - Latin 1/Open System |
1140 | IBM EBCDIC - U.S./Canada (037 + Euro symbol) |
1141 | IBM EBCDIC - Germany (20273 + Euro symbol) |
1142 | IBM EBCDIC - Denmark/Norway (20277 + Euro symbol) |
1143 | IBM EBCDIC - Finland/Sweden (20278 + Euro symbol) |
1144 | IBM EBCDIC - Italy (20280 + Euro symbol) |
1145 | IBM EBCDIC - Latin America/Spain (20284 + Euro symbol) |
1146 | IBM EBCDIC - United Kingdom (20285 + Euro symbol) |
1147 | IBM EBCDIC - France (20297 + Euro symbol) |
1148 | IBM EBCDIC - International (500 + Euro symbol) |
1149 | IBM EBCDIC - Icelandic (20871 + Euro symbol) |
1200 | Unicode UCS-2 Little-Endian (BMP of ISO 10646) |
1201 | Unicode UCS-2 Big-Endian |
1250 | ANSI - Central European |
1251 | ANSI - Cyrillic |
1252 | ANSI - Latin I |
1253 | ANSI - Greek |
1254 | ANSI - Turkish |
1255 | ANSI - Hebrew |
1256 | ANSI - Arabic |
1257 | ANSI - Baltic |
1258 | ANSI/OEM - Vietnamese |
1361 | Korean (Johab) |
10000 | MAC - Roman |
10001 | MAC - Japanese |
10002 | MAC - Traditional Chinese (Big5) |
10003 | MAC - Korean |
10004 | MAC - Arabic |
10005 | MAC - Hebrew |
10006 | MAC - Greek I |
10007 | MAC - Cyrillic |
10008 | MAC - Simplified Chinese (GB 2312) |
10010 | MAC - Romania |
10017 | MAC - Ukraine |
10021 | MAC - Thai |
10029 | MAC - Latin II |
10079 | MAC - Icelandic |
10081 | MAC - Turkish |
10082 | MAC - Croatia |
12000 | Unicode UCS-4 Little-Endian |
12001 | Unicode UCS-4 Big-Endian |
20000 | CNS - Taiwan |
20001 | TCA - Taiwan |
20002 | Eten - Taiwan |
20003 | IBM5550 - Taiwan |
20004 | TeleText - Taiwan |
20005 | Wang - Taiwan |
20105 | IA5 IRV International Alphabet No. 5 (7-bit) |
20106 | IA5 German (7-bit) |
20107 | IA5 Swedish (7-bit) |
20108 | IA5 Norwegian (7-bit) |
20127 | US-ASCII (7-bit) |
20261 | T.61 |
20269 | ISO 6937 Non-Spacing Accent |
20273 | IBM EBCDIC - Germany |
20277 | IBM EBCDIC - Denmark/Norway |
20278 | IBM EBCDIC - Finland/Sweden |
20280 | IBM EBCDIC - Italy |
20284 | IBM EBCDIC - Latin America/Spain |
20285 | IBM EBCDIC - United Kingdom |
20290 | IBM EBCDIC - Japanese Katakana Extended |
20297 | IBM EBCDIC - France |
20420 | IBM EBCDIC - Arabic |
20423 | IBM EBCDIC - Greek |
20424 | IBM EBCDIC - Hebrew |
20833 | IBM EBCDIC - Korean Extended |
20838 | IBM EBCDIC - Thai |
20866 | Russian - KOI8-R |
20871 | IBM EBCDIC - Icelandic |
20880 | IBM EBCDIC - Cyrillic (Russian) |
20905 | IBM EBCDIC - Turkish |
20924 | IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol) |
20932 | JIS X 0208-1990 & 0121-1990 |
20936 | Simplified Chinese (GB2312) |
21025 | IBM EBCDIC - Cyrillic (Serbian, Bulgarian) |
21027 | Extended Alpha Lowercase |
21866 | Ukrainian (KOI8-U) |
28591 | ISO 8859-1 Latin I |
28592 | ISO 8859-2 Central Europe |
28593 | ISO 8859-3 Latin 3 |
28594 | ISO 8859-4 Baltic |
28595 | ISO 8859-5 Cyrillic |
28596 | ISO 8859-6 Arabic |
28597 | ISO 8859-7 Greek |
28598 | ISO 8859-8 Hebrew |
28599 | ISO 8859-9 Latin 5 |
28605 | ISO 8859-15 Latin 9 |
29001 | Europa 3 |
38598 | ISO 8859-8 Hebrew |
50220 | ISO 2022 Japanese with no halfwidth Katakana |
50221 | ISO 2022 Japanese with halfwidth Katakana |
50222 | ISO 2022 Japanese JIS X 0201-1989 |
50225 | ISO 2022 Korean |
50227 | ISO 2022 Simplified Chinese |
50229 | ISO 2022 Traditional Chinese |
50930 | Japanese (Katakana) Extended |
50931 | US/Canada and Japanese |
50933 | Korean Extended and Korean |
50935 | Simplified Chinese Extended and Simplified Chinese |
50936 | Simplified Chinese |
50937 | US/Canada and Traditional Chinese |
50939 | Japanese (Latin) Extended and Japanese |
51932 | EUC - Japanese |
51936 | EUC - Simplified Chinese |
51949 | EUC - Korean |
51950 | EUC - Traditional Chinese |
52936 | HZ-GB2312 Simplified Chinese |
54936 | Windows XP: GB18030 Simplified Chinese (4 Byte) |
57002 | ISCII Devanagari |
57003 | ISCII Bengali |
57004 | ISCII Tamil |
57005 | ISCII Telugu |
57006 | ISCII Assamese |
57007 | ISCII Oriya |
57008 | ISCII Kannada |
57009 | ISCII Malayalam |
57010 | ISCII Gujarati |
57011 | ISCII Punjabi |
65000 | Unicode UTF-7 |
65001 | Unicode UTF-8 |
Identifier | Name |
1 | ASCII |
2 | NEXTSTEP |
3 | JapaneseEUC |
4 | UTF8 |
5 | ISOLatin1 |
6 | Symbol |
7 | NonLossyASCII |
8 | ShiftJIS |
9 | ISOLatin2 |
10 | Unicode |
11 | WindowsCP1251 |
12 | WindowsCP1252 |
13 | WindowsCP1253 |
14 | WindowsCP1254 |
15 | WindowsCP1250 |
21 | ISO2022JP |
30 | MacOSRoman |
10 | UTF16String |
0x90000100 | UTF16BigEndian |
0x94000100 | UTF16LittleEndian |
0x8c000100 | UTF32String |
0x98000100 | UTF32BigEndian |
0x9c000100 | UTF32LittleEndian |
65536 | Proprietary |
When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:
- Product: The product the license is for.
- Product Key: The key the license was generated from.
- License Source: Where the license was found (e.g., RuntimeLicense, License File).
- License Type: The type of license installed (e.g., Royalty Free, Single Server).
- Last Valid Build: The last valid build number for which the license will work.
In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to True to mask sensitive data. The default is True.
This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.
If set to False, the class will not fire internal idle events. Set this to False to use the class in a background thread on Mac OS. By default, this setting is True.
If there are no events to process when do_events is called, the class will wait for the amount of time specified here before returning. The default value is 20.
When set to False, the class will use the system security libraries by default to perform cryptographic functions where applicable.
Setting this setting to True tells the class to use the internal implementation instead of using the system security libraries.
On Windows, this setting is set to False by default. On Linux/macOS, this setting is set to True by default.
To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the OpenSSL Notes section.
IVR Errors
IPPHONE Errors
201 Timeout error. The error description contains detailed information. | |
202 Invalid argument error. The error description contains detailed information. | |
601 Protocol error. The error description contains detailed information. |
UDP Errors
104 UDP is already active. | |
106 You cannot change the local_port while the class is active. | |
107 You cannot change the local_host at this time. A connection is in progress. | |
109 The class must be active for this operation. | |
112 Cannot change MaxPacketSize while the class is active. | |
113 Cannot change ShareLocalPort option while the class is active. | |
114 Cannot change remote_host when UseConnection is set and the class active. | |
115 Cannot change remote_port when UseConnection is set and the class is active. | |
116 remote_port can't be zero when UseConnection is set. Please specify a valid service port number. | |
117 Cannot change UseConnection while the class is active. | |
118 Message can't be longer than MaxPacketSize. | |
119 Message too short. | |
434 Unable to convert string to selected CodePage |
SSL Errors
270 Cannot load specified security library. | |
271 Cannot open certificate store. | |
272 Cannot find specified certificate. | |
273 Cannot acquire security credentials. | |
274 Cannot find certificate chain. | |
275 Cannot verify certificate chain. | |
276 Error during handshake. | |
280 Error verifying certificate. | |
281 Could not find client certificate. | |
282 Could not find server certificate. | |
283 Error encrypting data. | |
284 Error decrypting data. |
TCP/IP Errors
10004 [10004] Interrupted system call. | |
10009 [10009] Bad file number. | |
10013 [10013] Access denied. | |
10014 [10014] Bad address. | |
10022 [10022] Invalid argument. | |
10024 [10024] Too many open files. | |
10035 [10035] Operation would block. | |
10036 [10036] Operation now in progress. | |
10037 [10037] Operation already in progress. | |
10038 [10038] Socket operation on non-socket. | |
10039 [10039] Destination address required. | |
10040 [10040] Message too long. | |
10041 [10041] Protocol wrong type for socket. | |
10042 [10042] Bad protocol option. | |
10043 [10043] Protocol not supported. | |
10044 [10044] Socket type not supported. | |
10045 [10045] Operation not supported on socket. | |
10046 [10046] Protocol family not supported. | |
10047 [10047] Address family not supported by protocol family. | |
10048 [10048] Address already in use. | |
10049 [10049] Can't assign requested address. | |
10050 [10050] Network is down. | |
10051 [10051] Network is unreachable. | |
10052 [10052] Net dropped connection or reset. | |
10053 [10053] Software caused connection abort. | |
10054 [10054] Connection reset by peer. | |
10055 [10055] No buffer space available. | |
10056 [10056] Socket is already connected. | |
10057 [10057] Socket is not connected. | |
10058 [10058] Can't send after socket shutdown. | |
10059 [10059] Too many references, can't splice. | |
10060 [10060] Connection timed out. | |
10061 [10061] Connection refused. | |
10062 [10062] Too many levels of symbolic links. | |
10063 [10063] File name too long. | |
10064 [10064] Host is down. | |
10065 [10065] No route to host. | |
10066 [10066] Directory not empty | |
10067 [10067] Too many processes. | |
10068 [10068] Too many users. | |
10069 [10069] Disc Quota Exceeded. | |
10070 [10070] Stale NFS file handle. | |
10071 [10071] Too many levels of remote in path. | |
10091 [10091] Network subsystem is unavailable. | |
10092 [10092] WINSOCK DLL Version out of range. | |
10093 [10093] Winsock not loaded yet. | |
11001 [11001] Host not found. | |
11002 [11002] Non-authoritative 'Host not found' (try again or check DNS setup). | |
11003 [11003] Non-recoverable errors: FORMERR, REFUSED, NOTIMP. | |
11004 [11004] Valid name, no data record (check DNS setup). |