[svn-commits] dvossel: branch dvossel/generic_aoc r253798 - /team/dvossel/generic_aoc/chann...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 22 14:38:14 CDT 2010


Author: dvossel
Date: Mon Mar 22 14:38:10 2010
New Revision: 253798

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253798
Log:
chan_dahdi A() dialstring option for requesting Advice of Charge on dial.

Modified:
    team/dvossel/generic_aoc/channels/sig_pri.c

Modified: team/dvossel/generic_aoc/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/channels/sig_pri.c?view=diff&rev=253798&r1=253797&r2=253798
==============================================================================
--- team/dvossel/generic_aoc/channels/sig_pri.c (original)
+++ team/dvossel/generic_aoc/channels/sig_pri.c Mon Mar 22 14:38:10 2010
@@ -3467,6 +3467,12 @@
 			}
 			break;
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
+#if defined(HAVE_PRI_AOC_EVENTS)
+		case PRI_SUBCMD_AOC_CHARGING_REQUEST:
+			/* TODO XXX received charing request information, how do we handle this?*/
+			break;
+#endif	/* defined(HAVE_PRI_AOC_EVENTS) */
+
 		default:
 			ast_debug(2,
 				"Unknown call subcommand(%d) in %s event on channel %d/%d on span %d.\n",
@@ -5252,10 +5258,11 @@
 enum SIG_PRI_CALL_OPT_FLAGS {
 	OPT_KEYPAD =         (1 << 0),
 	OPT_REVERSE_CHARGE = (1 << 1),	/* Collect call */
+	OPT_AOC_REQUEST =    (1 << 2),	/* AOC Request */
 };
 enum SIG_PRI_CALL_OPT_ARGS {
 	OPT_ARG_KEYPAD = 0,
-
+	OPT_ARG_AOC_REQUEST,
 	/* note: this entry _MUST_ be the last one in the enum */
 	OPT_ARG_ARRAY_SIZE,
 };
@@ -5263,6 +5270,7 @@
 AST_APP_OPTIONS(sig_pri_call_opts, BEGIN_OPTIONS
 	AST_APP_OPTION_ARG('K', OPT_KEYPAD, OPT_ARG_KEYPAD),
 	AST_APP_OPTION('R', OPT_REVERSE_CHARGE),
+	AST_APP_OPTION_ARG('A', OPT_AOC_REQUEST, OPT_ARG_AOC_REQUEST),
 END_OPTIONS);
 
 /*! \note Parsing must remain in sync with sig_pri_extract_called_num_subaddr(). */
@@ -5466,6 +5474,22 @@
 		}
 		c++;
 	}
+
+#if defined(HAVE_PRI_AOC_EVENTS)
+	if (ast_test_flag(&opts, OPT_AOC_REQUEST)
+		&& !ast_strlen_zero(opt_args[OPT_ARG_AOC_REQUEST])) {
+		if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 's')) {
+			pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_S);
+		}
+		if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 'd')) {
+			pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_D);
+		}
+		if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 'e')) {
+			pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_E);
+		}
+	}
+#endif
+
 #if defined(HAVE_PRI_SETUP_KEYPAD)
 	if (ast_test_flag(&opts, OPT_KEYPAD)
 		&& !ast_strlen_zero(opt_args[OPT_ARG_KEYPAD])) {
@@ -5805,6 +5829,7 @@
 					sig_pri_aoce_from_ast(p, chan, decoded);
 					break;
 				case AST_AOC_REQUEST:
+					/* TODO XXX do we pass through requests? */
 				default:
 					/* not supported for pass-through yet */
 					break;




More information about the svn-commits mailing list