h324UserIndication

Sends a user indication (UII H.245) message to the terminal.

Prototype

DWORD h324UserIndication ( MSPHD msphd, H324_USER_INPUT_INDICATION *msg)

Argument

Description

msphd

MSPP handle associated with the MUX endpoint.

msg

Pointer to the H324_USER_INPUT_INDICATION structure that defines the user input indication message to send:

typedef struct tag_H324_USER_INPUT_INDICATION
{
   char     data[H324_MAX_USER_INDICATION_SIZE];
   DWORD    length;
   char     szObjectId[H324_MAX_UII_OBJECT_ID_SIZE];
   DWORD    msgType;
} H324_USER_INPUT_INDICATION;

For information about the fields in this structure, see H324_USER_INPUT_INDICATION.

Return values

Return value

Description

SUCCESS

 

CTAERR_NOT_FOUND

msphd was not found. Neither h324Start nor h324Delete were called.

H324ERR_INTERNAL_ERROR

Internal error in the 3G-324M Middleware.

H324ERR_MUTEX_LOCK_FAILED

Internal error trying to lock mutex.

H324ERR_NOT_INITIALIZED

h324Initialize was not called first.

Events

None.

Details

The user input indication message type can be defined by setting field values as follows:

For this type of message...

Do the following...

Alphanumeric

Set the msgType field to H324_USER_INPUT_ALPHANUMERIC.

Set the szObjectID field to 0 (zero).

Non-standard

Set the msgType field to H324_USER_INPUT_NONSTANDARD.

Copy a zero terminated string into szObjectID to set the objectidentifier. This string is a dot-separated number sequence, such as:

1.2.123.2345.5.73

Signal

Set the msgType field to H324_USER_INPUT_SIGNAL.

Set the szObjectID field to 0 (zero).

The size for H324_MAX_USER_INDICATION_SIZE = 512. The size for H324_MAX_UII_OBJECT_ID_SIZE = 128.

Example

// sends “1234” alphanumeric string to the remote terminal
l_UII.length = 4;
l_UII.msgType = H324_USER_INPUT_ALPHANUMERIC;
l_UII.szObjectId[0] = 0;
strcpy( l_UII.data, "1234");
printf("UII length: %d\n", l_UII.length );
ret = h324UserIndication( GwConfig[Port].MuxEp.hd, &l_UII );
if( ret != SUCCESS )
    printf("Failed to send the alphanumeric UII message...\n");