[asterisk-commits] rmudgett: branch rmudgett/call_waiting r249758 - in /team/rmudgett/call_waiti...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 1 20:23:10 CST 2010


Author: rmudgett
Date: Mon Mar  1 20:23:06 2010
New Revision: 249758

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249758
Log:
Added max_call_waiting_calls option to chan_dahdi.conf.

Code can read the new config option.  Next up being able to do something
with it.

Modified:
    team/rmudgett/call_waiting/channels/chan_dahdi.c
    team/rmudgett/call_waiting/channels/sig_pri.h
    team/rmudgett/call_waiting/configs/chan_dahdi.conf.sample

Modified: team/rmudgett/call_waiting/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/chan_dahdi.c?view=diff&rev=249758&r1=249757&r2=249758
==============================================================================
--- team/rmudgett/call_waiting/channels/chan_dahdi.c (original)
+++ team/rmudgett/call_waiting/channels/chan_dahdi.c Mon Mar  1 20:23:06 2010
@@ -11629,6 +11629,10 @@
 						pris[span].pri.cc_qsig_signaling_link_rsp =
 							conf->pri.pri.cc_qsig_signaling_link_rsp;
 #endif	/* defined(HAVE_PRI_CCSS) */
+#if defined(HAVE_PRI_CALL_WAITING)
+						pris[span].pri.max_call_waiting_calls =
+							conf->pri.pri.max_call_waiting_calls;
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
 						pris[span].pri.facilityenable = conf->pri.pri.facilityenable;
 						ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list));
 						ast_copy_string(pris[span].pri.idledial, conf->pri.pri.idledial, sizeof(pris[span].pri.idledial));
@@ -17045,6 +17049,14 @@
 					confp->pri.pri.cc_qsig_signaling_link_rsp = 1;/* retain */
 				}
 #endif	/* defined(HAVE_PRI_CCSS) */
+#if defined(HAVE_PRI_CALL_WAITING)
+			} else if (!strcasecmp(v->name, "max_call_waiting_calls")) {
+				confp->pri.pri.max_call_waiting_calls = atoi(v->value);
+				if (confp->pri.pri.max_call_waiting_calls < 0) {
+					/* Negative values are not allowed. */
+					confp->pri.pri.max_call_waiting_calls = 0;
+				}
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
 #endif /* HAVE_PRI */
 #ifdef HAVE_SS7
 			} else if (!strcasecmp(v->name, "ss7type")) {

Modified: team/rmudgett/call_waiting/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.h?view=diff&rev=249758&r1=249757&r2=249758
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.h (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.h Mon Mar  1 20:23:06 2010
@@ -270,7 +270,22 @@
 	int cc_qsig_signaling_link_req;			/*!< CC Q.SIG signaling link retention (Party A) release(0), retain(1), do-not-care(2) */
 	int cc_qsig_signaling_link_rsp;			/*!< CC Q.SIG signaling link retention (Party B) release(0), retain(1) */
 #endif	/* defined(HAVE_PRI_CCSS) */
-
+#if defined(HAVE_PRI_CALL_WAITING)
+	/*!
+	 * \brief Number of extra outgoing calls to allow on a span before
+	 * considering that span congested.
+	 */
+	int max_call_waiting_calls;
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
+
+#if defined(HAVE_PRI_CALL_WAITING)
+	/*!
+	 * \brief Number of outstanding call waiting calls.
+	 * \note Must be zero to allow new calls from asterisk to
+	 * immediately allocate a B channel.
+	 */
+	int num_call_waiting_calls;
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
 	int dchanavail[NUM_DCHANS];				/*!< Whether each channel is available */
 	int debug;								/*!< set to true if to dump PRI event info (tested but never set) */
 	int span;                               /*!< span number put into user output messages */

Modified: team/rmudgett/call_waiting/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/configs/chan_dahdi.conf.sample?view=diff&rev=249758&r1=249757&r2=249758
==============================================================================
--- team/rmudgett/call_waiting/configs/chan_dahdi.conf.sample (original)
+++ team/rmudgett/call_waiting/configs/chan_dahdi.conf.sample Mon Mar  1 20:23:06 2010
@@ -497,6 +497,12 @@
 ;
 callwaiting=yes
 ;
+; Configure the number of outstanding call waiting calls for internal ISDN
+; endpoints before bouncing the calls as busy.  This option is equivalent to
+; the callwaiting option for analog ports.
+; The default is zero to disable call waiting for ISDN endpoints.
+;max_call_waiting_calls=0
+;
 ; Whether or not restrict outgoing caller ID (will be sent as ANI only, not
 ; available for the user)
 ; Mostly use with FXS ports




More information about the asterisk-commits mailing list