dec_ie_progress(proceeding->PROGRESS, (Q931_info_t *)proceeding, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing PROCEEDING Msg\n");
#endif
}
enc_ie_progress(&proceeding->PROGRESS, msg, 0, nt?1:5, 8, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building PROCEEDING Msg\n");
#endif
return msg;
dec_ie_progress(alerting->PROGRESS, (Q931_info_t *)alerting, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing ALERTING Msg\n");
#endif
if (nt)
enc_ie_progress(&alerting->PROGRESS, msg, 0, nt?1:5, 8, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building ALERTING Msg\n");
#endif
return msg;
dec_ie_progress(progress->PROGRESS, (Q931_info_t *)progress, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing PROGRESS Msg\n");
#endif
}
progress=(PROGRESS_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building PROGRESS Msg\n");
#endif
return msg;
SETUP_t *setup= (SETUP_t*)((unsigned long)msg->data+HEADER_LEN);
Q931_info_t *qi=(Q931_info_t*)((unsigned long)msg->data+HEADER_LEN);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing SETUP Msg\n");
#endif
{
enc_ie_complete(&setup->BEARER,msg, bc->sending_complete, nt, bc);
}
-#if DEBUG
+#ifdef DEBUG
printf("Building SETUP Msg\n");
#endif
return msg;
cb_log(1,bc->port,"CONNETED PN: %s cpn_dialplan:%d\n", connected_pn, type);
*/
-#if DEBUG
+#ifdef DEBUG
printf("Parsing CONNECT Msg\n");
#endif
}
enc_ie_connected_pn(&connect->CONNECT_PN, msg, type,plan, present, screen, bc->cad, nt , bc);
}
-#if DEBUG
+#ifdef DEBUG
printf("Building CONNECT Msg\n");
#endif
return msg;
}
dec_ie_progress(setup_acknowledge->PROGRESS, (Q931_info_t *)setup_acknowledge, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing SETUP_ACKNOWLEDGE Msg\n");
#endif
if (nt)
enc_ie_progress(&setup_acknowledge->PROGRESS, msg, 0, nt?1:5, 8, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building SETUP_ACKNOWLEDGE Msg\n");
#endif
return msg;
static void parse_connect_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing CONNECT_ACKNOWLEDGE Msg\n");
#endif
enc_ie_channel_id(&connect_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building CONNECT_ACKNOWLEDGE Msg\n");
#endif
return msg;
static void parse_user_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing USER_INFORMATION Msg\n");
#endif
user_information=(USER_INFORMATION_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building USER_INFORMATION Msg\n");
#endif
return msg;
static void parse_suspend_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing SUSPEND_REJECT Msg\n");
#endif
suspend_reject=(SUSPEND_REJECT_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building SUSPEND_REJECT Msg\n");
#endif
return msg;
static void parse_resume_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RESUME_REJECT Msg\n");
#endif
resume_reject=(RESUME_REJECT_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building RESUME_REJECT Msg\n");
#endif
return msg;
static void parse_hold (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing HOLD Msg\n");
#endif
hold=(HOLD_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building HOLD Msg\n");
#endif
return msg;
static void parse_suspend (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing SUSPEND Msg\n");
#endif
suspend=(SUSPEND_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building SUSPEND Msg\n");
#endif
return msg;
static void parse_resume (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RESUME Msg\n");
#endif
resume=(RESUME_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building RESUME Msg\n");
#endif
return msg;
static void parse_hold_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing HOLD_ACKNOWLEDGE Msg\n");
#endif
hold_acknowledge=(HOLD_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building HOLD_ACKNOWLEDGE Msg\n");
#endif
return msg;
static void parse_suspend_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing SUSPEND_ACKNOWLEDGE Msg\n");
#endif
suspend_acknowledge=(SUSPEND_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building SUSPEND_ACKNOWLEDGE Msg\n");
#endif
return msg;
static void parse_resume_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RESUME_ACKNOWLEDGE Msg\n");
#endif
resume_acknowledge=(RESUME_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building RESUME_ACKNOWLEDGE Msg\n");
#endif
return msg;
static void parse_hold_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing HOLD_REJECT Msg\n");
#endif
hold_reject=(HOLD_REJECT_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building HOLD_REJECT Msg\n");
#endif
return msg;
static void parse_retrieve (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RETRIEVE Msg\n");
#endif
retrieve=(RETRIEVE_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building RETRIEVE Msg\n");
#endif
return msg;
static void parse_retrieve_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RETRIEVE_ACKNOWLEDGE Msg\n");
#endif
retrieve_acknowledge=(RETRIEVE_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
enc_ie_channel_id(&retrieve_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building RETRIEVE_ACKNOWLEDGE Msg\n");
#endif
return msg;
static void parse_retrieve_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RETRIEVE_REJECT Msg\n");
#endif
retrieve_reject=(RETRIEVE_REJECT_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building RETRIEVE_REJECT Msg\n");
#endif
return msg;
if (cause>0) bc->cause=cause;
dec_ie_progress(disconnect->PROGRESS, (Q931_info_t *)disconnect, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing DISCONNECT Msg\n");
#endif
enc_ie_cause(&disconnect->CAUSE, msg, (nt)?1:0, bc->out_cause,nt,bc);
if (nt) enc_ie_progress(&disconnect->PROGRESS, msg, 0, nt?1:5, 8 ,nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building DISCONNECT Msg\n");
#endif
return msg;
struct misdn_stack *stack=get_stack_by_bc(bc);
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RESTART Msg\n");
#endif
restart=(RESTART_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building RESTART Msg\n");
#endif
return msg;
dec_ie_cause(release->CAUSE, (Q931_info_t *)(release), &location, &cause, nt,bc);
if (cause>0) bc->cause=cause;
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RELEASE Msg\n");
#endif
if (bc->out_cause>= 0)
enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building RELEASE Msg\n");
#endif
return msg;
dec_ie_cause(release_complete->CAUSE, (Q931_info_t *)(release_complete), &location, &cause, nt,bc);
if (cause>0) bc->cause=cause;
-#if DEBUG
+#ifdef DEBUG
printf("Parsing RELEASE_COMPLETE Msg\n");
#endif
}
enc_ie_cause(&release_complete->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
-#if DEBUG
+#ifdef DEBUG
printf("Building RELEASE_COMPLETE Msg\n");
#endif
return msg;
unsigned char *p = NULL;
int err;
-#if DEBUG
+#ifdef DEBUG
printf("Parsing FACILITY Msg\n");
#endif
FACILITY_t *facility = (FACILITY_t*)(msg->data+HEADER_LEN);
Q931_info_t *qi;
-#if DEBUG
+#ifdef DEBUG
printf("Building FACILITY Msg\n");
#endif
static void parse_notify (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing NOTIFY Msg\n");
#endif
}
notify=(NOTIFY_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building NOTIFY Msg\n");
#endif
return msg;
static void parse_status_enquiry (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing STATUS_ENQUIRY Msg\n");
#endif
}
status_enquiry=(STATUS_ENQUIRY_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building STATUS_ENQUIRY Msg\n");
#endif
return msg;
strcpy(bc->info_dad, number);
strcpy(bc->keypad,keypad);
}
-#if DEBUG
+#ifdef DEBUG
printf("Parsing INFORMATION Msg\n");
#endif
}
}
}
-#if DEBUG
+#ifdef DEBUG
printf("Building INFORMATION Msg\n");
#endif
return msg;
if (cause>0) bc->cause=cause;
;
-#if DEBUG
+#ifdef DEBUG
printf("Parsing STATUS Msg\n");
#endif
}
status=(STATUS_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building STATUS Msg\n");
#endif
return msg;
static void parse_timeout (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
{
-#if DEBUG
+#ifdef DEBUG
printf("Parsing STATUS Msg\n");
#endif
}
status=(STATUS_t*)((msg->data+HEADER_LEN));
-#if DEBUG
+#ifdef DEBUG
printf("Building STATUS Msg\n");
#endif
return msg;