[asterisk-commits] rmudgett: trunk r319427 - in /trunk: ./ channels/ configs/ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 17 15:13:33 CDT 2011
Author: rmudgett
Date: Tue May 17 15:13:27 2011
New Revision: 319427
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=319427
Log:
Option needed for Q931_IE_TIME_DATE to be optional in CONNECT message.
The NEC SV8300 rejects the Q931_IE_TIME_DATE for Q.SIG.
Add option to specify if and how much of the current time is put in
Q931_IE_TIME_DATE.
* Send date/time ie never.
* Send date/time ie date only.
* Send date/time ie date and hour.
* Send date/time ie date, hour, and minute.
* Send date/time ie date, hour, minute, and second.
* Send date/time ie default: Libpri will send date and hhmm only when in
NT PTMP mode to support ISDN phones.
(closes issue #19221)
Reported by: kenner
JIRA SWP-3396
Modified:
trunk/channels/chan_dahdi.c
trunk/channels/sig_pri.c
trunk/channels/sig_pri.h
trunk/configs/chan_dahdi.conf.sample
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=319427&r1=319426&r2=319427
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue May 17 15:13:27 2011
@@ -12522,6 +12522,9 @@
#if defined(HAVE_PRI_MCID)
pris[span].pri.mcid_send = conf->pri.pri.mcid_send;
#endif /* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+ pris[span].pri.datetime_send = conf->pri.pri.datetime_send;
+#endif /* defined(HAVE_PRI_DATETIME_SEND) */
for (x = 0; x < PRI_MAX_TIMERS; x++) {
pris[span].pri.pritimers[x] = conf->pri.pri.pritimers[x];
@@ -16811,6 +16814,40 @@
return options;
}
#endif /* defined(HAVE_PRI_DISPLAY_TEXT) */
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+#if defined(HAVE_PRI_DATETIME_SEND)
+/*!
+ * \internal
+ * \brief Determine the configured date/time send policy option.
+ * \since 1.10
+ *
+ * \param value Configuration value string.
+ *
+ * \return Configured date/time send policy option.
+ */
+static int dahdi_datetime_send_option(const char *value)
+{
+ int option;
+
+ option = PRI_DATE_TIME_SEND_DEFAULT;
+
+ if (ast_false(value)) {
+ option = PRI_DATE_TIME_SEND_NO;
+ } else if (!strcasecmp(value, "date")) {
+ option = PRI_DATE_TIME_SEND_DATE;
+ } else if (!strcasecmp(value, "date_hh")) {
+ option = PRI_DATE_TIME_SEND_DATE_HH;
+ } else if (!strcasecmp(value, "date_hhmm")) {
+ option = PRI_DATE_TIME_SEND_DATE_HHMM;
+ } else if (!strcasecmp(value, "date_hhmmss")) {
+ option = PRI_DATE_TIME_SEND_DATE_HHMMSS;
+ }
+
+ return option;
+}
+#endif /* defined(HAVE_PRI_DATETIME_SEND) */
#endif /* defined(HAVE_PRI) */
/*! process_dahdi() - ignore keyword 'channel' and similar */
@@ -17633,6 +17670,10 @@
} else if (!strcasecmp(v->name, "mcid_send")) {
confp->pri.pri.mcid_send = ast_true(v->value);
#endif /* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+ } else if (!strcasecmp(v->name, "datetime_send")) {
+ confp->pri.pri.datetime_send = dahdi_datetime_send_option(v->value);
+#endif /* defined(HAVE_PRI_DATETIME_SEND) */
#endif /* HAVE_PRI */
#if defined(HAVE_SS7)
} else if (!strcasecmp(v->name, "ss7type")) {
Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=319427&r1=319426&r2=319427
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Tue May 17 15:13:27 2011
@@ -8580,6 +8580,9 @@
pri_display_options_send(pri->pri, pri->display_flags_send);
pri_display_options_receive(pri->pri, pri->display_flags_receive);
#endif /* defined(HAVE_PRI_DISPLAY_TEXT) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+ pri_date_time_send_option(pri->pri, pri->datetime_send);
+#endif /* defined(HAVE_PRI_DATETIME_SEND) */
pri->resetpos = -1;
if (ast_pthread_create_background(&pri->master, NULL, pri_dchannel, pri)) {
Modified: trunk/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.h?view=diff&rev=319427&r1=319426&r2=319427
==============================================================================
--- trunk/channels/sig_pri.h (original)
+++ trunk/channels/sig_pri.h Tue May 17 15:13:27 2011
@@ -441,6 +441,10 @@
/*! \brief TRUE if allow sending MCID request on this span. */
unsigned int mcid_send:1;
#endif /* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+ /*! \brief Configured date/time ie send policy option. */
+ int datetime_send;
+#endif /* defined(HAVE_PRI_DATETIME_SEND) */
int dialplan; /*!< Dialing plan */
int localdialplan; /*!< Local dialing plan */
int cpndialplan; /*!< Connected party dialing plan */
Modified: trunk/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/chan_dahdi.conf.sample?view=diff&rev=319427&r1=319426&r2=319427
==============================================================================
--- trunk/configs/chan_dahdi.conf.sample (original)
+++ trunk/configs/chan_dahdi.conf.sample Tue May 17 15:13:27 2011
@@ -235,6 +235,19 @@
; Default disabled
;
;mcid_send=yes
+
+; Send ISDN date/time IE in CONNECT message option. Only valid on NT spans.
+;
+; no: Do not send date/time IE in CONNECT message.
+; date: Send date only.
+; date_hh Send date and hour.
+; date_hhmm Send date, hour, and minute.
+; date_hhmmss Send date, hour, minute, and second.
+;
+; Default is an empty string which lets libpri pick the default
+; date/time IE send policy.
+;
+;datetime_send=
; Allow inband audio (progress) when a call is DISCONNECTed by the far end of a PRI
;
Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=319427&r1=319426&r2=319427
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue May 17 15:13:27 2011
@@ -414,6 +414,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_DATETIME_SEND], [ISDN PRI Date/time ie send policy], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI_V2], [ISDN PRI Message Waiting Indication (Fixed)], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_DISPLAY_TEXT], [ISDN PRI user display text IE contents during call], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI], [ISDN PRI Message Waiting Indication], [PRI], [pri])
@@ -1823,6 +1824,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_DATETIME_SEND], [pri], [pri_date_time_send_option], [libpri.h])
AST_EXT_LIB_CHECK([PRI_MWI_V2], [pri], [pri_mwi_indicate_v2], [libpri.h])
AST_EXT_LIB_CHECK([PRI_DISPLAY_TEXT], [pri], [pri_display_text], [libpri.h])
AST_EXT_LIB_CHECK([PRI_MWI], [pri], [pri_mwi_indicate], [libpri.h])
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=319427&r1=319426&r2=319427
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Tue May 17 15:13:27 2011
@@ -576,6 +576,9 @@
library. */
#undef HAVE_PRI_CCSS
+/* Define to 1 if you have the ISDN PRI Date/time ie send policy library. */
+#undef HAVE_PRI_DATETIME_SEND
+
/* Define to 1 if you have the ISDN PRI user display text IE contents during
call library. */
#undef HAVE_PRI_DISPLAY_TEXT
@@ -827,16 +830,16 @@
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
-/* Define to 1 if `st_blksize' is a member of `struct stat'. */
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_CR_UID
-/* Define to 1 if `uid' is a member of `struct ucred'. */
+/* Define to 1 if `uid' is member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_UID
/* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1113,9 +1116,6 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
More information about the asterisk-commits
mailing list