Retrieves the next message from the ISUP layer.
DWORD ISUPRetrieveMessage ( CTAHD ctahd, SiAllSdus *event, IsupRcvInfoBlk *infoBlk, Bool wait)
Argument |
Description |
ctahd |
Natural Access handle returned by ctaCreateContext. |
event |
Pointer to the address of the caller's event buffer where the received event (if any) is returned to the caller. This buffer must be large enough to accommodate any of the events, as defined by the SiAllSdus structure (union of all event structures). The actual event structure returned (which member of the union) depends on the value of the infoBlk.indType field returned. Refer to the Details section for a list of possible values. |
infoBlk |
Pointer to the address of the caller's receive information block where information regarding the received event (if any) is returned to the caller. typedef struct rcvInfoBlk |
wait |
Not used. |
Return value |
Description |
ISUP_SUCCESS |
|
ISUP_NOMSG |
No event messages waiting. |
ISUP_RESOURCES |
Message buffer could not be allocated. |
ISUPRetrieveMessage receives events (messages) from the ISUP layer.
When a message is received, ISUPRetrieveMessage copies the event to the caller's event buffer and performs any necessary byte order translation to convert to the host's native byte ordering. Information about the event is returned to the caller in the infoBlk parameter.
The indication type (indType) identifies the event received and is coded to one of the following values:
EVTSITCNSTIND |
0x5A |
Connection status indication |
EVTSITCONCFM |
0x0D |
Connect confirm |
EVTSITCONIND |
0x0E |
Connect indication |
EVTSITDATIND |
0x16 |
Data indication |
EVTSITFACIND |
0x6A |
Call facility indication |
EVTSITRELCFM |
0x5D |
Connection release confirmation |
EVTSITRELIND |
0x5E |
Connection release indication |
EVTSITRESMIND |
0x36 |
Call resume indication |
EVTSITSTAIND |
0x7A |
Status indication |
EVTSITSUSPIND |
0x3A |
Call suspend indication |
The following NTT-specific value can be received in the evntType member of the IsupRcvInfoBlk for indType equal to EVTSITCNSTIND:
CHARGE Charge Message
The evntType field identifies the actual message received for connection status, status, and facility indications. It is coded to a value in the following tables:
Value |
Description |
ADDRCMPLT |
Address complete |
FRWDTRSFR |
Forward transfer |
IDENTREQ |
Identification request |
IDENTRSP |
Identification response |
INFORMATION |
Information (response to INFORMATREQ) |
INFORMATREQ |
Information request |
MODCMPLT |
Call modification complete |
MODIFY |
Call modification request |
MODREJ |
Call modification rejected |
NETRESMGR |
Network resource manager |
PROGRESS |
Call progress information |
SUBSADDR |
Subsequent address message |
Value |
Description |
CIRBLKREQ |
Circuit block request (not supported in BICC) |
CIRBLKRSP |
Circuit block response (not supported in BICC) |
CIRGRPBLKREQ |
Circuit group block request |
CIRGRPBLKRSP |
Circuit group block response |
CIRGRPGET |
Circuit group get status |
CIRGRPQRYRSP |
Circuit group query response |
CIRGRPRESACK |
Circuit group reset acknowledgment |
CIRGRPSET |
Circuit group set status |
CIRGRPUNBLKREQ |
Circuit group unblock request (not supported in BICC) |
CIRGRPUNBLKRSP |
Circuit group unblock response (not supported in BICC) |
CIRRESERVE |
Circuit reservation request |
CIRRESERVEACK |
Circuit reservation acknowledgment |
CIRRESREQ |
Circuit reset request |
CIRUNBLKREQ |
Circuit unblock request |
CIRUNBLKRSP |
Circuit unblock response |
CIRUNEQPD |
Circuit unequipped indication |
CONFUSION |
Confusion indication |
CONTCHK |
Continuity check (not supported in BICC) |
CONTREP |
Continuity report |
ERRORIND |
Error indication |
LOOPBCKACK |
Loop back acknowledgment (not supported in BICC) |
MTPBACKUP |
BACKUP received from MTP |
MTPCONGEST |
Congestion indication received from MTP |
MTPPAUSE |
Pause indication received from MTP |
MTPPRIMARY |
PRIMARY received from MTP |
MTPRESUME |
Resume indication received from MTP |
MTPSTANDALONE |
STANDALONE received from MTP |
MTPSTOPCONGEST |
Stop congestion indication received from MTP |
REATTEMPT |
Reattempt indication |
RMTUSRAVAIL |
Remote user available |
RMTUSRUNAVAIL |
Remote user unavailable |
STPCONTIN |
Stop continuity indication |
Value |
Description |
FACILITY |
Facility |
FACILITYACC |
Facility accept |
FACILITYDEACT |
Facility deactivate |
FACILITYINFO |
Facility information |
FACILITYREJ |
Facility reject |
FACILITYREQ |
Facility request |
The application must save the service provider instance ID (spInstId) field from the first event received from ISUP for each connection and use it in subsequent requests associated with that connection.
The event structure associated with a received message depends on the type of message received from the ISUP layer (as determined by the value of the infoBlk.indType field).
Indication type |
Event structure employed |
EVTSITCONCFM |
|
EVTSITCONIND |
|
EVTSITCNSTIND |
|
EVTSITDATIND |
|
EVTSITFACCFM |
|
EVTSITFACIND |
|
EVTSITRAWIND |
|
EVTSITRELCFM |
|
EVTSITRELIND |
|
EVTSITRESMIND |
|
EVTSITSTAIND |
|
EVTSITSUSPIND |
<NMSBREAK>
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) */
...
...
}