Dialogic Dialogic Global Call IP IP Phone User Manual


 
The GC_PARM_BLK associated with Extension event will contain a parameter element as
follows:
ID IPSET_MSG_SIP
ID IPPARM_MSGTYPE
and one of the following values:
IP_MSGTYPE_SIP_INFO_OK
IP_MSGTYPE_SIP_INFO_FAILED
The application can also retrieve the specific SIP response code from the Extension event’s
parameter block using the IPSET_MSG_SIP parameter set ID and the parameter ID
IPPARM_MSG_SIP_RESPONSE_CODE.
The application must retrieve the necessary SIP message header information by copying it into its
own buffer before the next call to . Once the next call is
issued, the header information is no longer available from the metaevent buffer.
The following code snippet illustrates the procedure for extracting the INFO response information
from an Extension event.
// An outbound SIP INFO request has been sent previously
// expect an inbound SIP INFO response
switch(metaeventp->evttype)
{
case GCEV_EXTENSION:
while ((parmp = gc_util_next_parm(pParmBlock,parmp)) != 0)
{
switch (parmp->set_ID)
{
// Handle SIP message information
case IPSET_MSG_SIP:
switch (parmp->parm_ID)
{
// determine message type
case IPPARM_MSGTYPE:
MessType = (int)(*(parmp->value_buf));
switch (MessType)
{
case IP_MSGTYPE_SIP_INFO_OK:
// process INFO response
break;
case IP_MSGTYPE_SIP_INFO_FAILED:
// process INFO response
break;
}
break;
// get the SIP response code
case IPPARM_MSG_SIP_RESPONSE_CODE:
ResponseCode = (int)(*(parmp->value_buf));
break;
}
break;
}
}
break;
}