From 03c51cf525f449b8a70db5cf7aeefd96636fe6f7 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Wed, 29 Apr 2015 14:29:10 -0500 Subject: chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option. Some telco switches occasionally ignore ISDN RESTART requests. The fix for ASTERISK-19608 added an escape clause for B channels in the restarting state if the telco ignores a RESTART request. If the telco fails to acknowledge the RESTART then Asterisk will assume the telco acknowledged the RESTART on the second call attempt requesting the B channel by the telco. The escape clause is good for dealing with RESTART requests in general but it does cause the next call for the restarting B channel to be rejected if the telco insists the call must go on that B channel. chan_dahdi doesn't really need to issue a RESTART request in response to receiving a cause 44 (Requested channel not available) code. Sending the RESTART in such a situation is not required (nor prohibited) by the standards. I think chan_dahdi does this for historical reasons to deal with buggy peers to get channels unstuck in a similar fashion as the chan_dahdi.conf resetinterval option. * Add the chan_dahdi.conf force_restart_unavailable_chans compatability option that when disabled will prevent chan_dahdi from trying to RESTART the channel in response to a cause 44 code. ASTERISK-25034 #close Reported by: Richard Mudgett Change-Id: Ib8b17a438799920f4a2038826ff99a1884042f65 --- channels/chan_dahdi.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'channels/chan_dahdi.c') diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index b7df2b811..b9405d591 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -12346,6 +12346,7 @@ 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) */ + pris[span].pri.force_restart_unavailable_chans = conf->pri.pri.force_restart_unavailable_chans; #if defined(HAVE_PRI_DATETIME_SEND) pris[span].pri.datetime_send = conf->pri.pri.datetime_send; #endif /* defined(HAVE_PRI_DATETIME_SEND) */ @@ -18258,6 +18259,8 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct else ast_log(LOG_WARNING, "'%s' is not a valid reset interval, should be >= 60 seconds or 'never' at line %d.\n", v->value, v->lineno); + } else if (!strcasecmp(v->name, "force_restart_unavailable_chans")) { + confp->pri.pri.force_restart_unavailable_chans = ast_true(v->value); } else if (!strcasecmp(v->name, "minunused")) { confp->pri.pri.minunused = atoi(v->value); } else if (!strcasecmp(v->name, "minidle")) { -- cgit v1.2.3