From ec3b7c156e863a4ce2267020cce83746311eb455 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Tue, 23 Jan 2007 22:02:44 +0000 Subject: [PATCH] Merged revisions 390 via svnmerge from https://origsvn.digium.com/svn/libpri/branches/1.4 ................ r390 | mattf | 2007-01-22 16:29:24 -0600 (Mon, 22 Jan 2007) | 10 lines Merged revisions 389 via svnmerge from https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r389 | mattf | 2007-01-22 16:20:59 -0600 (Mon, 22 Jan 2007) | 2 lines Make sure we send DISCONNECT if we reached the active state and a call is disconnected, regardless of cause code. ........ ................ git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@393 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/q931.c b/q931.c index f52d758..d351363 100644 --- a/q931.c +++ b/q931.c @@ -2963,8 +2963,6 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause) /* sent CONNECT */ case Q931_CALL_STATE_INCOMING_CALL_PROCEEDING: /* we sent CALL_PROCEEDING */ - case Q931_CALL_STATE_ACTIVE: - /* received CONNECT */ case Q931_CALL_STATE_OVERLAP_RECEIVING: /* received SETUP_ACKNOWLEDGE */ /* send DISCONNECT in general */ @@ -2978,6 +2976,10 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause) } else pri_error(pri, "Wierd, doing nothing but this shouldn't happen, ourstate %s, peerstate %s\n",callstate2str(c->ourcallstate),callstate2str(c->peercallstate)); break; + case Q931_CALL_STATE_ACTIVE: + /* received CONNECT */ + q931_disconnect(pri,c,cause); + break; case Q931_CALL_STATE_DISCONNECT_REQUEST: /* sent DISCONNECT */ q931_release(pri,c,cause);