Clears or denies the establishment of a circuit switched connection.
DWORD ISUPReleaseReq ( CTAHD ctahd, SuId suId, SiInstId suInstId, SiInstId spInstId, CirId circuit, SiRelEvnt *relEvnt)
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. |
relEvnt |
Pointer to the caller's release event structure containing all parameters (IEs) included in the message to the far exchange. |
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. |
ISUPReleaseReq generates a release message to the far exchange.
The value specified in the suInstId field 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>
DWORD status;
SiAllSdus rcvEvent;
SiAllSdus sendEvent;
IsupRcvInfoBlk rcvInfo;
CTAHD ctahd = valid CTA handle;
/* Handling all incoming ISUP messages */
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);
}
/* determine indication/confirmation type received */
switch( rcvInfo.indType )
{
...
...
case EVTSITCONCFM: /* connect confirmation */
printf("orig: Connect Confirmation received for circuit %ld\n", rcvInfo.circuit );
/* Releasing the call */
ISUPInitREL(switchType, &sendEvent.m.siRelEvnt, CCCALLCLR);
status = ISUPReleaseReq(ctahd, rcvInfo.suId, rcvInfo.suInstId, rcvInfo.spInstId,
rcvInfo.circuit, &sendEvent.m.siRelEvnt);
if (status != ISUP_SUCCESS)
printf("orig: ISUPReleaseReq() failed status = %d\n", status);
else
printf("orig: Release sent for circuit %ld\n", rcvInfo.circuit);
break;
case EVTSITRELCFM: /* Release confirmation (release complt) */
...
...
}