From 1a4a08386c28ae76339386c5bd7e3be34cf9d9ff Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 2 Oct 2017 12:30:06 +0200 Subject: Only dial if call is on-hook or disconnected --- src/common/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/call.c b/src/common/call.c index 63832bf..2b40ca4 100644 --- a/src/common/call.c +++ b/src/common/call.c @@ -633,7 +633,7 @@ dial_after_hangup: case CALL_CONNECT: case CALL_DISCONNECTED: if (c > 0) { - if (c == 'h' || c == 'd') { + if (c == 'h' || (c == 'd' && call.state == CALL_DISCONNECTED)) { PDEBUG(DCALL, DEBUG_INFO, "Call hangup\n"); call_new_state(CALL_IDLE); if (call.callref) { @@ -655,7 +655,7 @@ dial_after_hangup: sprintf(text, "call active: %s (press h=hangup)\r", call.station_id); } if (call.state == CALL_DISCONNECTED) - sprintf(text, "call disconnected: %s (press h=hangup)\r", cause_name(call.disc_cause)); + sprintf(text, "call disconnected: %s (press h=hangup d=redial)\r", cause_name(call.disc_cause)); break; } /* skip if nothing has changed */ -- cgit v1.2.3