sipXtapiEvents.h File Reference


Detailed Description

sipXtapi event declarations

The sipXtapiEvents.h header file defines all of the events fired as part of sipXtapi. Event categories include call state events, line state events, SIP info events, SIP subscription events, configuration events, security events, media events, and keepalive events.

Each event notification is comprised of a event type and a cause code. The event type identifies a state transition (e.g. from call connected to call disconnected. The cause identifies the reason for the change (e.g. someone hung up).

See also:
sipxEventListenerAdd

sipxEventListenerRemove

SIPX_EVENT_CALLBACK_PROC

SIPX_EVENT_CATEGORY

#include "sipXtapi.h"

Go to the source code of this file.

Data Structures

struct  SIPX_KEEPALIVE_INFO
 Keepalive event information structure. More...
struct  SIPX_MEDIA_INFO
 Media event information structure. More...
struct  SIPX_CALLSTATE_INFO
 Callstate event information structure. More...
struct  SIPX_LINESTATE_INFO
 Linestate event information structure. More...
struct  SIPX_INFOSTATUS_INFO
 An INFOSTATUS event informs that application layer of the status of an outbound INFO requests. More...
struct  SIPX_INFO_INFO
 An INFO event signals the application layer that an INFO message was sent to this user agent. More...
struct  SIPX_SUBSTATUS_INFO
 An SUBSTATUS event informs that application layer of the status of an outbound SUBSCRIPTION requests;. More...
struct  SIPX_NOTIFY_INFO
 A NOTIFY_INFO event signifies that a NOTIFY message was received for an active subscription. More...
struct  SIPX_CONFIG_INFO
 SIPX_CONFIG_INFO events signifies that a change in configuration was observed. More...
struct  SIPX_SECURITY_INFO
 An SIPX_SECURITY_INFO event informs that application layer of the status of a security operation. More...

Defines

#define VALID_SIPX_EVENT_CATEGORY(x)   (((x) >= EVENT_CATEGORY_CALLSTATE) && ((x) <= EVENT_CATEGORY_KEEPALIVE))
 VALID_SIPX_EVENT_CATEGORY utility macro to validate if an event category is valid (within expected range).

Typedefs

typedef bool(SIPX_CALLING_CONVENTION *) SIPX_EVENT_CALLBACK_PROC (SIPX_EVENT_CATEGORY category, void *pInfo, void *pUserData)
 Signature for event callback/observer.

Enumerations

enum  SIPX_EVENT_CATEGORY {
  EVENT_CATEGORY_CALLSTATE, EVENT_CATEGORY_LINESTATE, EVENT_CATEGORY_INFO_STATUS, EVENT_CATEGORY_INFO,
  EVENT_CATEGORY_SUB_STATUS, EVENT_CATEGORY_NOTIFY, EVENT_CATEGORY_CONFIG, EVENT_CATEGORY_SECURITY,
  EVENT_CATEGORY_MEDIA, EVENT_CATEGORY_KEEPALIVE
}
 Enum with all of the possible event types. More...
enum  SIPX_CALLSTATE_EVENT {
  CALLSTATE_UNKNOWN = 0, CALLSTATE_NEWCALL = 1000, CALLSTATE_DIALTONE = 2000, CALLSTATE_REMOTE_OFFERING = 2500,
  CALLSTATE_REMOTE_ALERTING = 3000, CALLSTATE_CONNECTED = 4000, CALLSTATE_BRIDGED = 5000, CALLSTATE_HELD = 6000,
  CALLSTATE_REMOTE_HELD = 7000, CALLSTATE_DISCONNECTED = 8000, CALLSTATE_OFFERING = 9000, CALLSTATE_ALERTING = 10000,
  CALLSTATE_DESTROYED = 11000, CALLSTATE_TRANSFER_EVENT = 12000
}
 Major call state events identify significant changes in the state of a call. More...
enum  SIPX_CALLSTATE_CAUSE {
  CALLSTATE_CAUSE_UNKNOWN, CALLSTATE_CAUSE_NORMAL, CALLSTATE_CAUSE_TRANSFERRED, CALLSTATE_CAUSE_TRANSFER,
  CALLSTATE_CAUSE_CONFERENCE, CALLSTATE_CAUSE_EARLY_MEDIA, CALLSTATE_CAUSE_REQUEST_NOT_ACCEPTED, CALLSTATE_CAUSE_BAD_ADDRESS,
  CALLSTATE_CAUSE_BUSY, CALLSTATE_CAUSE_RESOURCE_LIMIT, CALLSTATE_CAUSE_NETWORK, CALLSTATE_CAUSE_REDIRECTED,
  CALLSTATE_CAUSE_NO_RESPONSE, CALLSTATE_CAUSE_AUTH, CALLSTATE_CAUSE_TRANSFER_INITIATED, CALLSTATE_CAUSE_TRANSFER_ACCEPTED,
  CALLSTATE_CAUSE_TRANSFER_TRYING, CALLSTATE_CAUSE_TRANSFER_RINGING, CALLSTATE_CAUSE_TRANSFER_SUCCESS, CALLSTATE_CAUSE_TRANSFER_FAILURE,
  CALLSTATE_CAUSE_REMOTE_SMIME_UNSUPPORTED, CALLSTATE_CAUSE_SMIME_FAILURE, CALLSTATE_CAUSE_SHUTDOWN, CALLSTATE_CAUSE_BAD_REFER,
  CALLSTATE_CAUSE_NO_KNOWN_INVITE, CALLSTATE_CAUSE_BYE_DURING_IDLE, CALLSTATE_CAUSE_UNKNOWN_STATUS_CODE, CALLSTATE_CAUSE_BAD_REDIRECT,
  CALLSTATE_CAUSE_TRANSACTION_DOES_NOT_EXIST, CALLSTATE_CAUSE_CANCEL
}
 Callstate cuase events identify the reason for a Callstate event or provide more detail. More...
enum  SIPX_LINESTATE_EVENT {
  LINESTATE_UNKNOWN = 0, LINESTATE_REGISTERING = 20000, LINESTATE_REGISTERED = 21000, LINESTATE_UNREGISTERING = 22000,
  LINESTATE_UNREGISTERED = 23000, LINESTATE_REGISTER_FAILED = 24000, LINESTATE_UNREGISTER_FAILED = 25000, LINESTATE_PROVISIONED = 26000
}
 Enumeration of possible linestate Events. More...
enum  SIPX_LINESTATE_CAUSE {
  LINESTATE_CAUSE_UNKNOWN = 0, LINESTATE_REGISTERING_NORMAL = LINESTATE_REGISTERING + 1, LINESTATE_REGISTERED_NORMAL = LINESTATE_REGISTERED + 1, LINESTATE_UNREGISTERING_NORMAL = LINESTATE_UNREGISTERING + 1,
  LINESTATE_UNREGISTERED_NORMAL = LINESTATE_UNREGISTERED + 1, LINESTATE_REGISTER_FAILED_COULD_NOT_CONNECT = LINESTATE_REGISTER_FAILED + 1, LINESTATE_REGISTER_FAILED_NOT_AUTHORIZED = LINESTATE_REGISTER_FAILED + 2, LINESTATE_REGISTER_FAILED_TIMEOUT = LINESTATE_REGISTER_FAILED + 3,
  LINESTATE_UNREGISTER_FAILED_COULD_NOT_CONNECT = LINESTATE_UNREGISTER_FAILED + 1, LINESTATE_UNREGISTER_FAILED_NOT_AUTHORIZED = LINESTATE_UNREGISTER_FAILED + 2, LINESTATE_UNREGISTER_FAILED_TIMEOUT = LINESTATE_UNREGISTER_FAILED + 3, LINESTATE_PROVISIONED_NORMAL = LINESTATE_PROVISIONED + 1
}
 Enumeration of possible linestate Event causes. More...
enum  SIPX_INFOSTATUS_EVENT { INFOSTATUS_UNKNOWN = 0, INFOSTATUS_RESPONSE = 30000, INFOSTATUS_NETWORK_ERROR = 31000 }
 Enumeration of possible INFO status events. More...
enum  SIPX_CONFIG_EVENT { CONFIG_UNKNOWN = 0, CONFIG_STUN_SUCCESS = 40000, CONFIG_STUN_FAILURE = 41000 }
 Enumeration of possible configuration events. More...
enum  SIPX_SECURITY_EVENT { SECURITY_UNKNOWN = 0, SECURITY_ENCRYPT = 1000, SECURITY_DECRYPT = 2000, SECURITY_TLS = 4000 }
 Enumeration of possible security events. More...
enum  SIPX_SECURITY_CAUSE {
  SECURITY_CAUSE_UNKNOWN = 0, SECURITY_CAUSE_NORMAL, SECURITY_CAUSE_ENCRYPT_SUCCESS, SECURITY_CAUSE_ENCRYPT_FAILURE_LIB_INIT,
  SECURITY_CAUSE_ENCRYPT_FAILURE_BAD_PUBLIC_KEY, SECURITY_CAUSE_ENCRYPT_FAILURE_INVALID_PARAMETER, SECURITY_CAUSE_DECRYPT_SUCCESS, SECURITY_CAUSE_DECRYPT_FAILURE_DB_INIT,
  SECURITY_CAUSE_DECRYPT_FAILURE_BAD_DB_PASSWORD, SECURITY_CAUSE_DECRYPT_FAILURE_INVALID_PARAMETER, SECURITY_CAUSE_DECRYPT_BAD_SIGNATURE, SECURITY_CAUSE_DECRYPT_MISSING_SIGNATURE,
  SECURITY_CAUSE_DECRYPT_SIGNATURE_REJECTED, SECURITY_CAUSE_TLS_SERVER_CERTIFICATE, SECURITY_CAUSE_TLS_BAD_PASSWORD, SECURITY_CAUSE_TLS_LIBRARY_FAILURE,
  SECURITY_CAUSE_REMOTE_HOST_UNREACHABLE, SECURITY_CAUSE_TLS_CONNECTION_FAILURE, SECURITY_CAUSE_TLS_HANDSHAKE_FAILURE, SECURITY_CAUSE_SIGNATURE_NOTIFY,
  SECURITY_CAUSE_TLS_CERTIFICATE_REJECTED
}
 Enumeration of possible security causes. More...
enum  SIPX_MEDIA_EVENT {
  MEDIA_UNKNOWN = 0, MEDIA_LOCAL_START = 50000, MEDIA_LOCAL_STOP, MEDIA_REMOTE_START,
  MEDIA_REMOTE_STOP, MEDIA_REMOTE_SILENT, MEDIA_PLAYFILE_START, MEDIA_PLAYFILE_STOP,
  MEDIA_PLAYBUFFER_START, MEDIA_PLAYBUFFER_STOP, MEDIA_REMOTE_DTMF, MEDIA_DEVICE_FAILURE,
  MEDIA_REMOTE_ACTIVE
}
 Enumeration of possible media events. More...
enum  SIPX_KEEPALIVE_EVENT { KEEPALIVE_START, KEEPALIVE_FEEDBACK, KEEPALIVE_FAILURE, KEEPALIVE_STOP }
 Enumeration of possible KEEPALIVE events (EVENT_CATEGORY_KEEPALIVE). More...
enum  SIPX_KEEPALIVE_CAUSE { KEEPALIVE_CAUSE_NORMAL }
 Enumeration of possible KEEPALIVE cause codes (EVENT_CATEGORY_KEEPALIVE). More...
enum  SIPX_MEDIA_CAUSE {
  MEDIA_CAUSE_NORMAL, MEDIA_CAUSE_HOLD, MEDIA_CAUSE_UNHOLD, MEDIA_CAUSE_FAILED,
  MEDIA_CAUSE_DEVICE_UNAVAILABLE, MEDIA_CAUSE_INCOMPATIBLE, MEDIA_CAUSE_DTMF_START, MEDIA_CAUSE_DTMF_STOP
}
 Enumeration of possible media event causes. More...
enum  SIPX_MEDIA_TYPE { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO }
 Enumeration of possible media event types. More...
enum  SIPX_MESSAGE_STATUS { SIPX_MESSAGE_OK, SIPX_MESSAGE_FAILURE, SIPX_MESSAGE_SERVER_FAILURE, SIPX_MESSAGE_GLOBAL_FAILURE }
 Major classifications of response statuses for a SIP message. More...
enum  SIPX_SUBSCRIPTION_STATE { SIPX_SUBSCRIPTION_PENDING, SIPX_SUBSCRIPTION_ACTIVE, SIPX_SUBSCRIPTION_FAILED, SIPX_SUBSCRIPTION_EXPIRED }
 Enumeration of the possible subscription states visible to the client. More...
enum  SIPX_SUBSCRIPTION_CAUSE { SUBSCRIPTION_CAUSE_UNKNOWN = -1, SUBSCRIPTION_CAUSE_NORMAL }
 Enumeration of cause codes for state subscription state changes. More...

Functions

SIPXTAPI_API SIPX_RESULT sipxDuplicateEvent (SIPX_EVENT_CATEGORY category, const void *pEventSource, void **pEventCopy)
 Duplicate the event information for a sipXtapi event.
SIPXTAPI_API SIPX_RESULT sipxFreeDuplicatedEvent (SIPX_EVENT_CATEGORY category, void *pEventCopy)
 Frees up memory allocated as part of sipxDuplicateEvent.
SIPXTAPI_API SIPX_RESULT sipxEventListenerAdd (const SIPX_INST hInst, SIPX_EVENT_CALLBACK_PROC pCallbackProc, void *pUserData)
 Add a callback/observer for the purpose of receiving sipXtapi events.
SIPXTAPI_API SIPX_RESULT sipxEventListenerRemove (const SIPX_INST hInst, SIPX_EVENT_CALLBACK_PROC pCallbackProc, void *pUserData)
 Remove a sipXtapi event callback/observer.
SIPXTAPI_API char * sipxCallEventToString (SIPX_CALLSTATE_EVENT event, SIPX_CALLSTATE_CAUSE cause, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated call state event ids.
SIPXTAPI_API char * sipxEventToString (const SIPX_EVENT_CATEGORY category, const void *pEvent, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated event.
SIPXTAPI_API char * sipxLineEventToString (SIPX_LINESTATE_EVENT event, SIPX_LINESTATE_CAUSE cause, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated line event ids.
SIPXTAPI_API char * sipxConfigEventToString (SIPX_CONFIG_EVENT event, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated config event.
SIPXTAPI_API char * sipxSubStatusStateToString (SIPX_SUBSCRIPTION_STATE state, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated subscription status state.
SIPXTAPI_API char * sipxSubStatusCauseToString (SIPX_SUBSCRIPTION_CAUSE cause, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated subscription status cause.
SIPXTAPI_API char * sipxSecurityEventToString (SIPX_SECURITY_EVENT event, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated security event.
SIPXTAPI_API char * sipxSecurityCauseToString (SIPX_SECURITY_CAUSE cause, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated security cause.
SIPXTAPI_API char * sipxMediaEventToString (SIPX_MEDIA_EVENT event, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated media event.
SIPXTAPI_API char * sipxMediaCauseToString (SIPX_MEDIA_CAUSE cause, char *szBuffer, size_t nBuffer)
 Create a printable string version of the designated media cause.


Define Documentation

#define VALID_SIPX_EVENT_CATEGORY (  )     (((x) >= EVENT_CATEGORY_CALLSTATE) && ((x) <= EVENT_CATEGORY_KEEPALIVE))

VALID_SIPX_EVENT_CATEGORY utility macro to validate if an event category is valid (within expected range).


Typedef Documentation

typedef bool(SIPX_CALLING_CONVENTION *) SIPX_EVENT_CALLBACK_PROC(SIPX_EVENT_CATEGORY category, void *pInfo, void *pUserData)

Signature for event callback/observer.

Application developers should not block this event callback thread -- You should re-post these events to your own thread context for handling if you require blocking and/or heavy prorcessing. The sipxDuplicateEvent and sipxFreeDuplicatedEvent methods are available to copy the event callback data (The data is only available for the duration of the callback). For example, upon receiving the callback, copy the data using sipxDuplicateEvent(...), post the copied data to your event callback, process it, and lastly free the event data using sipxFreeDuplicatedEvent(...).

The application developer must look at the SIPX_EVENT_CATEGORY and then cast the pInfo method to the appropriate structure:

 EVENT_CATEGORY_CALLSTATE:   pCallInfo = (SIPX_CALLSTATE_INFO*) pInfo ;
 EVENT_CATEGORY_LINESTATE:   pLineInfo = (SIPX_LINESTATE_INFO*) pInfo ;
 EVENT_CATEGORY_INFO_STATUS: pInfoStatus = (SIPX_INFOSTATUS_INFO*) pInfo ;
 EVENT_CATEGORY_INFO:        pInfoInfo = (SIPX_INFO_INFO*) pInfo ;
 EVENT_CATEGORY_SUB_STATUS:  pSubInfo = (SIPX_SUBSTATUS_INFO*) pInfo ;
 EVENT_CATEGORY_NOTIFY:      pNotifyInfo = (SIPX_NOTIFY_INFO*) pInfo ;
 EVENT_CATEGORY_CONFIG:      pConfigInfo - (SIPX_CONFIG_INFO*) pInfo ;
 EVENT_CATEGORY_SECURITY:    pSecInfo = (SIPX_SECURITY_INFO*) pInfo ;
 EVENT_CATEGORY_MEDIA:       pMediaInfo = (SIPX_MEDIA_INFO*) pInfo ;
 

Please see the SIPX_EVENT_CATEGORY and structure definitions for details.

Parameters:
category The category of the event (call, line, subscription, notify, etc.).
pInfo Pointer to the event info structure. Depending on the event type, the application layer needs to cast this parameter to the appropriate structure.
pUserData User data provided when listener was added


Enumeration Type Documentation

enum SIPX_CALLSTATE_CAUSE

Callstate cuase events identify the reason for a Callstate event or provide more detail.

Enumerator:
CALLSTATE_CAUSE_UNKNOWN  Unknown cause.
CALLSTATE_CAUSE_NORMAL  The stage changed due to normal operation.
CALLSTATE_CAUSE_TRANSFERRED  A call is being transferred to this user agent from another user agent.

CALLSTATE_CAUSE_TRANSFER  A call on this user agent is being transferred to another user agent.

CALLSTATE_CAUSE_CONFERENCE  A conference operation caused a stage change.
CALLSTATE_CAUSE_EARLY_MEDIA  The remote party is alerting and providing ringback audio (early media).
CALLSTATE_CAUSE_REQUEST_NOT_ACCEPTED  The callee rejected a request (e.g.

hold)

CALLSTATE_CAUSE_BAD_ADDRESS  The state changed due to a bad address.

This can be caused by a malformed URL or network problems with your DNS server

CALLSTATE_CAUSE_BUSY  The state cahnged because the remote party is busy.
CALLSTATE_CAUSE_RESOURCE_LIMIT  Not enough resources are available to complete the desired operation.
CALLSTATE_CAUSE_NETWORK  A network error caused the desired operation to fail.
CALLSTATE_CAUSE_REDIRECTED  The stage changed due to a redirection of a call.

CALLSTATE_CAUSE_NO_RESPONSE  No response was received from the remote party or network node.

CALLSTATE_CAUSE_AUTH  Unable to authenticate due to either bad or missing credentials.
CALLSTATE_CAUSE_TRANSFER_INITIATED  A transfer attempt has been initiated.

This event is sent when a user agent attempts either a blind or consultative transfer.

CALLSTATE_CAUSE_TRANSFER_ACCEPTED  A transfer attempt has been accepted by the remote transferee.

This event indicates that the transferee supports transfers (REFER method). The event is fired upon a 2xx class response to the SIP REFER request.

CALLSTATE_CAUSE_TRANSFER_TRYING  The transfer target is attempting the transfer.

This event is sent when transfer target (or proxy / B2BUA) receives the call invitation, but before the the tranfer target accepts is.

CALLSTATE_CAUSE_TRANSFER_RINGING  The transfer target is ringing.

This event is generally only sent during blind transfer. Consultative transfer should proceed directly to TRANSFER_SUCCESS or TRANSFER_FAILURE.

CALLSTATE_CAUSE_TRANSFER_SUCCESS  The transfer was completed successfully.

The original call to transfer target will automatically disconnect.

CALLSTATE_CAUSE_TRANSFER_FAILURE  The transfer failed.

After a transfer fails, the application layer is responsible for recovering original call to the transferee. That call is left on hold.

CALLSTATE_CAUSE_REMOTE_SMIME_UNSUPPORTED  Fired if the remote party's user-agent does not support S/MIME.

CALLSTATE_CAUSE_SMIME_FAILURE  Fired if a local S/MIME operation failed.

For more information, applications should process the SECURITY event.

CALLSTATE_CAUSE_SHUTDOWN  The even was fired as part of sipXtapi shutdown.

CALLSTATE_CAUSE_BAD_REFER  An unusable refer was sent to this user-agent.

CALLSTATE_CAUSE_NO_KNOWN_INVITE  This user-agent received a request or response, but there is no known matching invite.

CALLSTATE_CAUSE_BYE_DURING_IDLE  A BYE message was received, however, the call is in in an idle state.

CALLSTATE_CAUSE_UNKNOWN_STATUS_CODE  A response was received with an unknown status code.

CALLSTATE_CAUSE_BAD_REDIRECT  Receive a redirect with NO contact or a RANDOM redirect.

CALLSTATE_CAUSE_TRANSACTION_DOES_NOT_EXIST  No such transaction; Accepting or Rejecting a call that is part of a transfer.

CALLSTATE_CAUSE_CANCEL  The event was fired in response to a cancel attempt from the remote party.

enum SIPX_CALLSTATE_EVENT

Major call state events identify significant changes in the state of a call.

Below you will find state diagrams that show the typical event transitions for both outbound and inbound calls.

callevents_inbound.gif

Figure 1: Event flows for an inbound call (received call)

callevents_outbound.gif

Figure 2: Event flows for an outbound call (placed call)

Enumerator:
CALLSTATE_UNKNOWN  An UNKNOWN event is generated when the state for a call is no longer known.

This is generally an error condition; see the minor event for specific causes.

CALLSTATE_NEWCALL  The NEWCALL event indicates that a new call has been created automatically by the sipXtapi.

This event is most frequently generated in response to an inbound call request.

CALLSTATE_DIALTONE  The DIALTONE event indicates that a new call has been created for the purpose of placing an outbound call.

The application layer should determine if it needs to simulate dial tone for the end user.

CALLSTATE_REMOTE_OFFERING  The REMOTE_OFFERING event indicates that a call setup invitation has been sent to the remote party.

The invitation may or may not every receive a response. If a response is not received in a timely manor, sipXtapi will move the call into a disconnected state. If calling another sipXtapi user agent, the reciprocal state is OFFER.

CALLSTATE_REMOTE_ALERTING  The REMOTE_ALERTING event indicates that a call setup invitation has been accepted and the end user is in the alerting state (ringing).

Depending on the SIP configuration, end points, and proxy servers involved, this event should only last for 3 minutes. Afterwards, the state will automatically move to DISCONNECTED. If calling another sipXtapi user agent, the reciprocate state is ALERTING.

Pay attention to the cause code for this event. If the cause code is "CALLSTATE_CAUSE_EARLY_MEDIA", the remote the party is sending early media (e.g. gateway is producing ringback or audio feedback). In this case, the user agent should not produce local ringback.

CALLSTATE_CONNECTED  The CONNECTED state indicates that call has been setup between the local and remote party.

Network audio should be flowing provided and the microphone and speakers should be engaged.

CALLSTATE_HELD  The BRIDGED state indicates that a call is active, however, the local microphone/speaker are not engaged.

If this call is part of a conference, the party will be able to talk with other BRIDGED conference parties. Application developers can still play and record media.

CALLSTATE_REMOTE_HELD  The HELD state indicates that a call is both locally and remotely held.

No network audio is flowing and the local microphone and speaker are not engaged.

CALLSTATE_DISCONNECTED  The REMOTE_HELD state indicates that the remote party is on hold. The DISCONNECTED state indicates that a call was disconnected or failed to connect.

Locally, the microphone and speaker are still engaged, however, no network audio is flowing. A call may move into the DISCONNECTED states from almost every other state. Please review the DISCONNECTED minor events to understand the cause.

CALLSTATE_OFFERING  An OFFERING state indicates that a new call invitation has been extended this user agent.

Application developers should invoke sipxCallAccept(), sipxCallReject() or sipxCallRedirect() in response. Not responding will result in an implicit call sipXcallReject().

CALLSTATE_ALERTING  An ALERTING state indicates that an inbound call has been accepted and the application layer should alert the end user.

The alerting state is limited to 3 minutes in most configurations; afterwards the call will be canceled. Applications will generally play some sort of ringing tone in response to this event.

CALLSTATE_DESTROYED  The DESTORYED event indicates the underlying resources have been removed for a call.

This is the last event that the application will receive for any call. The call handle is invalid after this event is received.

CALLSTATE_TRANSFER_EVENT  The transfer state indicates a state change in a transfer attempt.

Please see the CALLSTATE_TRANSFER_EVENT cause codes for details on each state transition

enum SIPX_CONFIG_EVENT

Enumeration of possible configuration events.

Enumerator:
CONFIG_UNKNOWN  Unknown configuration event.
CONFIG_STUN_SUCCESS  A STUN binding has been obtained for signaling purposes.

For a SIPX_CONFIG_EVENT type of CONFIG_STUN_SUCCESS, the pData pointer of the info structure will point to a SIPX_CONTACT_ADDRESS structure.

CONFIG_STUN_FAILURE  Unable to obtain a STUN binding for signaling purposes.

enum SIPX_EVENT_CATEGORY

Enum with all of the possible event types.

Enumerator:
EVENT_CATEGORY_CALLSTATE  CALLSTATE events signify a change in state of a call.

States range from the notification of a new call to ringing to connection established to changes in audio state (starting sending, stop sending) to termination of a call.

EVENT_CATEGORY_LINESTATE  LINESTATE events indicate changes in the status of a line appearance.

Lines identify inbound and outbound identities and can be either provisioned (hardcoded) or configured to automatically register with a registrar. Lines also encapsulate the authentication criteria needed for dynamic registrations.

EVENT_CATEGORY_INFO_STATUS  INFO_STATUS events are sent when the application requests sipXtapi to send an INFO message to another user agent.

The status event includes the response for the INFO method. Application developers should look at this event to determine the outcome of the INFO message.

EVENT_CATEGORY_INFO  INFO events are sent to the application whenever an INFO message is received by the sipXtapi user agent.

INFO messages are sent to a specific call. sipXtapi will automatically acknowledges the INFO message at the protocol layer.

EVENT_CATEGORY_SUB_STATUS  SUB_STATUS events are sent to the application layer for information on the subscription state (e.g.

OK, Expired).

EVENT_CATEGORY_NOTIFY  NOTIFY evens are send to the application layer after a remote publisher has sent data to the application.

The application layer can retrieve the data from this event.

EVENT_CATEGORY_CONFIG  CONFIG events signify changes in configuration.

For example, when requesting STUN support, a notification is sent with the STUN outcome (either SUCCESS or FAILURE)

EVENT_CATEGORY_SECURITY  SECURITY events signify occurences in call security processing.

These events are only sent when using S/MIME or TLS.

EVENT_CATEGORY_MEDIA  MEDIA events signify changes in the audio state for sipXtapi or a particular call.

EVENT_CATEGORY_KEEPALIVE  KEEPALIVE events signal when a keepalive is started/stopped/fails.

A feedback event will report back your NAT-mapped IP address in some cases.

See also:
SIPX_KEEPALIVE_TYPE for more information.

enum SIPX_INFOSTATUS_EVENT

Enumeration of possible INFO status events.

Enumerator:
INFOSTATUS_UNKNOWN  This is the initial value for an INFOSTATUS event.

INFOSTATUS_RESPONSE  This event is fired if a response is received after an INFO message has been sent.
INFOSTATUS_NETWORK_ERROR  This event is fired in case a network error was encountered while trying to send an INFO event.

enum SIPX_KEEPALIVE_CAUSE

Enumeration of possible KEEPALIVE cause codes (EVENT_CATEGORY_KEEPALIVE).

enum SIPX_KEEPALIVE_EVENT

Enumeration of possible KEEPALIVE events (EVENT_CATEGORY_KEEPALIVE).

Enumerator:
KEEPALIVE_START  A keepalive attempt has been started.

The developer is responsible for stopping all keepalives. In some cases, keepalives will be automatically stopped -- however do not rely on that.

KEEPALIVE_FEEDBACK  The keepalive process has obtained information regarding your NAT mapped address (or local address).

Feedback events are sent with the mapped address from a STUN transaction or the rport results from a SIP transaction.

KEEPALIVE_FAILURE  FAILURE events are only fired when the physical send fails.

The application developer should stop the keepalive or can monitor the keepalive until the condition changes (lack of failure or feedback event).

KEEPALIVE_STOP  A keepalive process has been stopped.

enum SIPX_LINESTATE_CAUSE

Enumeration of possible linestate Event causes.

Enumerator:
LINESTATE_CAUSE_UNKNOWN  No cause specified.

LINESTATE_REGISTERING_NORMAL  See LINESTATE_REGISTERING event.

LINESTATE_REGISTERED_NORMAL  See LINESTATE_REGISTERED event.

LINESTATE_UNREGISTERING_NORMAL  See LINESTATE_UNREGISTERING event.

LINESTATE_UNREGISTERED_NORMAL  See LINESTATE_UNREGISTERED event.

LINESTATE_REGISTER_FAILED_COULD_NOT_CONNECT  Failed to register because of a connectivity problem.

LINESTATE_REGISTER_FAILED_NOT_AUTHORIZED  Failed to register because of an authorization / authentication failure.

LINESTATE_REGISTER_FAILED_TIMEOUT  Failed to register because of a timeout.

LINESTATE_UNREGISTER_FAILED_COULD_NOT_CONNECT  Failed to unregister because of a connectivity problem.

LINESTATE_UNREGISTER_FAILED_NOT_AUTHORIZED  Failed to unregister because of of an authorization / authentication failure.

LINESTATE_UNREGISTER_FAILED_TIMEOUT  Failed to register because of a timeout.

LINESTATE_PROVISIONED_NORMAL  See LINESTATE_PROVISIONED event.

enum SIPX_LINESTATE_EVENT

Enumeration of possible linestate Events.

lineevents.gif
Enumerator:
LINESTATE_UNKNOWN  This is the initial Line event state.

LINESTATE_REGISTERING  The REGISTERING event is fired when sipXtapi has successfully sent a REGISTER message, but has not yet received a success response from the registrar server.
LINESTATE_REGISTERED  The REGISTERED event is fired after sipXtapi has received a response from the registrar server, indicating a successful registration.

LINESTATE_UNREGISTERING  The UNREGISTERING event is fired when sipXtapi has successfully sent a REGISTER message with an expires=0 parameter, but has not yet received a success response from the registrar server.
LINESTATE_UNREGISTERED  The UNREGISTERED event is fired after sipXtapi has received a response from the registrar server, indicating a successful un-registration.

LINESTATE_REGISTER_FAILED  The REGISTER_FAILED event is fired to indicate a failure of REGISTRATION.

It is fired in the following cases: The client could not connect to the registrar server. The registrar server challenged the client for authentication credentials, and the client failed to supply valid credentials. The registrar server did not generate a success response (status code == 200) within a timeout period.

LINESTATE_UNREGISTER_FAILED  The UNREGISTER_FAILED event is fired to indicate a failure of un-REGISTRATION.

It is fired in the following cases: The client could not connect to the registrar server. The registrar server challenged the client for authentication credentials, and the client failed to supply valid credentials. The registrar server did not generate a success response (status code == 200) within a timeout period.

LINESTATE_PROVISIONED  The PROVISIONED event is fired when a sipXtapi Line is added, and Registration is not requested (i.e.

  • sipxLineAdd is called with a bRegister parameter of false.

enum SIPX_MEDIA_CAUSE

Enumeration of possible media event causes.

Enumerator:
MEDIA_CAUSE_NORMAL  Normal cause; the call was likely torn down.

MEDIA_CAUSE_HOLD  Media state changed due to a local or remote hold operation.
MEDIA_CAUSE_UNHOLD  Media state changed due to a local or remote unhold operation.
MEDIA_CAUSE_FAILED  Media state changed due to an error condition.

MEDIA_CAUSE_DEVICE_UNAVAILABLE  Media state changed due to an error condition, (device was removed, already in use, etc).

MEDIA_CAUSE_INCOMPATIBLE  Incompatible destination -- We were unable to negotiate a codec.
MEDIA_CAUSE_DTMF_START  A DTMF tone has started.
MEDIA_CAUSE_DTMF_STOP  A DTMF tone has stopped.

enum SIPX_MEDIA_EVENT

Enumeration of possible media events.

Enumerator:
MEDIA_UNKNOWN  Unknown or undefined media event, this is generally the sign of an internal error in sipXtapi.
MEDIA_LOCAL_START  Local media (audio or video) is being sent to the remote party.
MEDIA_LOCAL_STOP  Local media (audio or video) is no longer being sent to the remote party.

This may be caused by a local/remote hold operation, call tear down, or error. See the SIPX_MEDIA_CAUSE enumeration for more information.

MEDIA_REMOTE_START  Remote media (audio or video) is ready to be received.

If no audio/video is received for longer then the idle period, a MEDIA_REMOTE_SILENT event will be fired. See sipxConfigSetConnectionIdleTimeout.

MEDIA_REMOTE_STOP  Remote media (audio or video) has been stopped due to a hold or call tear down.

MEDIA_REMOTE_SILENT  Remote media has not been received for some configured period.

This generally indicates a network problem and/or a problem with the remote party. See sipxConfigSetConnectionIdleTimeout for more information.

MEDIA_PLAYFILE_START  A file is being played to local and/or remote parties.

This event will be followed by a MEDIA_PLAYFILE_STOP when the file is manually stopped or finished playing.

MEDIA_PLAYFILE_STOP  A file has completed playing or was aborted.

MEDIA_PLAYBUFFER_START  A buffer is being played to local and/or remote parties.

This event will be followed by a MEDIA_PLAYBUFFER_STOP when the file is manually stopped or finished playing.

MEDIA_PLAYBUFFER_STOP  A buffer has completed playing or was aborted.

MEDIA_REMOTE_DTMF  A dtmf tone was started/stopped, see the cause codes for exact status.
MEDIA_DEVICE_FAILURE  Fired if the media device is not present or already in use.

MEDIA_REMOTE_ACTIVE  Media has been received.

enum SIPX_MEDIA_TYPE

Enumeration of possible media event types.

Today, MEDIA_TYPE_AUDIO and MEDIA_TYPE_VIDEO are supported.

Enumerator:
MEDIA_TYPE_AUDIO  Audio media event type.
MEDIA_TYPE_VIDEO  Video media event type.

enum SIPX_MESSAGE_STATUS

Major classifications of response statuses for a SIP message.

Enumerator:
SIPX_MESSAGE_OK  The message was successfully processed (200).
SIPX_MESSAGE_FAILURE  The server received the message, but could or would not process it.

SIPX_MESSAGE_SERVER_FAILURE  The server encountered an error while trying to process the message.

SIPX_MESSAGE_GLOBAL_FAILURE  Fatal error encountered.

enum SIPX_SECURITY_CAUSE

Enumeration of possible security causes.

Enumerator:
SECURITY_CAUSE_UNKNOWN  An UNKNOWN cause code is generated when the state for the security operation is no longer known.

This is generally an error condition; see the info structure for details.

SECURITY_CAUSE_NORMAL  Event was fired as part of the normal encryption / decryption process.

SECURITY_CAUSE_ENCRYPT_SUCCESS  An S/MIME encryption succeeded.

SECURITY_CAUSE_ENCRYPT_FAILURE_LIB_INIT  An S/MIME encryption failed because the security library could not start.

SECURITY_CAUSE_ENCRYPT_FAILURE_BAD_PUBLIC_KEY  An S/MIME encryption failed because of a bad certificate / public key.

SECURITY_CAUSE_ENCRYPT_FAILURE_INVALID_PARAMETER  An S/MIME encryption failed because of an invalid parameter.

SECURITY_CAUSE_DECRYPT_SUCCESS  An S/MIME decryption succeeded.

SECURITY_CAUSE_DECRYPT_FAILURE_DB_INIT  An S/MIME decryption failed due to a failure to initialize the certificate database.

SECURITY_CAUSE_DECRYPT_FAILURE_BAD_DB_PASSWORD  An S/MIME decryption failed due to an invalid certificate database password.

SECURITY_CAUSE_DECRYPT_FAILURE_INVALID_PARAMETER  An S/MIME decryption failed due to an invalid parameter.

SECURITY_CAUSE_DECRYPT_BAD_SIGNATURE  An S/MIME decryption operation aborted due to a bad signature.

SECURITY_CAUSE_DECRYPT_MISSING_SIGNATURE  An S/MIME decryption operation aborted due to a missing signature.

SECURITY_CAUSE_DECRYPT_SIGNATURE_REJECTED  An S/MIME decryption operation aborted because the signature was rejected.

SECURITY_CAUSE_TLS_SERVER_CERTIFICATE  A TLS server certificate is being presented to the application for possible rejection.

The application must respond to this message. If the application returns false, the certificate is rejected and the call will not complete. If the application returns true, the certificate is accepted.

SECURITY_CAUSE_TLS_BAD_PASSWORD  A TLS operation failed due to a bad password.

SECURITY_CAUSE_TLS_LIBRARY_FAILURE  A TLS operation failed.

SECURITY_CAUSE_REMOTE_HOST_UNREACHABLE  The remote host is not reachable.

SECURITY_CAUSE_TLS_CONNECTION_FAILURE  A TLS connection to the remote party failed.

SECURITY_CAUSE_TLS_HANDSHAKE_FAILURE  A failure occured during the TLS handshake.

SECURITY_CAUSE_SIGNATURE_NOTIFY  The SIGNATURE_NOTIFY event is fired when the user-agent receives a SIP message with signed SMIME as its content.

The signer's certificate will be located in the info structure associated with this event. The application can choose to accept the signature, by returning 'true' in response to this message or can choose to reject the signature by returning 'false' in response to this message.

SECURITY_CAUSE_TLS_CERTIFICATE_REJECTED  < The application has rejected the server's TLS certificate.

enum SIPX_SECURITY_EVENT

Enumeration of possible security events.

Enumerator:
SECURITY_UNKNOWN  An UNKNOWN event is generated when the state for a call is no longer known.

This is generally an error condition; see the minor event for specific causes.

SECURITY_ENCRYPT  The ENCRYPT event indicates that an SMIME encryption has been attempted.

See the cause code for the encryption outcome, and the info structure for more information.

SECURITY_DECRYPT  The DECRYPT event indicates that an SMIME decryption has been attempted.

See the cause code for the encryption outcome, and the info structure for more information.

SECURITY_TLS  TLS related security event.

enum SIPX_SUBSCRIPTION_CAUSE

Enumeration of cause codes for state subscription state changes.

Enumerator:
SUBSCRIPTION_CAUSE_UNKNOWN  No cause specified.

SUBSCRIPTION_CAUSE_NORMAL  Normal cause for state change.

enum SIPX_SUBSCRIPTION_STATE

Enumeration of the possible subscription states visible to the client.

Enumerator:
SIPX_SUBSCRIPTION_PENDING  THe subscription is being set up, but not yet active.

SIPX_SUBSCRIPTION_ACTIVE  The subscription is currently active.

SIPX_SUBSCRIPTION_FAILED  The subscription is not active due to a failure.

SIPX_SUBSCRIPTION_EXPIRED  The subscription's lifetime has expired.


Function Documentation

SIPXTAPI_API char* sipxCallEventToString ( SIPX_CALLSTATE_EVENT  event,
SIPX_CALLSTATE_CAUSE  cause,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated call state event ids.

This is generally used for debugging.

Parameters:
event sipxtapi event code
cause sipxtapi cause event code
szBuffer buffer to store event string
nBuffer length of string buffer szBuffer

SIPXTAPI_API char* sipxConfigEventToString ( SIPX_CONFIG_EVENT  event,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated config event.

This is generally used for debugging.

Parameters:
event Configuration event id
szBuffer Buffer to store event string
nBuffer Length of string buffer szBuffer

SIPXTAPI_API SIPX_RESULT sipxDuplicateEvent ( SIPX_EVENT_CATEGORY  category,
const void *  pEventSource,
void **  pEventCopy 
)

Duplicate the event information for a sipXtapi event.

This method is only needed if you wish to post the event information to another thread context. Once the event has been handle, you must call sipxFreeDuplicatedEvent on the copy to avoid memory leaks.

Parameters:
category Category type supplied by the sipXtapi event callback.
pEventSource Source of event data supplied by the sipXtapi event callback.
pEventCopy New copy of the event data. This data must be freed by calling sipxFreeDuplicatedEvent.

SIPXTAPI_API SIPX_RESULT sipxEventListenerAdd ( const SIPX_INST  hInst,
SIPX_EVENT_CALLBACK_PROC  pCallbackProc,
void *  pUserData 
)

Add a callback/observer for the purpose of receiving sipXtapi events.

Parameters:
hInst Instance pointer obtained by sipxInitialize.
pCallbackProc Function to receive sipx events
pUserData user data passed along with event data

SIPXTAPI_API SIPX_RESULT sipxEventListenerRemove ( const SIPX_INST  hInst,
SIPX_EVENT_CALLBACK_PROC  pCallbackProc,
void *  pUserData 
)

Remove a sipXtapi event callback/observer.

Supply the same pCallbackProc and pUserData values as sipxEventListenerAdd.

Parameters:
hInst Instance pointer obtained by sipxInitialize.
pCallbackProc Function used to receive sipx events
pUserData user data specified as part of sipxListenerAdd

SIPXTAPI_API char* sipxEventToString ( const SIPX_EVENT_CATEGORY  category,
const void *  pEvent,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated event.

This is generally used for debugging.

Parameters:
category Event category code
pEvent Pointer to the Event.
szBuffer buffer to store event string
nBuffer length of string buffer szBuffer

SIPXTAPI_API SIPX_RESULT sipxFreeDuplicatedEvent ( SIPX_EVENT_CATEGORY  category,
void *  pEventCopy 
)

Frees up memory allocated as part of sipxDuplicateEvent.

Do not call this API on pointers received as part of the sipXtapi call back.

Parameters:
category Category type supplied by the sipXtapi event callback.
pEventCopy Copy of event data supplied by sipxDuplicateEvent.

SIPXTAPI_API char* sipxLineEventToString ( SIPX_LINESTATE_EVENT  event,
SIPX_LINESTATE_CAUSE  cause,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated line event ids.

This is generally used for debugging.

Deprecated:
Use sipxEventToString instead.
Parameters:
event major event type id
cause event type id
szBuffer buffer to store event string
nBuffer length of string buffer szBuffer

SIPXTAPI_API char* sipxMediaCauseToString ( SIPX_MEDIA_CAUSE  cause,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated media cause.

This is generally used for debugging.

Parameters:
cause Media cause id
szBuffer Buffer to store cause string
nBuffer Length of string buffer szBuffer

SIPXTAPI_API char* sipxMediaEventToString ( SIPX_MEDIA_EVENT  event,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated media event.

This is generally used for debugging.

Parameters:
event Media event id
szBuffer Buffer to store event string
nBuffer Length of string buffer szBuffer

SIPXTAPI_API char* sipxSecurityCauseToString ( SIPX_SECURITY_CAUSE  cause,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated security cause.

This is generally used for debugging.

Parameters:
cause Security cause id
szBuffer Buffer to store cause string
nBuffer Length of string buffer szBuffer

SIPXTAPI_API char* sipxSecurityEventToString ( SIPX_SECURITY_EVENT  event,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated security event.

This is generally used for debugging.

Parameters:
event Security event id
szBuffer Buffer to store event string
nBuffer Length of string buffer szBuffer

SIPXTAPI_API char* sipxSubStatusCauseToString ( SIPX_SUBSCRIPTION_CAUSE  cause,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated subscription status cause.

This is generally used for debugging.

Parameters:
cause Subscription cause id
szBuffer Buffer to store event string
nBuffer Length of string buffer szBuffer

SIPXTAPI_API char* sipxSubStatusStateToString ( SIPX_SUBSCRIPTION_STATE  state,
char *  szBuffer,
size_t  nBuffer 
)

Create a printable string version of the designated subscription status state.

This is generally used for debugging.

Parameters:
state Subscription state id
szBuffer Buffer to store event string
nBuffer Length of string buffer szBuffer


Generated on Wed Jan 31 22:16:37 2007 for sipXtapi by  doxygen 1.5.1-p1