dect
/
asterisk
Archived
13
0
Fork 0

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@319427 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
rmudgett 2011-05-17 20:13:27 +00:00
parent ca25543e2f
commit 1aa4733de1
7 changed files with 31872 additions and 5086 deletions

View File

@ -12522,6 +12522,9 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
#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];
@ -16813,6 +16816,40 @@ static unsigned long dahdi_display_text_option(const char *value)
#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 */
#define PROC_DAHDI_OPT_NOCHAN (1 << 0)
/*! process_dahdi() - No warnings on non-existing cofiguration keywords */
@ -17633,6 +17670,10 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} 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")) {

View File

@ -8580,6 +8580,9 @@ int sig_pri_start_pri(struct sig_pri_span *pri)
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)) {

View File

@ -441,6 +441,10 @@ struct sig_pri_span {
/*! \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 */

View File

@ -236,6 +236,19 @@
;
;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
;
;inbanddisconnect=yes

36881
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -414,6 +414,7 @@ AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
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([POPT], [popt], [poptStrerror], [popt.h])
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])

View File

@ -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. */
@ -1114,9 +1117,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