From: Mark Spencer Date: Tue, 13 Sep 2005 02:20:37 +0000 (+0000) Subject: Restart PRI when we come out of alarm if we're not already up... X-Git-Tag: 1.2.0-beta2~346 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04e4a54ae82635ef3fbc567b73fd34bbb823bea4;p=thirdparty%2Fasterisk.git Restart PRI when we come out of alarm if we're not already up... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6566 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index aae045549e..7c2829b26c 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -2205,6 +2205,8 @@ int pri_find_dchan(struct zt_pri *pri) ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n", pri->dchannels[oldslot], pri->dchannels[newslot]); pri->pri = pri->dchans[newslot]; + if (!pri_is_up(pri) && !(pri->dchanavail[newslot] & DCHAN_NOTINALARM)) + pri_restart(pri->dchans[newslot]); return 0; } #endif @@ -7706,7 +7708,7 @@ static void *do_idle_thread(void *vchan) return NULL; } -#ifndef PRI_NEW_SET_API +#ifndef PRI_RESTART #error "Upgrade your libpri" #endif static void zt_pri_message(struct pri *pri, char *s)