From 9f391449861b8e96625a3ed3cb029bb8e1c98f6c Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Mon, 2 Nov 2009 23:28:59 +0000 Subject: [PATCH] NT PTMP did not report busy when calling a busy phone. The caller would not get a busy indication when calling a busy phone. Timer T303 is not supposed to be stopped when RELEASE_COMPLETE received. When T303 expires we will now report the last clearing cause code to the caller if we received one. git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1255 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/q931.c b/q931.c index aeb8b66..a1a8b0f 100644 --- a/q931.c +++ b/q931.c @@ -4473,7 +4473,10 @@ static void t303_expiry(void *data) c->t303_expirycnt++; c->t303_timer = 0; - if (c->t303_expirycnt < 2) { + if (c->cause != -1) { + /* We got a DISCONNECT, RELEASE, or RELEASE_COMPLETE and no other responses. */ + pri_fake_clearing(c); + } else if (c->t303_expirycnt < 2) { if (ctrl->subchannel && !ctrl->bri) res = send_message(ctrl, c, Q931_SETUP, gr303_setup_ies); else if (c->cis_call) @@ -6581,7 +6584,6 @@ static int post_handle_q931_message(struct pri *ctrl, struct q931_mh *mh, struct } break; case Q931_RELEASE_COMPLETE: - stop_t303(c); c->hangupinitiated = 1; UPDATE_OURCALLSTATE(ctrl, c, Q931_CALL_STATE_NULL); c->peercallstate = Q931_CALL_STATE_NULL;