[asterisk-commits] rmudgett: branch rmudgett/bch_shift_v1.4 r311487 - in /team/rmudgett/bch_shif...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 21 14:05:56 CDT 2011
Author: rmudgett
Date: Mon Mar 21 14:05:52 2011
New Revision: 311487
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311487
Log:
Allow Asterisk to take advantage of call ptr with NOTIFY message.
Modified:
team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c
team/rmudgett/bch_shift_v1.4/configure.ac
Modified: team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c?view=diff&rev=311487&r1=311486&r2=311487
==============================================================================
--- team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c (original)
+++ team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c Mon Mar 21 14:05:52 2011
@@ -10783,10 +10783,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) {
@@ -10794,6 +10802,7 @@
PRI_SPAN(e->notify.channel), PRI_CHANNEL(e->notify.channel), pri->span);
break;
}
+#endif /* !defined(HAVE_PRI_CALL_HOLD) */
{
struct ast_frame f = { AST_FRAME_CONTROL, };
ast_mutex_lock(&pri->pvts[chanpos]->lock);
Modified: team/rmudgett/bch_shift_v1.4/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.4/configure.ac?view=diff&rev=311487&r1=311486&r2=311487
==============================================================================
--- team/rmudgett/bch_shift_v1.4/configure.ac (original)
+++ team/rmudgett/bch_shift_v1.4/configure.ac Mon Mar 21 14:05:52 2011
@@ -259,6 +259,7 @@
AST_EXT_LIB_SETUP([POPT], [popt], [popt])
AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
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_VERSION], [ISDN PRI get_version], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri])
AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
@@ -1479,9 +1480,8 @@
AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h])
-
+AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])
AST_EXT_LIB_CHECK([PRI_VERSION], [pri], [pri_get_version], [libpri.h])
-
AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri], [pri_set_inbanddisconnect], [libpri.h])
if test "${USE_PWLIB}" != "no"; then
More information about the asterisk-commits
mailing list