Index: main/pbx.c =================================================================== --- main/pbx.c (revision 75350) +++ main/pbx.c (working copy) @@ -2401,7 +2401,9 @@ dst_exten[pos] = '\0'; break; } - if (res == AST_PBX_KEEPALIVE) { + if (res == -1) { + ast_softhangup(c, c->hangupcause ? c->hangupcause : AST_CAUSE_NORMAL_CLEARING); + } else if (res == AST_PBX_KEEPALIVE) { ast_debug(1, "Spawn extension (%s,%s,%d) exited KEEPALIVE on '%s'\n", c->context, c->exten, c->priority, c->name); if (option_verbose > 1) ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE on '%s'\n", c->context, c->exten, c->priority, c->name);