diff options
author | Matthew Fredrickson <creslin@digium.com> | 2007-10-16 20:55:57 +0000 |
---|---|---|
committer | Matthew Fredrickson <creslin@digium.com> | 2007-10-16 20:55:57 +0000 |
commit | b5a162a746ad45af855d7f11f2750fa3e14febd0 (patch) | |
tree | d67617125572fc4849890a0518e6cbbed6dc9864 /channels | |
parent | 8fae310e81e77b895955513363f743bb7be480ce (diff) |
Don't hangup the call for SS7 if we get an alarm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_zap.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index d805745c1..4aa0daad3 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -4106,22 +4106,24 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) break; case ZT_EVENT_ALARM: #ifdef HAVE_PRI - if (!p->pri || !p->pri->pri || (pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0)) { - /* T309 is not enabled : hangup calls when alarm occurs */ - if (p->call) { - if (p->pri && p->pri->pri) { - if (!pri_grab(p, p->pri)) { - pri_hangup(p->pri->pri, p->call, -1); - pri_destroycall(p->pri->pri, p->call); - p->call = NULL; - pri_rel(p->pri); + if (p->sig == SIG_PRI) { + if (!p->pri || !p->pri->pri || (pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0)) { + /* T309 is not enabled : hangup calls when alarm occurs */ + if (p->call) { + if (p->pri && p->pri->pri) { + if (!pri_grab(p, p->pri)) { + pri_hangup(p->pri->pri, p->call, -1); + pri_destroycall(p->pri->pri, p->call); + p->call = NULL; + pri_rel(p->pri); + } else + ast_log(LOG_WARNING, "Failed to grab PRI!\n"); } else - ast_log(LOG_WARNING, "Failed to grab PRI!\n"); - } else - ast_log(LOG_WARNING, "The PRI Call has not been destroyed\n"); + ast_log(LOG_WARNING, "The PRI Call has not been destroyed\n"); + } + if (p->owner) + p->owner->_softhangup |= AST_SOFTHANGUP_DEV; } - if (p->owner) - p->owner->_softhangup |= AST_SOFTHANGUP_DEV; } if (p->bearer) p->bearer->inalarm = 1; @@ -4141,6 +4143,10 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) break; } #endif +#ifdef HAVE_SS7 + if (p->sig == SIG_SS7) + break; +#endif case ZT_EVENT_ONHOOK: if (p->radio) { p->subs[index].f.frametype = AST_FRAME_CONTROL; |