Signals the far exchange that an incoming call was answered.
DWORD ISUPConnectResp ( CTAHD ctahd, SuId suId, SiInstId suInstId, SiInstId spInstId, CirId circuit, SiConEvnt *conEvnt)
Argument |
Description |
ctahd |
Natural Access handle returned by ctaCreateContext. |
suId |
ISUP service access point. |
suInstId |
Service user instance ID. |
spInstId |
Service provider instance ID. |
circuit |
Circuit with which this message is associated. |
conEvnt |
Pointer to the caller's connect event structure containing all parameters (IEs) included in the ANSWER (CONNECT) message. |
Return value |
Description |
ISUP_SUCCESS |
|
CTAERR_BAD_ARGUMENT |
One or more arguments are invalid. |
CTAERR_DRIVER_SEND_FAILED |
Error occurred accessing the TX driver. |
CTAERR_INVALID_CTAHD |
Natural Access handle is invalid. |
ISUPConnectResp generates an answer (ANM) or connect (ITU-T only) message to the far exchange.
The value specified in suInstId is passed to all subsequent events associated with this connection.
The value for spInstId must be the spInstId value that was received from the ISUP layer in the connect indication event.
<NMSBREAK>
In this example, an incoming call is answered by sending an ANM with ISUPConnectResp.
DWORD status;
SiAllSdus rcvEvent;
IsupRcvInfoBlk rcvInfo;
S16 switchType = ST_ITUWHITE;
status = ISUPRetrieveMessage(ctahd, &rcvEvent, &rcvInfo, 1);
if (status == ISUP_NOMSG)
{
fprintf(stderr, "ISUPRetrieveMessage() did not get a message, probably a
congestion event \n");
return(ISUP_SUCCESS);
}
if (status != ISUP_SUCCESS)
{
fprintf(stderr, "ISUPRetrieveMessage() failed, returned %d\n", status);
return(status);
}
...
...
/*Sending ACM in response to incoming call */
...
...
/* The incoming call is answered by calling ISUPConnectResp */
/* send answer message (ANM) */
ISUPInitANM(switchType, &rcvEvent.m.siConEvnt);
status = ISUPConnectResp(ctahd, rcvInfo.suId, rcvInfo.suInstId, rcvInfo.spInstId,
rcvInfo.circuit, &rcvEvent.m.siConEvnt);
if (status != ISUP_SUCCESS)
printf("term: ISUPConnectResp() failed status = %d\n", status)
else
printf("term: Answer sent for circuit %ld\n", rcvInfo.circuit);