Skip to main content

Event Handlers

SK400VOP uses callbacks to exchange asynchronous events between the signaling module and the application. A call context accompanies call-related events so the application can correlate events when multiple calls are active.

For normal outgoing-call creation, use ippStartCall(). After that call, the application should process call progress and state changes through the event callback.

Header is authoritative. Event identifiers can vary between SK400VOP releases. Use the constants declared by the headers supplied with your licensed build when an identifier in application code differs from this reference.

Application event-handler callback​

The application implements EVENT_HANDLER_CB to receive asynchronous events from the signaling module.

Include

#include "ippapi.h"

Prototype

typedef void (*EVENT_HANDLER_CB)(
void *iface,
UInt32 event,
UInt32 context,
void *args
);

Parameters

NameDescription
ifaceInterface pointer supplied by the signaling module. It provides the application with the signaling event interface used for follow-on actions. Cast it to the interface type defined by the supplied headers before use.
eventEvent identifier. Common signaling-to-application events are listed below.
contextCall context associated with the event. Preserve it for subsequent operations on the same call.
argsOptional event-specific argument. Its type and validity depend on event.

Returns

None.

Signaling events delivered to the application​

EventArgumentsDescription
SIG2UI_EV_CALL_ESTABLISHEDNoneThe call has been established.
SIG2UI_EV_INCOMING_CALLCaller ID / caller informationA new incoming call has been received.
SIG2UI_EV_ERROREvent-specificAn error occurred while processing a previous request.
SIG2UI_EV_BUSYNoneThe called party or destination reported busy.
SIG2UI_EV_RINGBACKNoneCall setup is in progress and ringback has been reported.
SIG2UI_EV_HANGUPNoneThe remote party terminated the call.
SIG2UI_EV_REGISTEREDNoneRegistration with the configured server completed successfully.
SIG2UI_EV_DEREGISTEREDNoneThe registration was removed or expired.
SIG2UI_EV_END_SESSIONNoneThe call session is no longer valid and should be released by the application.
SIG2UI_EV_IM*Pointer to message dataAn incoming instant message was received.

* Older copies of this documentation showed this identifier as SIG2UI_EV__IM. Verify the exact spelling in the ippapi.h supplied with your build before changing existing application code.

Signaling event interface​

The signaling module provides an event interface to the application. The interface is passed through the first parameter of the application callback.

A representative declaration is:

typedef struct ipp_interface_t {
UInt32 (*eventHandler)(UInt32 event, UInt32 *context, void *args);
} IPPInterface, *pIPPInterface;

The exact declaration in the supplied header should be used when compiling an application.

Callback prototype

UInt32 (*eventHandler)(UInt32 event, UInt32 *context, void *args);

Parameters

NameDescription
eventApplication-to-signaling event identifier.
contextPointer to the call context to which the event applies. Some operations may update or consume the context according to the event contract.
argsOptional event-specific argument.

Returns

UInt32. The exact success/error values are defined by the SK400VOP headers and event implementation for the supplied build.

Application events delivered to signaling​

EventArgumentsDescription
UI2SIG_EV_NEWCalled number / URIRequests creation of a new outgoing call. Prefer ippStartCall() for normal application use.
UI2SIG_EV_HANGUPNoneTerminates the call identified by the supplied context.
UI2SIG_EV_ANSWERNoneAccepts an incoming call.
UI2SIG_EV_REJECTNoneRejects an incoming call.
UI2SIG_EV_START_VOICENoneStarts media streaming for a newly accepted call.
UI2SIG_EV_HOLDNonePlaces the specified call on hold. Media streaming is paused.
UI2SIG_EV_UNHOLDNoneRemoves the specified call from hold.
UI2SIG_EV_SEND_DTMFDTMF-specific argumentSends a DTMF digit or event for the specified call.
UI2SIG_EV_SEND_IMMessage dataSends an instant message.

Context-handling rule​

Treat the call context as opaque application state owned by the signaling integration contract. Store it with the application's call object and pass it back unchanged unless the specific API or event contract explicitly states otherwise.