[asterisk-commits] rmudgett: branch rmudgett/bch_shift_v1.6.2 r311488 - in /team/rmudgett/bch_sh...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 21 14:25:30 CDT 2011


Author: rmudgett
Date: Mon Mar 21 14:25:24 2011
New Revision: 311488

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311488
Log:
Allow Asterisk to take advantage of call ptr with NOTIFY message.

Modified:
    team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c
    team/rmudgett/bch_shift_v1.6.2/configure.ac

Modified: team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c?view=diff&rev=311488&r1=311487&r2=311488
==============================================================================
--- team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c (original)
+++ team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c Mon Mar 21 14:25:24 2011
@@ -14270,10 +14270,18 @@
 				ast_mutex_unlock(&pri->pvts[chanpos]->lock);
 				break;
 			case PRI_EVENT_NOTIFY:
+#if defined(HAVE_PRI_CALL_HOLD)
+				chanpos = pri_find_principle_by_call(pri, e->notify.call);
+				if (chanpos < 0) {
+					ast_log(LOG_WARNING, "Span %d: Received NOTIFY for unknown call.\n",
+						pri->span);
+					break;
+				}
+#else
 				/*
-				 * We are just going to have to trust that the correct principle
-				 * is found.  Not all supported versions of libpri supply a call
-				 * pointer for NOTIFY messages.
+				 * This version of libpri does not supply a call pointer for
+				 * this message.  We are just going to have to trust that the
+				 * correct principle is found.
 				 */
 				chanpos = pri_find_principle(pri, e->notify.channel);
 				if (chanpos < 0) {
@@ -14281,6 +14289,7 @@
 						PRI_SPAN(e->notify.channel), PRI_CHANNEL(e->notify.channel), pri->span);
 					break;
 				}
+#endif	/* !defined(HAVE_PRI_CALL_HOLD) */
 				if (!pri->discardremoteholdretrieval) {
 					struct ast_frame f = { AST_FRAME_CONTROL, };
 					ast_mutex_lock(&pri->pvts[chanpos]->lock);

Modified: team/rmudgett/bch_shift_v1.6.2/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.6.2/configure.ac?view=diff&rev=311488&r1=311487&r2=311488
==============================================================================
--- team/rmudgett/bch_shift_v1.6.2/configure.ac (original)
+++ team/rmudgett/bch_shift_v1.6.2/configure.ac Mon Mar 21 14:25:24 2011
@@ -337,7 +337,9 @@
 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_HOLD], [NOTIFY with call ptr], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri])
+AST_EXT_LIB_SETUP_DEPENDENT([PRI_PROG_W_CAUSE], [ISDN progress with cause], [PRI], [pri])
 AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
 AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
 AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample])
@@ -1592,9 +1594,8 @@
 AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])
 
 AST_EXT_LIB_CHECK([PRI], [pri], [pri_new_bri], [libpri.h])
-
+AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_PROG_W_CAUSE], [pri], [pri_progress_with_cause], [libpri.h])
-
 AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri], [pri_set_inbanddisconnect], [libpri.h])
 
 AST_EXT_LIB_CHECK([RESAMPLE], [resample], [resample_open], [libresample.h], [-lm])




More information about the asterisk-commits mailing list