Index: pbx.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx.c,v retrieving revision 1.154.2.11 diff -u -r1.154.2.11 pbx.c --- pbx.c 15 May 2005 23:26:29 -0000 1.154.2.11 +++ pbx.c 31 May 2005 05:38:45 -0000 @@ -4083,6 +4083,7 @@ ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", chan->name); if (sync > 1) { + ast_mutex_unlock(&chan->lock); if (ast_pbx_run(chan)) { ast_log(LOG_ERROR, "Unable to run PBX on %s\n", chan->name); ast_hangup(chan); @@ -4213,6 +4214,8 @@ strncpy(tmp->data, appdata, sizeof(tmp->data) - 1); tmp->chan = chan; if (sync > 1) { + if (locked_channel) + ast_mutex_unlock(&chan->lock); ast_pbx_run_app(tmp); } else { pthread_attr_init(&attr);