[libpri-commits] rmudgett: branch group/ccss r1303 - /team/group/ccss/

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Nov 12 12:52:04 CST 2009


Author: rmudgett
Date: Thu Nov 12 12:52:00 2009
New Revision: 1303

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1303
Log:
Remove partial Q.SIG call completion code.

Will reimplement using the new API later.

Modified:
    team/group/ccss/libpri.h
    team/group/ccss/pri.c
    team/group/ccss/pri_facility.c
    team/group/ccss/pri_facility.h
    team/group/ccss/pri_internal.h
    team/group/ccss/q931.c

Modified: team/group/ccss/libpri.h
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/libpri.h?view=diff&rev=1303&r1=1302&r2=1303
==============================================================================
--- team/group/ccss/libpri.h (original)
+++ team/group/ccss/libpri.h Thu Nov 12 12:52:00 2009
@@ -354,12 +354,6 @@
 #define PRI_NSF_ATT_MULTIQUEST         0xF0
 #define PRI_NSF_CALL_REDIRECTION_SERVICE       0xF7
 
-/* BUGBUG eliminate these defines ECMA 186 */
-#define PRI_CC_CCNRREQUEST		27
-#define PRI_CC_CANCEL			28
-#define PRI_CC_RINGOUT			31
-#define PRI_CC_CCBSREQUEST		40
-
 typedef struct q931_call q931_call;
 
 /* Name character set enumeration values */
@@ -515,28 +509,6 @@
 	int subscription_option;
 	/*! Invocation ID to use when sending a reply to the call rerouting/deflection request. */
 	int invoke_id;
-};
-
-/* BUGBUG eliminate this struct definition. */
-/* Structures for qsig_cc_facilities */
-struct pri_qsig_cc_extension {
-	int	cc_extension_tag;
-	char extension[256];
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_qsig_cc_optional_arg {
-	char number_A[256];
-	char number_B[256];
-	int	service;
-	struct pri_qsig_cc_extension cc_extension;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_qsig_cc_request_res {
-	int	no_path_reservation;
-	int	retain_service;
-	struct pri_qsig_cc_extension cc_extension;
 };
 
 /* Subcommands derived from supplementary services. */
@@ -659,55 +631,6 @@
 	 * \note Use pri_facility_error2str() to convert the error_code.
 	 */
 	int error_code;
-};
-
-/* BUGBUG eliminate the following defines */
-#define PRI_SUBCMD_CC_CCBSREQUEST_RR	93
-#define PRI_SUBCMD_CC_CCNRREQUEST_RR	94
-#define PRI_SUBCMD_CC_CANCEL_INV		95
-#define PRI_SUBCMD_CC_EXECPOSSIBLE_INV	96
-#define PRI_SUBCMD_CC_RINGOUT_INV		97
-#define PRI_SUBCMD_CC_SUSPEND_INV		98
-#define PRI_SUBCMD_CC_ERROR				99
-
-/* BUGBUG eliminate the following defines */
-#define PRI_CCERROR_UNSPECIFIED				1008
-#define PRI_CCERROR_REMOTE_USER_BUSY_AGAIN	1012
-#define PRI_CCERROR_FAILURE_TO_MATCH		1013
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_ccbs_rr {
-	struct pri_qsig_cc_request_res cc_request_res;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_ccnr_rr {
-	struct pri_qsig_cc_request_res cc_request_res;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_cancel_inv {
-	struct pri_qsig_cc_optional_arg	cc_optional_arg;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_execpossible_inv {
-	struct pri_qsig_cc_optional_arg	cc_optional_arg;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_suspend_inv {
-	struct pri_qsig_cc_extension cc_extension;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_ringout_inv {
-	struct pri_qsig_cc_extension cc_extension;
-};
-
-/* BUGBUG eliminate this struct definition. */
-struct pri_subcmd_cc_error {
-	int	error_value;
 };
 
 struct pri_subcommand {
@@ -731,15 +654,6 @@
 		struct pri_subcmd_cc_id cc_call;
 		struct pri_subcmd_cc_id cc_cancel;
 		struct pri_subcmd_cc_deactivate_rsp cc_deactivate_rsp;
-
-/* BUGBUG eliminate these struct members. */
-		struct pri_subcmd_cc_ccbs_rr cc_ccbs_rr;
-		struct pri_subcmd_cc_ccnr_rr cc_ccnr_rr;
-		struct pri_subcmd_cc_cancel_inv cc_cancel_inv;
-		struct pri_subcmd_cc_execpossible_inv cc_execpossible_inv;
-		struct pri_subcmd_cc_suspend_inv cc_suspend_inv;
-		struct pri_subcmd_cc_ringout_inv cc_ringout_inv;
-		struct pri_subcmd_cc_error cc_error;
 	} u;
 };
 
@@ -1160,15 +1074,6 @@
 /* Create a new call */
 q931_call *pri_new_call(struct pri *pri);
 
-/* BUGBUG eliminate this prototype. */
-q931_call *pri_new_nochannel_call(struct pri *pri, int *cr);
-
-/* BUGBUG eliminate this prototype. */
-q931_call *pri_find_call(struct pri *pri, int cr);
-
-/* BUGBUG eliminate this prototype. */
-void pri_call_set_cc_operation(q931_call *call, int cc_operation);
-
 /*!
  * \brief Deterimine if the given call control pointer is a dummy call.
  *
@@ -1254,11 +1159,6 @@
  * \return Nothing
  */
 void pri_sr_set_keypad_digits(struct pri_sr *sr, const char *keypad_digits);
-
-/* BUGBUG eliminate this prototype. */
-int pri_sr_set_ccringout(struct pri_sr *sr, int ccringout);
-/* BUGBUG eliminate this prototype. */
-int pri_sr_set_ccbsnr(struct pri_sr *sr, int ccbsnr);
 
 #define PRI_USER_USER_TX
 /* Set the user user field.  Warning!  don't send binary data accross this field */

Modified: team/group/ccss/pri.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri.c?view=diff&rev=1303&r1=1302&r2=1303
==============================================================================
--- team/group/ccss/pri.c (original)
+++ team/group/ccss/pri.c Thu Nov 12 12:52:00 2009
@@ -1070,17 +1070,6 @@
 	return q931_new_call(pri);
 }
 
-q931_call *pri_new_nochannel_call(struct pri *pri, int *cr)
-{
-	q931_call *call;
-	if (!pri)
-		return NULL;
-	call = q931_new_call(pri);
-	if (cr)
-		*cr = call->cr;
-	return call;
-}
-
 int pri_is_dummy_call(q931_call *call)
 {
 	if (!call) {
@@ -1311,8 +1300,6 @@
 #endif
 	unsigned idx;
 	unsigned long switch_bit;
-	q931_call *cur;
-	struct pri *master;
 
 	if (!ctrl) {
 		return NULL;
@@ -1366,66 +1353,13 @@
 		}
 	}
 
-	/* Find the master  - He has the call pool */
-	if (ctrl->master) {
-		master = ctrl->master;
-	} else {
-		master = ctrl;
-	}
-
-	idx = 0;
-	cur = *master->callpool;
-	while (cur) {
-		if (cur->cctimer2) {
-			struct timeval tv;
-			int time_sec_to_go;
-			int time_to_go_min;
-			int time_to_go_sec;
-
-			gettimeofday(&tv, NULL);
-			time_sec_to_go = ctrl->pri_sched[cur->cctimer2].when.tv_sec - tv.tv_sec;
-			if (time_sec_to_go < 0) {
-				time_sec_to_go = 0;
-			}
-			time_to_go_min = time_sec_to_go / 60;
-			time_to_go_sec = time_sec_to_go % 60;
-
-			used = pri_snprintf(buf, used, buf_size,
-				"%u. Active Q.931 Call: %p cr=%d: (%dmin %dsec)\n", ++idx, cur, cur->cr,
-				time_to_go_min, time_to_go_sec);
-		} else {
-			used = pri_snprintf(buf, used, buf_size, "%u. Active Q.931 Call: %p cr=%d\n",
-				++idx, cur, cur->cr);
-		}
-		cur = cur->next;
-	}
+/* BUGBUG add display of active call completion information. */
 
 	if (buf_size < used) {
 		pri_message(ctrl,
 			"pri_dump_info_str(): Produced output exceeded buffer capacity. (Truncated)\n");
 	}
 	return buf;
-}
-
-q931_call *pri_find_call(struct pri *pri, int cr)
-{
-	q931_call *cur;
-	struct pri *master;
-
-	/* Find the master  - He has the call pool */
-	if (pri->master)
-		master = pri->master;
-	else
-		master = pri;
-	
-	cur = *master->callpool;
-	while(cur) {
-		if (cur->cr == cr)
-			return cur;
-		cur = cur->next;
-	}
-
-	return NULL;
 }
 
 int pri_get_crv(struct pri *pri, q931_call *call, int *callmode)
@@ -1686,23 +1620,6 @@
 	return send_reroute_request(ctrl, call, caller_id, &reroute, subscription_option);
 }
 
-int pri_sr_set_ccringout(struct pri_sr *sr, int ccringout)
-{
-	sr->ccringout = ccringout;
-	return 0;
-}
-
-int pri_sr_set_ccbsnr(struct pri_sr *sr, int ccbsnr)
-{
-	sr->ccbsnr = ccbsnr;
-	return 0;
-}
-
-void pri_call_set_cc_operation(q931_call *call, int cc_operation)
-{
-	call->ccoperation = cc_operation;
-}
-
 void pri_cc_enable(struct pri *ctrl, int enable)
 {
 	ctrl = PRI_MASTER(ctrl);

Modified: team/group/ccss/pri_facility.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_facility.c?view=diff&rev=1303&r1=1302&r2=1303
==============================================================================
--- team/group/ccss/pri_facility.c (original)
+++ team/group/ccss/pri_facility.c Thu Nov 12 12:52:00 2009
@@ -2698,80 +2698,6 @@
 	return pri_call_apdu_queue(call, messagetype, buffer, end - buffer);
 }
 
-/* ===== Begin Call Completion Supplementary Service (ETS 300 366/ECMA 186) ===== */
-
-/*!
- * \internal
- * \brief Encode the Q.SIG CCExtension invoke message.
- *
- * \param ctrl D channel controller for diagnostic messages or global options.
- * \param pos Starting position to encode the facility ie contents.
- * \param end End of facility ie contents encoding data buffer.
- * \param operation Call-Completion operation to generate.
- *
- * \retval Start of the next ASN.1 component to encode on success.
- * \retval NULL on error.
- */
-static unsigned char *enc_qsig_CCExtension_invoke(struct pri *ctrl, unsigned char *pos,
-	unsigned char *end, enum rose_operation operation)
-{
-	struct fac_extension_header header;
-	struct rose_msg_invoke msg;
-
-	memset(&header, 0, sizeof(header));
-	header.nfe_present = 1;
-	header.nfe.source_entity = 0;	/* endPINX */
-	header.nfe.destination_entity = 0;	/* endPINX */
-	header.interpretation_present = 1;
-	header.interpretation = 0;	/* discardAnyUnrecognisedInvokePdu */
-	pos = facility_encode_header(ctrl, pos, end, &header);
-	if (!pos) {
-		return NULL;
-	}
-
-	memset(&msg, 0, sizeof(msg));
-	msg.operation = operation;
-	msg.invoke_id = get_invokeid(ctrl);
-	pos = rose_encode_invoke(ctrl, pos, end, &msg);
-
-	return pos;
-}
-
-/*!
- * \brief Encode and queue CcRingout or CcCancel.
- *
- * \param ctrl D channel controller for diagnostic messages or global options.
- * \param call Call leg from which to encode message.
- * \param messagetype Q.931 message type the facility will go out on.
- *
- * \retval 0 on success.
- * \retval -1 on error.
- */
-int add_qsigCcInv_facility_ie(struct pri *ctrl, q931_call *call, int messagetype)
-{
-	unsigned char buffer[256];
-	unsigned char *end;
-	enum rose_operation operation;
-
-	switch (call->ccoperation) {
-	case PRI_CC_RINGOUT:
-		operation = ROSE_QSIG_CcRingout;
-		break;
-	case PRI_CC_CANCEL:
-		operation = ROSE_QSIG_CcCancel;
-		break;
-	default:
-		return -1;
-	}
-	end = enc_qsig_CCExtension_invoke(ctrl, buffer, buffer + sizeof(buffer), operation);
-	if (!end) {
-		return -1;
-	}
-
-	return pri_call_apdu_queue(call, messagetype, buffer, end - buffer);
-}
-/* ===== End Call Completion Supplementary Service (ETS 300 366/ECMA 186) ===== */
-
 /*!
  * \brief Put the APDU on the call queue.
  *
@@ -2844,104 +2770,6 @@
 	return 0;
 }
 
-/* ===== Begin Call Completion Supplementary Service (ETS 300 366/ECMA 186) ===== */
-
-/*!
- * \internal
- * \brief Encode the Q.SIG CCRequestArg invoke message.
- *
- * \param ctrl D channel controller for diagnostic messages or global options.
- * \param pos Starting position to encode the facility ie contents.
- * \param end End of facility ie contents encoding data buffer.
- * \param call Call leg from which to encode request.
- * \param cc_request Call-Completion request operation to generate.
- *
- * \retval Start of the next ASN.1 component to encode on success.
- * \retval NULL on error.
- */
-static unsigned char *enc_qsig_CCRequestArg(struct pri *ctrl, unsigned char *pos,
-	unsigned char *end, q931_call *call, enum rose_operation cc_request)
-{
-	struct fac_extension_header header;
-	struct rose_msg_invoke msg;
-
-	static const unsigned char q931ie[] = {
-		0x04,	/* Bearer Capability IE */
-		0x03,	/* len */
-		0x80,	/* ETSI Standard, Speech */
-		0x90,	/* circuit mode, 64kbit/s */
-		0xa3,	/* level 1 protocol, a-law */
-	};
-
-	memset(&header, 0, sizeof(header));
-	header.nfe_present = 1;
-	header.nfe.source_entity = 0;	/* endPINX */
-	header.nfe.destination_entity = 0;	/* endPINX */
-	header.interpretation_present = 1;
-	header.interpretation = 2;	/* rejectAnyUnrecognisedInvokePdu */
-	pos = facility_encode_header(ctrl, pos, end, &header);
-	if (!pos) {
-		return NULL;
-	}
-
-	memset(&msg, 0, sizeof(msg));
-	msg.operation = cc_request;
-	msg.invoke_id = get_invokeid(ctrl);
-
-	/* numberA is the local_id.number */
-	q931_copy_presented_number_unscreened_to_rose(ctrl,
-		&msg.args.qsig.CcbsRequest.number_a, &call->local_id.number);
-
-	/* numberB is the called.number */
-	q931_copy_number_to_rose(ctrl, &msg.args.qsig.CcbsRequest.number_b,
-		&call->called.number);
-
-	msg.args.qsig.CcbsRequest.q931ie.length = sizeof(q931ie);
-	memcpy(msg.args.qsig.CcbsRequest.q931ie_contents, q931ie, sizeof(q931ie));
-
-	msg.args.qsig.CcbsRequest.can_retain_service = 0;	/* FALSE */
-	msg.args.qsig.CcbsRequest.retain_sig_connection_present = 1;
-	msg.args.qsig.CcbsRequest.retain_sig_connection = 1;	/* TRUE */
-
-	pos = rose_encode_invoke(ctrl, pos, end, &msg);
-
-	return pos;
-}
-
-/*!
- * \brief Encode and queue CcbsRequest or CcnrRequest.
- *
- * \param ctrl D channel controller for diagnostic messages or global options.
- * \param call Call leg from which to encode request.
- *
- * \retval 0 on success.
- * \retval -1 on error.
- */
-static int add_qsigCcRequestArg_facility_ie(struct pri *ctrl, q931_call *call)
-{
-	unsigned char buffer[256];
-	unsigned char *end;
-	enum rose_operation operation;
-
-	switch (call->ccoperation) {
-	case PRI_CC_CCBSREQUEST:
-		operation = ROSE_QSIG_CcbsRequest;
-		break;
-	case PRI_CC_CCNRREQUEST:
-		operation = ROSE_QSIG_CcnrRequest;
-		break;
-	default:
-		return -1;
-	}
-	end = enc_qsig_CCRequestArg(ctrl, buffer, buffer + sizeof(buffer), call, operation);
-	if (!end) {
-		return -1;
-	}
-
-	return pri_call_apdu_queue(call, Q931_SETUP, buffer, end - buffer);
-}
-/* ===== End Call Completion Supplementary Service (ETS 300 366/ECMA 186) ===== */
-
 /*! \note Only called when sending the SETUP message. */
 int pri_call_add_standard_apdus(struct pri *ctrl, q931_call *call)
 {
@@ -2979,21 +2807,6 @@
 			call->redirecting.state = Q931_REDIRECTING_STATE_EXPECTING_RX_DIV_LEG_3;
 		}
 		add_callername_facility_ies(ctrl, call, 1);
-		if (call->ccoperation) {
-			switch (call->ccoperation) {
-			case 0:
-				break;
-			case PRI_CC_CCBSREQUEST:
-			case PRI_CC_CCNRREQUEST:
-				add_qsigCcRequestArg_facility_ie(ctrl, call);
-				break;
-			case PRI_CC_RINGOUT:
-				add_qsigCcInv_facility_ie(ctrl, call, Q931_SETUP);
-				break;
-			default:
-				break;
-			}
-		}
 		break;
 	case PRI_SWITCH_NI2:
 		add_callername_facility_ies(ctrl, call, (ctrl->localtype == PRI_CPE));
@@ -3483,21 +3296,6 @@
 	const struct fac_extension_header *header, const struct rose_msg_error *error)
 {
 	const char *dms100_operation;
-	struct pri_subcommand *subcmd;
-
-	switch (ctrl->switchtype) {
-	case PRI_SWITCH_QSIG:
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
-			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
-			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CC_ERROR;
-		subcmd->u.cc_error.error_value = PRI_CCERROR_UNSPECIFIED;
-		break;
-	default:
-		break;
-	}
 
 	pri_error(ctrl, "ROSE RETURN ERROR:\n");
 	switch (ctrl->switchtype) {
@@ -3540,8 +3338,6 @@
 void rose_handle_result(struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie,
 	const struct fac_extension_header *header, const struct rose_msg_result *result)
 {
-	struct pri_subcommand *subcmd;
-
 	switch (ctrl->switchtype) {
 	case PRI_SWITCH_DMS100:
 		switch (result->invoke_id) {
@@ -3661,33 +3457,11 @@
 	case ROSE_QSIG_CallRerouting:
 		/* Successfully completed call rerouting.  Nothing to do. */
 		break;
+#if 0	/* Not handled yet */
 	case ROSE_QSIG_CcbsRequest:
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
-			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
-			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CC_CCBSREQUEST_RR;
-		subcmd->u.cc_ccbs_rr.cc_request_res.no_path_reservation =
-			result->args.qsig.CcbsRequest.no_path_reservation;
-		subcmd->u.cc_ccbs_rr.cc_request_res.retain_service =
-			result->args.qsig.CcbsRequest.retain_service;
-		subcmd->u.cc_ccbs_rr.cc_request_res.cc_extension.cc_extension_tag = 0;
 		break;
 	case ROSE_QSIG_CcnrRequest:
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
-			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
-			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CC_CCNRREQUEST_RR;
-		subcmd->u.cc_ccnr_rr.cc_request_res.no_path_reservation =
-			result->args.qsig.CcnrRequest.no_path_reservation;
-		subcmd->u.cc_ccnr_rr.cc_request_res.retain_service =
-			result->args.qsig.CcnrRequest.retain_service;
-		subcmd->u.cc_ccnr_rr.cc_request_res.cc_extension.cc_extension_tag = 0;
-		break;
-#if 0	/* Not handled yet */
+		break;
 	case ROSE_QSIG_CcPathReserve:
 		break;
 #endif	/* Not handled yet */
@@ -4515,59 +4289,14 @@
 		break;
 	case ROSE_QSIG_CcnrRequest:
 		break;
-#endif	/* Not handled yet */
 	case ROSE_QSIG_CcCancel:
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
-			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
-			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CC_CANCEL_INV;
-		subcmd->u.cc_cancel_inv.cc_optional_arg.number_A[0] = '\0';
-		subcmd->u.cc_cancel_inv.cc_optional_arg.number_B[0] = '\0';
-		subcmd->u.cc_cancel_inv.cc_optional_arg.cc_extension.cc_extension_tag = 0;
-		if (invoke->args.qsig.CcCancel.full_arg_present) {
-			libpri_copy_string(subcmd->u.cc_cancel_inv.cc_optional_arg.number_A,
-				(char *) invoke->args.qsig.CcCancel.number_a.str,
-				sizeof(subcmd->u.cc_cancel_inv.cc_optional_arg.number_A));
-			libpri_copy_string(subcmd->u.cc_cancel_inv.cc_optional_arg.number_B,
-				(char *) invoke->args.qsig.CcCancel.number_b.str,
-				sizeof(subcmd->u.cc_cancel_inv.cc_optional_arg.number_B));
-		}
 		break;
 	case ROSE_QSIG_CcExecPossible:
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
-			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
-			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CC_EXECPOSSIBLE_INV;
-		subcmd->u.cc_execpossible_inv.cc_optional_arg.number_A[0] = '\0';
-		subcmd->u.cc_execpossible_inv.cc_optional_arg.number_B[0] = '\0';
-		subcmd->u.cc_execpossible_inv.cc_optional_arg.cc_extension.cc_extension_tag = 0;
-		if (invoke->args.qsig.CcExecPossible.full_arg_present) {
-			libpri_copy_string(subcmd->u.cc_execpossible_inv.cc_optional_arg.number_A,
-				(char *) invoke->args.qsig.CcExecPossible.number_a.str,
-				sizeof(subcmd->u.cc_execpossible_inv.cc_optional_arg.number_A));
-			libpri_copy_string(subcmd->u.cc_execpossible_inv.cc_optional_arg.number_B,
-				(char *) invoke->args.qsig.CcExecPossible.number_b.str,
-				sizeof(subcmd->u.cc_execpossible_inv.cc_optional_arg.number_B));
-		}
-		break;
-#if 0	/* Not handled yet */
+		break;
 	case ROSE_QSIG_CcPathReserve:
 		break;
-#endif	/* Not handled yet */
 	case ROSE_QSIG_CcRingout:
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
-			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
-			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CC_RINGOUT_INV;
-		subcmd->u.cc_ringout_inv.cc_extension.cc_extension_tag = 0;
-		break;
-#if 0	/* Not handled yet */
+		break;
 	case ROSE_QSIG_CcSuspend:
 		break;
 	case ROSE_QSIG_CcResume:

Modified: team/group/ccss/pri_facility.h
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_facility.h?view=diff&rev=1303&r1=1302&r2=1303
==============================================================================
--- team/group/ccss/pri_facility.h (original)
+++ team/group/ccss/pri_facility.h Thu Nov 12 12:52:00 2009
@@ -97,8 +97,6 @@
 /* Adds the "standard" APDUs to a call */
 int pri_call_add_standard_apdus(struct pri *pri, q931_call *call);
 
-int add_qsigCcInv_facility_ie(struct pri *pri, q931_call *c, int messagetype);
-
 void asn1_dump(struct pri *ctrl, const unsigned char *start_asn1, const unsigned char *end);
 
 /* Forward declare some ROSE structures for the following prototypes */

Modified: team/group/ccss/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_internal.h?view=diff&rev=1303&r1=1302&r2=1303
==============================================================================
--- team/group/ccss/pri_internal.h (original)
+++ team/group/ccss/pri_internal.h Thu Nov 12 12:52:00 2009
@@ -336,10 +336,6 @@
 	const char *keypad_digits;
 	int transferable;
 	int reversecharge;
-
-/* BUGBUG these CC elements will not be retained. */
-	int ccbsnr;
-	int ccringout;
 };
 
 /* Internal switch types */
@@ -549,11 +545,6 @@
 	/* These valid in master call only */
 	struct q931_call *subcalls[Q931_MAX_TEI];
 	int pri_winner;
-
-/* BUGBUG These CC elements will not be retained. (At least in this form) */
-	int ccoperation;		/* QSIG_CCBSREQUEST/QSIG_CCNRREQUEST */
-	int ccrequestresult;
-	int cctimer2;			/* Timer for QSIG-timer2 */
 
 	/* Call completion */
 	struct {

Modified: team/group/ccss/q931.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/q931.c?view=diff&rev=1303&r1=1302&r2=1303
==============================================================================
--- team/group/ccss/q931.c (original)
+++ team/group/ccss/q931.c Thu Nov 12 12:52:00 2009
@@ -4506,18 +4506,6 @@
 	q931_release(ctrl, c, PRI_CAUSE_NORMAL_CLEARING);
 }
 
-static void pri_cctimer2_timeout(void *data)
-{
-	int cause = 16;
-	struct q931_call *c = data;
-	struct pri *ctrl = c->pri;
-	if (ctrl->debug & PRI_DEBUG_Q931_STATE)
-		pri_message(ctrl, "Timed out no-channel call\n");
-	c->ccoperation = PRI_CC_CANCEL;
-	/* normal clear cause */
-	q931_hangup(ctrl, c, cause);
-}
-
 static int connect_ies[] = {
 	Q931_CHANNEL_IDENT,
 	Q931_IE_FACILITY,
@@ -4826,11 +4814,6 @@
 
 	c->reversecharge = req->reversecharge;
 
-	if (req->ccringout)
-		c->ccoperation = PRI_CC_RINGOUT;
-	if (req->ccbsnr)
-		c->ccoperation = req->ccbsnr;
-
 	pri_call_add_standard_apdus(ctrl, c);
 
 	/* Save the initial cc-parties. */
@@ -5437,15 +5420,6 @@
 	}
 	if (c->cis_call) {
 		disconnect = 0;
-
-		if (c->ccoperation == PRI_CC_CANCEL) {
-			add_qsigCcInv_facility_ie(ctrl, c, Q931_RELEASE);
-		}
-		if (c->cctimer2) {
-			pri_schedule_del(ctrl, c->cctimer2);
-			c->cctimer2 = 0;
-			pri_message(ctrl, "NEW_HANGUP DEBUG: stop CC-Timer2\n");
-		}
 	}
 
 	c->hangupinitiated = 1;
@@ -5700,8 +5674,6 @@
 		c->reversecharge = -1;
 		/* Fall through */
 	case Q931_CONNECT:
-		c->ccrequestresult = 0;
-		/* Fall through */
 	case Q931_ALERTING:
 	case Q931_PROGRESS:
 		c->useruserinfo[0] = '\0';
@@ -6816,11 +6788,6 @@
 			if (subcmd) {
 				subcmd->cmd = PRI_SUBCMD_CONNECTED_LINE;
 				q931_party_id_copy_to_pri(&subcmd->u.connected_line.id, &c->remote_id);
-			}
-
-			if (c->cis_call && c->ccrequestresult) {
-				pri_message(ctrl, "Q931_CONNECT: start CC-Timer2\n");
-				c->cctimer2 = pri_schedule_event(ctrl, ctrl->timers[PRI_TIMER_QSIG_CCBS_T2], pri_cctimer2_timeout, c);
 			}
 
 			return Q931_RES_HAVEEVENT;




More information about the libpri-commits mailing list