Index: chan_zap.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.168 diff -u -r1.168 chan_zap.c --- chan_zap.c 26 Jan 2004 16:39:34 -0000 1.168 +++ chan_zap.c 27 Jan 2004 19:12:02 -0000 @@ -3102,7 +3102,7 @@ ast_moh_stop(p->subs[SUB_REAL].owner->bridge); } else if (!p->subs[SUB_THREEWAY].owner) { char callerid[256]; - if (p->threewaycalling && !check_for_conference(p)) { + if (!check_for_conference(p)) { if (p->zaptrcallerid && p->owner) strncpy(callerid, p->owner->callerid, sizeof(callerid) - 1); /* XXX This section needs much more error checking!!! XXX */ @@ -3136,11 +3136,17 @@ } else if (!chan) { ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", p->channel); } 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); + if (!p->threewaycalling) { + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Hungup call not allowed to make a 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");