Only dial if call is on-hook or disconnected

This commit is contained in:
Andreas Eversberg 2017-10-02 12:30:06 +02:00
parent 3f2f0fdd8c
commit 1a4a08386c
1 changed files with 2 additions and 2 deletions

View File

@ -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 */