Index: chan_zap.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.145 diff -u -r1.145 chan_zap.c --- chan_zap.c 23 Nov 2003 23:13:27 -0000 1.145 +++ chan_zap.c 26 Nov 2003 17:56:19 -0000 @@ -3010,7 +3010,7 @@ if (p->subs[SUB_REAL].owner->bridge) ast_moh_stop(p->subs[SUB_REAL].owner->bridge); } else if (!p->subs[SUB_THREEWAY].owner) { - if (p->threewaycalling && !check_for_conference(p)) { + if (!check_for_conference(p)) { /* XXX This section needs much more error checking!!! XXX */ /* Start a 3-way call if feasible */ if ((ast->pbx) || @@ -3033,11 +3033,18 @@ zt_enable_ec(p); ast_hangup(chan); } else { - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Started three way call on channel %d\n", p->channel); - /* Start music on hold if appropriate */ - if (p->subs[SUB_THREEWAY].owner->bridge) - ast_moh_start(p->subs[SUB_THREEWAY].owner->bridge, NULL); + /* FLASH not in 3way makes us hangup */ + if (!p->threewaycalling) { + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Hungup call not in three way but flashed on %d\n", p->channel); + p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV; + } else { + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Started three way call on channel %d\n", p->channel); + /* Start music on hold if appropriate */ + if (p->subs[SUB_THREEWAY].owner->bridge) + ast_moh_start(p->subs[SUB_THREEWAY].owner->bridge, NULL); + } } } else ast_log(LOG_WARNING, "Unable to allocate three-way subchannel\n");