ISUPRawReq

Sends an application-encoded ISUP packet.

Prototype

DWORD ISUPRawReq ( CTAHD ctahd, SuId suId, SiInstId suInstId, SiInstId spInstId, Bool cirSelFlg, CirId circuit, SiRawEvnt *rawEvnt, U8 newState)

Argument

Description

ctahd

Natural Access handle returned by ctaCreateContext.

suId

ISUP service access point.

suInstId

Service user instance ID.

spInstId

Service provider instance ID.

cirSelFlg

Circuit selector flag. This value must always be FALSE.

circuit

Circuit index with which this message is associated.

rawEvnt

Pointer to caller's raw event structure.

newState

New state of circuit.


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

An application can receive unknown message types as raw messages and can send raw messages.

ISUPRawReq enables an application to build its own ISUP packets. The application must encode the entire message starting from the message type field. The ISUP task builds the routing label and places the CIC code on the front of the message. The TX software changes the state of the circuit to reflect that of the newState parameter that has been sent by the application and sends out the message as defined by the application in the raw event structure. Valid newState values are presented in the following table:

Value

Description

RAWST_NOCHANGE (1)

Leaves the circuit in its current state.

RAWST_IDLE (2)

Changes the circuit to not busy.

RAWST_BUSYIN (3)

Changes the circuit state to answered for an inbound call.

RAWST_BUSYOUT (4)

Changes the circuit state to answered for an outbound call.

RAWST_WAITACM (5)

Changes the circuit state to waiting for an ACM, typically after a (non-standard) IAM is sent.


The TX board passes the raw data as a new event type to the application in the new raw event structure, when it receives a message with an unrecognized message type. The first byte the board places in the data area of the new raw message event structure is the message type. For example, the first byte is 0x01 for a traditional IAM packet. This value is not checked by the software and can be any value. The ISUP service does not change the circuit's state based on any of these unknown messages.

Example

#define SAP_ID 0

CTAHD      FstCtaHd = Valid CTA Handle;
DWORD      status;
SiInstId   suInstId = 0;
SiInstId   spInstId = 0; 
SuId       suId = SAP_ID; 
CirId      circuit = 2;
SiAllSdus  sendBuffer;

status = ISUPRawReq( FstCtaHd, suId,  suInstId,  spInstId,  circuit,
    &sendBuffer.m.siRawEvnt);
if( status != ISUP_SUCCESS )
    {
         printf( "ERROR: ISUPRawReq( circuit %d ) failed [%d]", circuit, status );
             return( -1 );
    }