ISUPReleaseResp

Responds to a release indication from a far exchange.

Prototype

DWORD ISUPReleaseResp ( 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 release complete message to the far exchange.


Return values

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.


Details

ISUPReleaseResp sends a release complete message to the far exchange and makes the circuit available for a new connection in the ISUP circuit database.

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>

Example

DWORD status;
SiAllSdus       rcvEvent;
SiAllSdus       sendEvent;
IsupRcvInfoBlk  rcvInfo;

/* 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 EVTSITRELIND:              /* Release indication */
        printf("Release Indication for circuit %ld\n",   rcvInfo.circuit);

        status = ISUPReleaseResp(ctahd, rcvInfo.suId, rcvInfo.suInstId,
            rcvInfo.spInstId, rcvInfo.circuit, &rcvEvent.m.siRelEvnt);
        if (status != ISUP_SUCCESS)
            printf("orig: ISUPReleaseResp() failed status = %d\n", status);
        else
            printf("orig: Release Complete sent for circuit %ld\n", rcvInfo.circuit);
            break;
           
    case EVTSITRELCFM:              /* Release confirmation (release complete) */ 
        ...
        ...

}