Skip to main content

Event Handlers

Signaling and application implement event handler callbacks to process eventsfrom each other. Application implemented callback is provided tosignaling in configuration structure passed to ippInitMessaging().

Please note that an outgoing call should be initiated using functionalinterface i.e. ippStartCall(). All subsequent events shall bereported to application by calling application callback. All reportedevents are accompanied by call context making it possible to maintainstates of multiple calls.

Eventhandler callback implemented by application

This callback should be implemented by application to listen toasynchronous events from signaling module.

Include

ippapi.h

Prototype

typedefvoid (*EVENT_HANDLER_CB)(void *iface, UInt32 event, UInt32 context,void *args)

Parameters

iface: Pointer to structure containing pointer to callbacks

to process application events. Should be type casted

to pIPPConfig to report events to signaling callback

event: Event to report (see below for event details)

context: Callcontext the event should be processed in

args: Eventspecific parameters

Returns

None

Signaling events (to application)

Event typeArgumentsDescription
SIG2UI_EV_CALL_ESTABLISHEDNoneCall is established
SIG2UI_EV_INCOMING_CALLCaller IDNew incoming call
SIG2UI_EV_ERRORNoneError in response to a previous request
SIG2UI_EV_BUSYNoneCalled number is busy
SIG2UI_EV_RINGBACKNoneCall in progress
SIG2UI_EV_HANGUPNoneRemote party hungup
SIG2UI_EV_REGISTEREDNoneRegistered with server
SIG2UI_EV_DEREGISTEREDNoneDe-registered from server
SIG2UI_EV_END_SESSIONNoneCall session is not longer valid
SIG2UI_EV__IMPointer to message stringIncoming instance message (IM)

Eventhandler callback implemented by signaling

The callback is implemented by signaling and passed on to application infirst parameter to application callback invocation which is datastructure of following type:

typedefstruct ipp\_interface\_t {

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

} IPPInterface, \*pIPPInterface;

Include

ippapi.h

Prototype

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

Parameters

event: Event to report (see below for event details)

context: Call context the event should be processed in

args: Event specific parameters

Returns

None

Application events (to signaling)

Event typeArgumentsDescription
UI2SIG_EV_NEWCalled number/URITo initiate a new call. ippStartCall() prefered instead
UI2SIG_EV_HANGUPNoneHangup call on a specified context
UI2SIG_EV_ANSWERNoneIncoming call has been accepted
UI2SIG_EV_REJECTNoneIncoming call has been rejected
UI2SIG_EV_START_VOICENoneStart media streaming for a newly accepted call
UI2SIG_EV_HOLDNonePut specified call on hold (media streaming will pause)
UI2SIG_EV_UNHOLDNoneTake a call out of hold
UI2SIG_EV_SEND_DTMFNoneSend DTMF digit
UI2SIG_EV_SEND_IMNoneSend instance message