[asterisk-commits] dvossel: branch group/aoc r252080 - in /team/group/aoc: include/asterisk/ mai...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 12 14:47:01 CST 2010


Author: dvossel
Date: Fri Mar 12 14:46:57 2010
New Revision: 252080

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=252080
Log:
update to address reviewboard comments

Modified:
    team/group/aoc/include/asterisk/aoc.h
    team/group/aoc/main/aoc.c
    team/group/aoc/main/manager.c
    team/group/aoc/tests/test_aoc.c

Modified: team/group/aoc/include/asterisk/aoc.h
URL: http://svnview.digium.com/svn/asterisk/team/group/aoc/include/asterisk/aoc.h?view=diff&rev=252080&r1=252079&r2=252080
==============================================================================
--- team/group/aoc/include/asterisk/aoc.h (original)
+++ team/group/aoc/include/asterisk/aoc.h Fri Mar 12 14:46:57 2010
@@ -28,28 +28,30 @@
 
 /*! \brief Defines the currency multiplier for an aoc message. */
 enum ast_aoc_currency_multiplier {
-	AOC_MULT_ONETHOUSANDTH = 1,
-	AOC_MULT_ONEHUNDREDTH,
-	AOC_MULT_ONETENTH,
-	AOC_MULT_ONE,
-	AOC_MULT_TEN,
-	AOC_MULT_HUNDRED,
-	AOC_MULT_THOUSAND, /* must remain the last item in enum */
+	AST_AOC_MULT_ONETHOUSANDTH = 1,
+	AST_AOC_MULT_ONEHUNDREDTH,
+	AST_AOC_MULT_ONETENTH,
+	AST_AOC_MULT_ONE,
+	AST_AOC_MULT_TEN,
+	AST_AOC_MULT_HUNDRED,
+	AST_AOC_MULT_THOUSAND,
+	AST_AOC_MULT_NUM_ENTRIES, /* must remain the last item in enum */
 };
 
 /*! \brief Defines the billing id options for an aoc message.
  *  \note  AOC-D is limited to NORMAL, REFERSE_CHARGE, and CREDIT_CARD.
  */
 enum ast_aoc_billing_id {
-	AOC_BILLING_NA = 0,
-	AOC_BILLING_NORMAL,
-	AOC_BILLING_REVERSE_CHARGE,
-	AOC_BILLING_CREDIT_CARD,
-	AOC_BILLING_CALL_FWD_UNCONDITIONAL,
-	AOC_BILLING_CALL_FWD_BUSY,
-	AOC_BILLING_CALL_FWD_NO_REPLY,
-	AOC_BILLING_CALL_DEFLECTION,
-	AOC_BILLING_CALL_TRANSFER, /* must remain last item in enum */
+	AST_AOC_BILLING_NA = 0,
+	AST_AOC_BILLING_NORMAL,
+	AST_AOC_BILLING_REVERSE_CHARGE,
+	AST_AOC_BILLING_CREDIT_CARD,
+	AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL,
+	AST_AOC_BILLING_CALL_FWD_BUSY,
+	AST_AOC_BILLING_CALL_FWD_NO_REPLY,
+	AST_AOC_BILLING_CALL_DEFLECTION,
+	AST_AOC_BILLING_CALL_TRANSFER,
+	AST_AOC_BILLING_NUM_ENTRIES, /* must remain the last item in enum */
 };
 
 enum ast_aoc_type {
@@ -82,13 +84,13 @@
 	unsigned int type; /* 1 - 16 by ETSI standard */
 };
 
-/* \brief AOC Payload Header. Holds all the encoded AOC data to pass on the wire */
+/*! \brief AOC Payload Header. Holds all the encoded AOC data to pass on the wire */
 struct ast_aoc_encoded;
 
-/* \brief Decoded AOC data. This value is used to set all the values in an AOC message before encoding.*/
+/*! \brief Decoded AOC data. This value is used to set all the values in an AOC message before encoding.*/
 struct ast_aoc_decoded;
 
-/* \brief creates a ast_aoc_decode object of a specific message type
+/*! \brief creates a ast_aoc_decode object of a specific message type
  *
  * \param message type AOC-D, AOC-E, or AOC Request
  * \param charge type, this is ignored if message type is not
@@ -105,13 +107,13 @@
 		const enum ast_aoc_request requests);
 
 
-/* \brief free an ast_aoc_decoded object */
+/*! \brief free an ast_aoc_decoded object */
 void *ast_aoc_destroy_decoded(struct ast_aoc_decoded *decoded);
 
-/* \brief free an ast_aoc_encoded object */
+/*! \brief free an ast_aoc_encoded object */
 void *ast_aoc_destroy_encoded(struct ast_aoc_encoded *encoded);
 
-/* \brief decodes an encoded aoc payload.
+/*! \brief decodes an encoded aoc payload.
  *
  * \param ast_aoc_encoded, the encoded payload to decode.
  * \param total size of encoded payload
@@ -121,7 +123,7 @@
  */
 struct ast_aoc_decoded *ast_aoc_decode(struct ast_aoc_encoded *encoded, size_t size);
 
-/* \brief encodes a decoded aoc structure so it can be passed on the wire
+/*! \brief encodes a decoded aoc structure so it can be passed on the wire
  *
  * \param ast_aoc_decoded struct to be encoded
  * \param output parameter representing size of encoded data
@@ -131,7 +133,7 @@
  */
 struct ast_aoc_encoded *ast_aoc_encode(struct ast_aoc_decoded *decoded, size_t *out_size);
 
-/* \brief Sets the type of total for a AOC-D message
+/*! \brief Sets the type of total for a AOC-D message
  *
  * \note If this value is not set, the default for the message is TOTAL
  *
@@ -141,11 +143,11 @@
  */
 int ast_aoc_set_total_type(struct ast_aoc_decoded *decoded, const enum ast_aoc_total_type type);
 
-/* \brief Sets the currency values for a AOC-D or AOC-E message
+/*! \brief Sets the currency values for a AOC-D or AOC-E message
  *
  * \param ast_aoc_decoded struct to set values on
  * \param currency amount REQUIRED
- * \param currency multiplier REQUIRED, 0 or undefined value defaults to AOC_MULT_ONE.
+ * \param currency multiplier REQUIRED, 0 or undefined value defaults to AST_AOC_MULT_ONE.
  * \param currency name OPTIONAL
  *
  * \retval 0 success
@@ -155,7 +157,7 @@
 		const enum ast_aoc_currency_multiplier multiplier,
 		const char *name);
 
-/* \brief Adds a unit entry into the list of units
+/*! \brief Adds a unit entry into the list of units
  *
  * \param ast_aoc_decoded struct to set values on
  * \param number of units
@@ -167,7 +169,7 @@
 		const unsigned int amount,
 		const unsigned int type);
 
-/* \brief set the billing id for a AOC-D or AOC_E message
+/*! \brief set the billing id for a AOC-D or AOC_E message
  *
  * \param ast_aoc_decoded struct to set values on
  * \param billing id
@@ -176,7 +178,7 @@
  */
 int ast_aoc_set_billing_id(struct ast_aoc_decoded *decoded, const enum ast_aoc_billing_id id);
 
-/* \brief set the charging association id for an AOC_E message
+/*! \brief set the charging association id for an AOC_E message
  *
  * \param ast_aoc_decoded struct to set values on
  * \param charging association identifier
@@ -185,7 +187,7 @@
  */
 int ast_aoc_set_association_id(struct ast_aoc_decoded *decoded, const int id);
 
-/* \brief set the charging accociation number for an AOC-E message
+/*! \brief set the charging accociation number for an AOC-E message
  *
  * \param ast_aoc_decoded struct to set values on
  * \param charging association number
@@ -194,49 +196,49 @@
  */
 int ast_aoc_set_association_number(struct ast_aoc_decoded *decoded, const char *num);
 
-/* \brief get the message type, AOC-D, AOC-E, or AOC Request */
+/*! \brief get the message type, AOC-D, AOC-E, or AOC Request */
 enum ast_aoc_type ast_aoc_get_msg_type(struct ast_aoc_decoded *decoded);
 
-/* \brief get the charging type for an AOC-D or AOC-E message */
+/*! \brief get the charging type for an AOC-D or AOC-E message */
 enum ast_aoc_charge_type ast_aoc_get_charge_type(struct ast_aoc_decoded *decoded);
 
-/* \brief get the types of AOC requested for when message type is AOC Request */
+/*! \brief get the types of AOC requested for when message type is AOC Request */
 enum ast_aoc_request ast_aoc_get_request(struct ast_aoc_decoded *decoded);
 
-/* \brief get the type of total for a AOC-D message */
+/*! \brief get the type of total for a AOC-D message */
 enum ast_aoc_total_type ast_aoc_get_total_type(struct ast_aoc_decoded *decoded);
 
-/* \brief get the currency amount for AOC-D and AOC-E messages*/
+/*! \brief get the currency amount for AOC-D and AOC-E messages*/
 unsigned int ast_aoc_get_currency_amount(struct ast_aoc_decoded *decoded);
 
-/* \brief get the number of unit entries for AOC-D and AOC-E messages*/
+/*! \brief get the number of unit entries for AOC-D and AOC-E messages*/
 unsigned int ast_aoc_get_unit_count(struct ast_aoc_decoded *decoded);
 
-/* \brief get a specific unit entry.
+/*! \brief get a specific unit entry.
  * \note This can be used in conjunction with ast_aoc_get_unit_count to create
  *       a unit entry iterator.
  */
 const struct ast_aoc_unit_entry *ast_aoc_get_unit_info(struct ast_aoc_decoded *decoded, unsigned int entry_number);
 
-/* \brief get the currency multiplier for AOC-D and AOC-E messages */
+/*! \brief get the currency multiplier for AOC-D and AOC-E messages */
 enum ast_aoc_currency_multiplier ast_aoc_get_currency_multiplier(struct ast_aoc_decoded *decoded);
 
-/* \brief get the currency multiplier for AOC-D and AOC-E messages in decimal format */
+/*! \brief get the currency multiplier for AOC-D and AOC-E messages in decimal format */
 const char *ast_aoc_get_currency_multiplier_decimal(struct ast_aoc_decoded *decoded);
 
-/* \brief get the currency name for AOC-D and AOC-E messages*/
+/*! \brief get the currency name for AOC-D and AOC-E messages*/
 const char *ast_aoc_get_currency_name(struct ast_aoc_decoded *decoded);
 
-/* \brief get the billing id for AOC-D and AOC-E messages*/
+/*! \brief get the billing id for AOC-D and AOC-E messages*/
 enum ast_aoc_billing_id ast_aoc_get_billing_id(struct ast_aoc_decoded *decoded);
 
-/* \brief get the charging association id for AOC-E messages*/
+/*! \brief get the charging association id for AOC-E messages*/
 int ast_aoc_get_association_id(struct ast_aoc_decoded *decoded);
 
-/* \brief get the charging association number for AOC-E messages*/
+/*! \brief get the charging association number for AOC-E messages*/
 const char *ast_aoc_get_association_number(struct ast_aoc_decoded *decoded);
 
-/* \brief test aoc encode decode routines.
+/*! \brief test aoc encode decode routines.
  * \note  This function verifies that a decoded message matches itself after
  *        the encode decode routine.
  */

Modified: team/group/aoc/main/aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aoc/main/aoc.c?view=diff&rev=252080&r1=252079&r2=252080
==============================================================================
--- team/group/aoc/main/aoc.c (original)
+++ team/group/aoc/main/aoc.c Fri Mar 12 14:46:57 2010
@@ -51,7 +51,7 @@
 
 #define AOC_ENCODE_VERSION 1
 
-#define AOC_CURRENCY_NAME_SIZE (10+1)
+#define AOC_CURRENCY_NAME_SIZE (10 + 1)
 
 /* AOC Payload Header. Holds all the encoded AOC data to pass on the wire */
 struct ast_aoc_encoded {
@@ -184,7 +184,7 @@
 			} else {
 				ast_log(LOG_WARNING, "Recieved invalid currency ie\n");
 			}
-		break;
+			break;
 		case AOC_IE_UNIT:
 			if (len == sizeof(struct aoc_ie_unit)) {
 				struct aoc_ie_unit ie;
@@ -193,7 +193,7 @@
 			} else {
 				ast_log(LOG_WARNING, "Recieved invalid unit ie\n");
 			}
-		break;
+			break;
 		case AOC_IE_BILLING:
 			if (len == sizeof(struct aoc_ie_billing)) {
 				struct aoc_ie_billing ie;
@@ -202,7 +202,7 @@
 			} else {
 				ast_log(LOG_WARNING, "Recieved invalid billing ie\n");
 			}
-		break;
+			break;
 		case AOC_IE_CHARGING_ASSOCIATION:
 			if (len == sizeof(struct aoc_ie_charging_association)) {
 				struct aoc_ie_charging_association ie;
@@ -212,7 +212,7 @@
 			} else {
 				ast_log(LOG_WARNING, "Recieved invalid charging association ie\n");
 			}
-		break;
+			break;
 		default:
 			ast_log(LOG_WARNING, "Unknown AOC Information Element, ignoring.\n");
 		}
@@ -283,8 +283,8 @@
 	int pos;
 };
 
-/* \brief append an AOC information element
- * \note data is expecte to already be in network byte order at this point
+/*! \brief append an AOC information element
+ *  \note data is expecte to already be in network byte order at this point
  */
 static int aoc_append_ie(struct aoc_ie_data *ied, unsigned short ie_id, const void *data, unsigned short datalen)
 {
@@ -468,10 +468,10 @@
 
 	decoded->currency_amount = amount;
 
-	if (multiplier <= AOC_MULT_THOUSAND && multiplier >= AOC_MULT_ONETHOUSANDTH) {
+	if (multiplier && (multiplier < AST_AOC_MULT_NUM_ENTRIES)) {
 		decoded->multiplier = multiplier;
 	} else {
-		decoded->multiplier = AOC_MULT_ONE;
+		decoded->multiplier = AST_AOC_MULT_ONE;
 	}
 
 	return 0;
@@ -491,23 +491,23 @@
 {
 
 	switch (decoded->multiplier) {
-	case AOC_MULT_ONETHOUSANDTH:
+	case AST_AOC_MULT_ONETHOUSANDTH:
 		return "0.001";
-	case AOC_MULT_ONEHUNDREDTH:
+	case AST_AOC_MULT_ONEHUNDREDTH:
 		return "0.01";
-	case AOC_MULT_ONETENTH:
+	case AST_AOC_MULT_ONETENTH:
 		return "0.1";
-	case AOC_MULT_ONE:
+	case AST_AOC_MULT_ONE:
 		return "1.0";
-	case AOC_MULT_TEN:
+	case AST_AOC_MULT_TEN:
 		return "10.0";
-	case AOC_MULT_HUNDRED:
+	case AST_AOC_MULT_HUNDRED:
 		return "100.0";
-	case AOC_MULT_THOUSAND:
+	case AST_AOC_MULT_THOUSAND:
 		return "1000.0";
-	};
-
-	return "1.0";
+	default:
+		return "1.0";
+	}
 }
 
 const char *ast_aoc_get_currency_name(struct ast_aoc_decoded *decoded)
@@ -547,7 +547,7 @@
 
 int ast_aoc_set_billing_id(struct ast_aoc_decoded *decoded, const enum ast_aoc_billing_id id)
 {
-	if ((id > AOC_BILLING_CALL_TRANSFER) || (id < AOC_BILLING_NA)) {
+	if ((id >= AST_AOC_BILLING_NUM_ENTRIES) || (id < AST_AOC_BILLING_NA)) {
 		return -1;
 	}
 

Modified: team/group/aoc/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aoc/main/manager.c?view=diff&rev=252080&r1=252079&r2=252080
==============================================================================
--- team/group/aoc/main/manager.c (original)
+++ team/group/aoc/main/manager.c Fri Mar 12 14:46:57 2010
@@ -3525,9 +3525,9 @@
 
 	enum ast_aoc_type _msgtype;
 	enum ast_aoc_charge_type _chargetype;
-	enum ast_aoc_currency_multiplier _mult = AOC_MULT_ONE;
+	enum ast_aoc_currency_multiplier _mult = AST_AOC_MULT_ONE;
 	enum ast_aoc_total_type _totaltype = AOC_TOTAL;
-	enum ast_aoc_billing_id _billingid = AOC_BILLING_NA;
+	enum ast_aoc_billing_id _billingid = AST_AOC_BILLING_NA;
 	unsigned int _currencyamount = 0;
 	int _association_id = 0;
 	struct ast_channel *chan = NULL;
@@ -3585,19 +3585,19 @@
 			astman_send_error(s, m, "ChargeMultiplier unspecified, ChargeMultiplier is required when ChargeType is Currency.");
 			goto aocmessage_cleanup;
 		} else if (!strcasecmp(mult, "onethousandth")) {
-			_mult = AOC_MULT_ONETHOUSANDTH;
+			_mult = AST_AOC_MULT_ONETHOUSANDTH;
 		} else if (!strcasecmp(mult, "onehundredth")) {
-			_mult = AOC_MULT_ONEHUNDREDTH;
+			_mult = AST_AOC_MULT_ONEHUNDREDTH;
 		} else if (!strcasecmp(mult, "onetenth")) {
-			_mult = AOC_MULT_ONETENTH;
+			_mult = AST_AOC_MULT_ONETENTH;
 		} else if (!strcasecmp(mult, "one")) {
-			_mult = AOC_MULT_ONE;
+			_mult = AST_AOC_MULT_ONE;
 		} else if (!strcasecmp(mult, "ten")) {
-			_mult = AOC_MULT_TEN;
+			_mult = AST_AOC_MULT_TEN;
 		} else if (!strcasecmp(mult, "hundred")) {
-			_mult = AOC_MULT_HUNDRED;
+			_mult = AST_AOC_MULT_HUNDRED;
 		} else if (!strcasecmp(mult, "thousand")) {
-			_mult = AOC_MULT_THOUSAND;
+			_mult = AST_AOC_MULT_THOUSAND;
 		} else {
 			astman_send_error(s, m, "Invalid ChargeMultiplier");
 			goto aocmessage_cleanup;
@@ -3612,11 +3612,11 @@
 		if (ast_strlen_zero(aocdbillingid)) {
 			/* ignore this is optional */
 		} else if (!strcasecmp(aocdbillingid, "Normal")) {
-			_billingid = AOC_BILLING_NORMAL;
+			_billingid = AST_AOC_BILLING_NORMAL;
 		} else if (!strcasecmp(aocdbillingid, "ReverseCharge")) {
-			_billingid = AOC_BILLING_REVERSE_CHARGE;
+			_billingid = AST_AOC_BILLING_REVERSE_CHARGE;
 		} else if (!strcasecmp(aocdbillingid, "CreditCard")) {
-			_billingid = AOC_BILLING_CREDIT_CARD;
+			_billingid = AST_AOC_BILLING_CREDIT_CARD;
 		} else {
 			astman_send_error(s, m, "Invalid AOCDBillingId");
 			goto aocmessage_cleanup;
@@ -3625,21 +3625,21 @@
 		if (ast_strlen_zero(aocebillingid)) {
 			/* ignore this is optional */
 		} else if (!strcasecmp(aocebillingid, "Normal")) {
-			_billingid = AOC_BILLING_NORMAL;
+			_billingid = AST_AOC_BILLING_NORMAL;
 		} else if (!strcasecmp(aocebillingid, "ReverseCharge")) {
-			_billingid = AOC_BILLING_REVERSE_CHARGE;
+			_billingid = AST_AOC_BILLING_REVERSE_CHARGE;
 		} else if (!strcasecmp(aocebillingid, "CreditCard")) {
-			_billingid = AOC_BILLING_CREDIT_CARD;
+			_billingid = AST_AOC_BILLING_CREDIT_CARD;
 		} else if (!strcasecmp(aocebillingid, "CallFwdUnconditional")) {
-			_billingid = AOC_BILLING_CALL_FWD_UNCONDITIONAL;
+			_billingid = AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL;
 		} else if (!strcasecmp(aocebillingid, "CallFwdBusy")) {
-			_billingid = AOC_BILLING_CALL_FWD_BUSY;
+			_billingid = AST_AOC_BILLING_CALL_FWD_BUSY;
 		} else if (!strcasecmp(aocebillingid, "CallFwdNoReply")) {
-			_billingid = AOC_BILLING_CALL_FWD_NO_REPLY;
+			_billingid = AST_AOC_BILLING_CALL_FWD_NO_REPLY;
 		} else if (!strcasecmp(aocebillingid, "CallDeflection")) {
-			_billingid = AOC_BILLING_CALL_DEFLECTION;
+			_billingid = AST_AOC_BILLING_CALL_DEFLECTION;
 		} else if (!strcasecmp(aocebillingid, "CallTransfer")) {
-			_billingid = AOC_BILLING_CALL_TRANSFER;
+			_billingid = AST_AOC_BILLING_CALL_TRANSFER;
 		} else {
 			astman_send_error(s, m, "Invalid AOCEBillingId");
 			goto aocmessage_cleanup;

Modified: team/group/aoc/tests/test_aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aoc/tests/test_aoc.c?view=diff&rev=252080&r1=252079&r2=252080
==============================================================================
--- team/group/aoc/tests/test_aoc.c (original)
+++ team/group/aoc/tests/test_aoc.c Fri Mar 12 14:46:57 2010
@@ -67,8 +67,8 @@
 	}
 
 	/* Add billing id information */
-	if ((ast_aoc_set_billing_id(decoded, AOC_BILLING_NORMAL) ||
-		(ast_aoc_get_billing_id(decoded) != AOC_BILLING_NORMAL))) {
+	if ((ast_aoc_set_billing_id(decoded, AST_AOC_BILLING_NORMAL) ||
+		(ast_aoc_get_billing_id(decoded) != AST_AOC_BILLING_NORMAL))) {
 
 		ast_test_status_update(test, "TEST 1, could not set billing id correctly\n");
 		res = AST_TEST_FAIL;
@@ -77,11 +77,11 @@
 	}
 
 	/* Set currency information, verify results*/
-	if ((ast_aoc_set_currency_info(decoded, 100, AOC_MULT_ONE, "usd")) ||
+	if ((ast_aoc_set_currency_info(decoded, 100, AST_AOC_MULT_ONE, "usd")) ||
 		(ast_aoc_set_total_type(decoded, AOC_SUBTOTAL)) ||
 		(ast_aoc_get_total_type(decoded) != AOC_SUBTOTAL) ||
 		(ast_aoc_get_currency_amount(decoded) != 100) ||
-		(ast_aoc_get_currency_multiplier(decoded) != AOC_MULT_ONE) ||
+		(ast_aoc_get_currency_multiplier(decoded) != AST_AOC_MULT_ONE) ||
 		(strcmp(ast_aoc_get_currency_name(decoded), "usd"))) {
 
 		ast_test_status_update(test, "Test 1: failed to set currency info\n");
@@ -92,9 +92,9 @@
 	/* Set a currency name larger than 10 characters which is the the maximum
 	 * length allowed by the ETSI aoc standard.  The name is expected to truncate
 	 * to 10 characters. */
-	if ((ast_aoc_set_currency_info(decoded, 100, AOC_MULT_ONE, "12345678901234567890")) ||
+	if ((ast_aoc_set_currency_info(decoded, 100, AST_AOC_MULT_ONE, "12345678901234567890")) ||
 		(ast_aoc_get_currency_amount(decoded) != 100) ||
-		(ast_aoc_get_currency_multiplier(decoded) != AOC_MULT_ONE) ||
+		(ast_aoc_get_currency_multiplier(decoded) != AST_AOC_MULT_ONE) ||
 		(strcmp(ast_aoc_get_currency_name(decoded), "1234567890"))) {
 
 		ast_test_status_update(test, "Test 1: failed to set currency info currency name exceeding limit\n");
@@ -171,21 +171,21 @@
 	/* Test every billing id possiblity */
 	{
 		int billid[9] = {
-			AOC_BILLING_NA,
-			AOC_BILLING_NORMAL,
-			AOC_BILLING_REVERSE_CHARGE,
-			AOC_BILLING_CREDIT_CARD,
-			AOC_BILLING_CALL_FWD_UNCONDITIONAL,
-			AOC_BILLING_CALL_FWD_BUSY,
-			AOC_BILLING_CALL_FWD_NO_REPLY,
-			AOC_BILLING_CALL_DEFLECTION,
-			AOC_BILLING_CALL_TRANSFER,
+			AST_AOC_BILLING_NA,
+			AST_AOC_BILLING_NORMAL,
+			AST_AOC_BILLING_REVERSE_CHARGE,
+			AST_AOC_BILLING_CREDIT_CARD,
+			AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL,
+			AST_AOC_BILLING_CALL_FWD_BUSY,
+			AST_AOC_BILLING_CALL_FWD_NO_REPLY,
+			AST_AOC_BILLING_CALL_DEFLECTION,
+			AST_AOC_BILLING_CALL_TRANSFER,
 		};
 		int i;
 
 		/* these should fail */
-		if (!(ast_aoc_set_billing_id(decoded, (AOC_BILLING_NA - 1))) ||
-			!(ast_aoc_set_billing_id(decoded, (AOC_BILLING_CALL_TRANSFER + 1)))) {
+		if (!(ast_aoc_set_billing_id(decoded, (AST_AOC_BILLING_NA - 1))) ||
+			!(ast_aoc_set_billing_id(decoded, (AST_AOC_BILLING_CALL_TRANSFER + 1)))) {
 
 				ast_test_status_update(test, "TEST 2, setting invalid billing id should fail\n");
 				res = AST_TEST_FAIL;




More information about the asterisk-commits mailing list