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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 1 11:03:53 CST 2010


Author: rmudgett
Date: Mon Mar  1 11:03:49 2010
New Revision: 249537

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249537
Log:
Initial call waiting place holders to use libpri CONNECT_ACKNOWLEDGE support.

Modified:
    team/rmudgett/call_waiting/channels/sig_pri.c
    team/rmudgett/call_waiting/channels/sig_pri.h
    team/rmudgett/call_waiting/configure.ac

Modified: team/rmudgett/call_waiting/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.c?view=diff&rev=249537&r1=249536&r2=249537
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.c (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.c Mon Mar  1 11:03:49 2010
@@ -3590,6 +3590,15 @@
 					ast_log(LOG_WARNING, "Answer on unconfigured channel %d/%d span %d\n",
 						PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
 				} else {
+#if defined(HAVE_PRI_CALL_WAITING)
+/* BUGBUG need to handle the channel indication as in a SETUP: Specified, no alternative; specified, alternate acceptable; any channel; not present.  */
+					if (PRI_CHANNEL(e->answer.channel)) {
+						/* We already have a channel so do normal CONNECT_ACKNOWLEDGE. */
+						pri_connect_ack(pri->pri, e->answer.call, 0);
+					} else {
+/* BUGBUG need to find a free channel now or kill the call with PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION. */
+					}
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
 					chanpos = pri_fixup_principle(pri, chanpos, e->answer.call);
 					if (chanpos < 0) {
 						ast_log(LOG_WARNING, "Answer requested on channel %d/%d not in use on span %d\n",
@@ -4869,6 +4878,9 @@
 	pri_cc_retain_signaling_req(pri->pri, pri->cc_qsig_signaling_link_req);
 	pri_cc_retain_signaling_rsp(pri->pri, pri->cc_qsig_signaling_link_rsp);
 #endif	/* defined(HAVE_PRI_CCSS) */
+#if defined(HAVE_PRI_CALL_WAITING)
+	pri_connect_ack_enable(pri->pri, 1);
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
 
 	pri->resetpos = -1;
 	if (ast_pthread_create_background(&pri->master, NULL, pri_dchannel, pri)) {

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=249537&r1=249536&r2=249537
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.h (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.h Mon Mar  1 11:03:49 2010
@@ -34,6 +34,8 @@
 /* BUGBUG the HAVE_PRI_CCSS line is to be removed when the CCSS branch is merged to trunk and the configure script is updated. */
 #define HAVE_PRI_CCSS 1
 #endif	/* defined(PRI_SUBCMD_CC_AVAILABLE) */
+/* BUGBUG the HAVE_PRI_CALL_WAITING line is to be removed when the call_waiting branch is merged to trunk and the configure script is updated. */
+#define HAVE_PRI_CALL_WAITING 1
 
 #if defined(HAVE_PRI_CCSS)
 /*! PRI debug message flags when normal PRI debugging is turned on at the command line. */

Modified: team/rmudgett/call_waiting/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/configure.ac?view=diff&rev=249537&r1=249536&r2=249537
==============================================================================
--- team/rmudgett/call_waiting/configure.ac (original)
+++ team/rmudgett/call_waiting/configure.ac Mon Mar  1 11:03:49 2010
@@ -336,6 +336,7 @@
 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
 AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
+AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_WAITING], [ISDN PRI call waiting supplementary service], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_CCSS], [ISDN PRI call completion supplementary service], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_SUBADDR], [ISDN PRI subaddressing], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_HOLD], [ISDN PRI call hold], [PRI], [pri])
@@ -1528,6 +1529,7 @@
 AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])
 
 AST_EXT_LIB_CHECK([PRI], [pri], [pri_connected_line_update], [libpri.h])
+AST_EXT_LIB_CHECK([PRI_CALL_WAITING], [pri], [pri_connect_ack_enable], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_CCSS], [pri], [pri_cc_enable], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_SUBADDR], [pri], [pri_sr_set_called_subaddress], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])




More information about the asterisk-commits mailing list