diff options
author | Mark Spencer <markster@digium.com> | 2004-09-02 20:45:24 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-09-02 20:45:24 +0000 |
commit | fd7577eed257112e82880a4367e242eeac721750 (patch) | |
tree | b0a3695c1cd90f04425d73c74960c0b43edff3bc /channels/chan_zap.c | |
parent | 93818c761ba3dac3ccc44d3e9154c5ba690a5ff2 (diff) |
Don't try to look offhook with channel banks & Loopstart (bug #2362), also make individual modules reloadable...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-x | channels/chan_zap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index cafe99e14..660c59c48 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -6291,6 +6291,8 @@ static inline int available(struct zt_pvt *p, int channelmatch, int groupmatch, #endif if (!p->radio) { + if (!p->sig || (p->sig == SIG_FXSLS)) + return 1; /* Check hook state */ if (p->subs[SUB_REAL].zfd > -1) res = ioctl(p->subs[SUB_REAL].zfd, ZT_GET_PARAMS, &par); @@ -6301,10 +6303,12 @@ static inline int available(struct zt_pvt *p, int channelmatch, int groupmatch, } if (res) { ast_log(LOG_WARNING, "Unable to check hook state on channel %d\n", p->channel); - } else if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSLS) || - (p->sig == SIG_FXSGS) || !p->sig) { + } else if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSGS)) { /* When "onhook" that means no battery on the line, and thus - it is out of service... */ + it is out of service..., if it's on a TDM card... If it's a channel + bank, there is no telling... */ + if (par.rxbits > -1) + return 1; if (par.rxisoffhook) return 1; else |