From 26260008d1f8205c75c6c32afc41d7375d2f1ac3 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Mon, 22 Jan 2007 22:20:59 +0000 Subject: [PATCH] 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/branches/1.2@389 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/q931.c b/q931.c index 56a00e3..777ff73 100644 --- a/q931.c +++ b/q931.c @@ -2912,8 +2912,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 */ @@ -2927,6 +2925,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);