[asterisk-commits] rmudgett: branch 1.8 r332264 - in /branches/1.8: ./ channels/ configs/ includ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 17 10:51:12 CDT 2011


Author: rmudgett
Date: Wed Aug 17 10:51:08 2011
New Revision: 332264

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=332264
Log:
Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.

France Telecom brings layer 2 and layer 1 down on BRI lines when the line
is idle.  When layer 1 goes down Asterisk cannot make outgoing calls and
the HA8 and HB8 cards also get IRQ misses.

The inability to make outgoing calls is because the line is in red alarm
and Asterisk will not make calls over a line it considers unavailable.
The IRQ misses for the HA8 and HB8 card are because the hardware is
switching clock sources from the line which just brought layer 1 down to
internal timing.

There is a DAHDI option for the B410P card to not tell Asterisk that layer
1 went down so Asterisk will allow outgoing calls: "modprobe wcb4xxp
teignored=1".  There is a similar DAHDI option for the HA8 and HB8 cards:
"modprobe wctdm24xxp bri_teignored=1".  Unfortunately that will not clear
up the IRQ misses when the telco brings layer 1 down.

* Add layer 2 persistence option to customize the layer 2 behavior on BRI
PTMP lines.  The new option has three settings: 1) Use libpri default
layer 2 setting.  2) Keep layer 2 up.  Bring layer 2 back up when the peer
brings it down.  3) Leave layer 2 down when the peer brings it down.
Layer 2 will be brought up as needed for outgoing calls.

JIRA AST-598

Modified:
    branches/1.8/channels/chan_dahdi.c
    branches/1.8/channels/sig_pri.c
    branches/1.8/channels/sig_pri.h
    branches/1.8/configs/chan_dahdi.conf.sample
    branches/1.8/configure
    branches/1.8/configure.ac
    branches/1.8/include/asterisk/autoconfig.h.in

Modified: branches/1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_dahdi.c?view=diff&rev=332264&r1=332263&r2=332264
==============================================================================
--- branches/1.8/channels/chan_dahdi.c (original)
+++ branches/1.8/channels/chan_dahdi.c Wed Aug 17 10:51:08 2011
@@ -12461,6 +12461,9 @@
 #endif	/* defined(HAVE_PRI_CALL_WAITING) */
 						pris[span].pri.transfer = conf->chan.transfer;
 						pris[span].pri.facilityenable = conf->pri.pri.facilityenable;
+#if defined(HAVE_PRI_L2_PERSISTENCE)
+						pris[span].pri.l2_persistence = conf->pri.pri.l2_persistence;
+#endif	/* defined(HAVE_PRI_L2_PERSISTENCE) */
 #if defined(HAVE_PRI_AOC_EVENTS)
 						pris[span].pri.aoc_passthrough_flag = conf->pri.pri.aoc_passthrough_flag;
 						pris[span].pri.aoce_delayhangup = conf->pri.pri.aoce_delayhangup;
@@ -17438,6 +17441,16 @@
 #endif	/* defined(HAVE_PRI_MWI) */
 			} else if (!strcasecmp(v->name, "append_msn_to_cid_tag")) {
 				confp->pri.pri.append_msn_to_user_tag = ast_true(v->value);
+#if defined(HAVE_PRI_L2_PERSISTENCE)
+			} else if (!strcasecmp(v->name, "layer2_persistence")) {
+				if (!strcasecmp(v->value, "keep_up")) {
+					confp->pri.pri.l2_persistence = PRI_L2_PERSISTENCE_KEEP_UP;
+				} else if (!strcasecmp(v->value, "leave_down")) {
+					confp->pri.pri.l2_persistence = PRI_L2_PERSISTENCE_LEAVE_DOWN;
+				} else {
+					confp->pri.pri.l2_persistence = PRI_L2_PERSISTENCE_DEFAULT;
+				}
+#endif	/* defined(HAVE_PRI_L2_PERSISTENCE) */
 #endif /* HAVE_PRI */
 #if defined(HAVE_SS7)
 			} else if (!strcasecmp(v->name, "ss7type")) {

Modified: branches/1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_pri.c?view=diff&rev=332264&r1=332263&r2=332264
==============================================================================
--- branches/1.8/channels/sig_pri.c (original)
+++ branches/1.8/channels/sig_pri.c Wed Aug 17 10:51:08 2011
@@ -7573,6 +7573,9 @@
 #if defined(HAVE_PRI_MCID)
 	pri_mcid_enable(pri->pri, 1);
 #endif	/* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_L2_PERSISTENCE)
+	pri_persistent_layer2_option(pri->pri, pri->l2_persistence);
+#endif	/* defined(HAVE_PRI_L2_PERSISTENCE) */
 
 	pri->resetpos = -1;
 	if (ast_pthread_create_background(&pri->master, NULL, pri_dchannel, pri)) {

Modified: branches/1.8/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_pri.h?view=diff&rev=332264&r1=332263&r2=332264
==============================================================================
--- branches/1.8/channels/sig_pri.h (original)
+++ branches/1.8/channels/sig_pri.h Wed Aug 17 10:51:08 2011
@@ -327,6 +327,10 @@
 	int qsigchannelmapping;							/*!< QSIG channel mapping type */
 	int discardremoteholdretrieval;					/*!< shall remote hold or remote retrieval notifications be discarded? */
 	int facilityenable;								/*!< Enable facility IEs */
+#if defined(HAVE_PRI_L2_PERSISTENCE)
+	/*! Layer 2 persistence option. */
+	int l2_persistence;
+#endif	/* defined(HAVE_PRI_L2_PERSISTENCE) */
 	int dchan_logical_span[SIG_PRI_NUM_DCHANS];		/*!< Logical offset the DCHAN sits in */
 	int fds[SIG_PRI_NUM_DCHANS];					/*!< FD's for d-channels */
 

Modified: branches/1.8/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/configs/chan_dahdi.conf.sample?view=diff&rev=332264&r1=332263&r2=332264
==============================================================================
--- branches/1.8/configs/chan_dahdi.conf.sample (original)
+++ branches/1.8/configs/chan_dahdi.conf.sample Wed Aug 17 10:51:08 2011
@@ -188,7 +188,18 @@
 ; transfer feature of an analog phone.
 ; The default is no.
 ;hold_disconnect_transfer=yes
-;
+
+; BRI PTMP layer 2 persistence.
+; You should normally not need to set this option.
+; You may need to set this option if your telco brings layer 1 down when
+; the line is idle.
+; <blank>:       Use libpri default.
+; keep_up:       Bring layer 2 back up if peer takes it down.
+; leave_down:    Leave layer 2 down if peer takes it down. (Libpri default)
+;                (Layer 2 will be brought back up for an outgoing call.)
+;
+;layer2_persistence=leave_down
+
 ; PRI Out of band indications.
 ; Enable this to report Busy and Congestion on a PRI using out-of-band
 ; notification. Inband indication, as used by Asterisk doesn't seem to work

Modified: branches/1.8/configure.ac
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/configure.ac?view=diff&rev=332264&r1=332263&r2=332264
==============================================================================
--- branches/1.8/configure.ac (original)
+++ branches/1.8/configure.ac Wed Aug 17 10:51:08 2011
@@ -408,6 +408,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_L2_PERSISTENCE], [ISDN Layer 2 persistence option], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI], [ISDN PRI Message Waiting Indication], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_MCID], [ISDN PRI Malicious Call ID], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_WAITING], [ISDN PRI call waiting supplementary service], [PRI], [pri])
@@ -1804,6 +1805,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_L2_PERSISTENCE], [pri], [pri_persistent_layer2_option], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_MWI], [pri], [pri_mwi_indicate], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_MCID], [pri], [pri_mcid_enable], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_CALL_WAITING], [pri], [pri_connect_ack_enable], [libpri.h])

Modified: branches/1.8/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/autoconfig.h.in?view=diff&rev=332264&r1=332263&r2=332264
==============================================================================
--- branches/1.8/include/asterisk/autoconfig.h.in (original)
+++ branches/1.8/include/asterisk/autoconfig.h.in Wed Aug 17 10:51:08 2011
@@ -582,6 +582,9 @@
 /* Define to 1 if you have the ISDN PRI set_inbanddisconnect library. */
 #undef HAVE_PRI_INBANDDISCONNECT
 
+/* Define to 1 if you have the ISDN Layer 2 persistence option library. */
+#undef HAVE_PRI_L2_PERSISTENCE
+
 /* Define to 1 if you have the ISDN PRI Malicious Call ID library. */
 #undef HAVE_PRI_MCID
 
@@ -819,16 +822,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. */
@@ -1102,9 +1105,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