Version


Figure 4. isdnSendMessage Data Structures
Figure 5. Receiving Protocol Stack Messages

Figure 6. ACU Data Buffer Components

Figure 7. Supplementary Service Data Structures





Note: The extended data area can be filled only when the rest of the ACU data buffer has been completed. Note: If you are building a Q.SIG application, the PINX node address is specified in your initial call to isdnStartProtocol. For more information, see Section 3.10.
unsigned char *p_ext_data;
Acu_facility_code = ACU_FAC_EXT_SERVICE;This macro need not be set if any other ACU primitive is used.
Acu_ext_descr_offset = Acu_facility_rq_start_ext_data;Note: These macros assume that a pointer, p_data, points to the first character of the buffer.

Acu_ext_ss_build_begin(ACU_OP_ID_DEFLECTION,ACU_OP_TYPE_INVOKE);The macro sets p_ext_data to the beginning of the extended data structure, and stores the service operation type and ID in the service structure header.
struct acu_ss_deflect_invoke
{
struct acu_ext_hdr ext_hdr; /*Extension header */
struct acu_ss_hdr ss_hdr; /*Supp. services header*/
struct acu_address deflect_to; /*No. to direct call to*/
struct acu_ss_association charge_association;/*Optional, used when */
}; /*AOC-E service has been invoked*/
The following line shows how the application would set a pointer to this data structure:DeflectInvoke = (struct acu_ss_deflect_invoke *)p_ext_data; Note: If any optional strings are added, p_end must be adjusted for that string length.
p_end += sizeof(struct acu_ss_deflect_invoke);
Acu_ext_ss_build_end (p_end);p_end is a pointer to the byte after the last byte of the current extended data structure. If this structure includes variable-length data, p_end points to the first byte after the last data element.
This macro calculates the length of the extended data area and of the new supplementary service structure and stores these values in the header. It also counts the number of supplementary service structures in this specification, and stores this value in the header.

char *number;
unsigned char *p_end;
unsigned char *p_ext_data;
unsigned char JoinedConnID;
struct acu_facility *p_data;
struct acu_ss_notify_transfer_invoke *NotifyTransfer;
/* Fill in the fixed portion of the facility message */
p_data = (struct acu_facility *)MsgBuffer; /* Initialize p_data */
/* First zero out the entire buffer */
memset(p_data, OFF, ISDN_BUFFER_DATA_LGTH); /* Zero the structure */
/* Tell the stack we are using supplementary services. Needed only if */
/* supp. service is sent in ACU_FACILITY_RQ. */
Acu_facility_code = ACU_FAC_EXT_SERVICE; /* Supp. service */
/* There is no more to do in the fixed structure except fill in header */
Acu_ext_descr_offset = Acu_facility_start_ext_data;
/* Start supplementary service extended data structure, to invoke */
/* Notify Transfer supplementary service */
Acu_ext_ss_build_begin(ACU_OP_ID_NOTIFY_TRANSFER,ACU_OP_TYPE_INVOKE);
/* Set the structure pointer... */
NotifyTransfer = (struct acu_ss_notify_transfer_invoke *)p_ext_data;
/* Calculate the address of where the data will go... */
p_end += sizeof(struct acu_ss_notify_transfer_invoke);
/* FILL IN THE EXTENDED DATA STRUCTURE... */
/* Some data fields follow */
NotifyTransfer->charge_id.invoke = 0;
NotifyTransfer->call_status = ACU_SS_CALL_STATUS_ANSWERED;
NotifyTransfer->end_designation = ACU_SS_END_DESIGNATION_PRIMARY;
/* Redirecting number information */
NotifyTransfer->redir_nb.invoke = 1;
NotifyTransfer->redir_nb.presentation_restricted = 0;
NotifyTransfer->redir_nb.number_plan = ACU_SS_NUMBER_PLAN_PRIVATE_LEVEL_1_REGIONAL;
NotifyTransfer->redir_nb.screen_ind = ACU_SS_SCREEN_USER_PROV_VERIFIED;
/* Copy in a number to the data area */
number = "1234567"; /* Dummy data */
/*Calculate offset, store length, store the data, advance the pointer */
NotifyTransfer->redir_nb.offset =
(unsigned char)(p_end - (unsigned char*)&NotifyTransfer->redir_nb);
NotifyTransfer->redir_nb.len = strlen(number); /* Length of data */
strcpy((char *)p_end, number); /* Copy extended data */
p_end += strlen(number);
NotifyTransfer->joined_conn_id.board = BoardNumber;
NotifyTransfer->joined_conn_id.nai = NAI;
NotifyTransfer->joined_conn_id.conn_num = JoinedConnID;
/* Field not used in this direction... */
NotifyTransfer->response_rq = 0;
/* No sub-address information. */
NotifyTransfer->redir_sub.invoke = 0;
NotifyTransfer->redir_sub.pad = 0;
NotifyTransfer->redir_sub.type = 0;
NotifyTransfer->redir_sub.odd_even_ind = 0;
NotifyTransfer->redir_sub.offset = 0;
NotifyTransfer->redir_sub.len = 0;
/* Finished with this supp. service */
Acu_ext_ss_build_end(p_end)


p_ext_data = Acu_ext_descr_first_address;

p_ext_data = Acu_ext_descr_next_address;

unsigned char *p_ext_data;
if (Acu_ext_descr_nb > 0)
{
p_ext_data = Acu_ext_descr_first_address;
/* process extended parameters */
for (i = Acu_ext_descr_nb; i > 0; i--)
{
process_acu_ext_element (p_ext_data);
p_ext_data = Acu_ext_descr_next_address;
}
}
void process_acu_ext_element(unsigned char *p_ext_data)
{
if (Acu_ext_id == ACU_EXT_SERVICES)
{
/* We have a parameter containing a service structure*/
....
ProcessAcuExtService (p_ext_data)
}
}
void ProcessAcuExtService(unsigned char *p_ext_data)
{
ushort op_id = Acu_ext_ss_op_id;
ushort op_type = Acu_ext_ss_op_type;
ulong event = (op_id << 16) + op_type;
struct acu_ss_notify_transfer_invoke *Transfer;
struct acu_ss_aoc_inform_invoke *AOC;
switch(event)
{
case (ACU_OP_ID_NOTIFY_TRANSFER << 16) + ACU_OP_TYPE_INVOKE:
{
Transfer = (struct acu_ss_notify_transfer_invoke *)p_ext_data;
...
}
break;
case (ACU_OP_ID_AOC_INFORM << 16) + ACU_OP_TYPE_INVOKE:
{
AOC = (struct acu_ss_aoc_inform_invoke *)p_ext_data;
...
}
break;
}
}






struct acu_ss_reject
{
struct acu_ext_hdr ext_hdr; /* Extension header */
struct acu_ss_hdr ss_hdr; /* Supp. services header */
uchar local_cause; /* From SS_REJECT_LOCAL_ constants */
uchar network_cause; /* From SS_REJECT_NETWORK_constants*/
pad6
};

Version