Hi,
I am initializing the event listener using the
sipxEventListenerAdd(sipXinstance, SipCallbackProc, NULL);
In my call back function, I am trying to filter the Line State Events:
bool SipXConnector::SipCallbackProc(SIPX_EVENT_CATEGORY eventCategory, void* pInfo, void* pUserData)
{
switch (eventCategory)
{
case EVENT_CATEGORY_LINESTATE:
return SipXConnector::getInstance()->HandleLineStateEvent((SIPX_LINESTATE_INFO*)pInfo);
default:
return false;
}
return true;
}
bool SipXConnector::HandleLineStateEvent(const SIPX_LINESTATE_INFO* pLineInfo)
{
switch(pLineInfo->event)
{
case LINESTATE_PROVISIONED:
break;
case LINESTATE_PROVISIONED_NORMAL:
break;
case LINESTATE_REGISTERED:
break;
case LINESTATE_REGISTERED_NORMAL:
break;
case LINESTATE_UNREGISTERED:
case LINESTATE_UNREGISTER_FAILED:
UnRegister();
break;
}
return true;
}
The problem I am facing is in the HandleLineStateEvent method above.
The pLineInfo object does not show the event and the cause (the breakpoints on the case statements do not hit due to this), but shows the rest of the data, although the SIP extension gets registered successfully on the server.
I am not sure what I am missing here. Please enlighten!
Thanks!