--- chan_alsa.c.version-with-patch 2004-03-24 05:02:10.776997872 +0000 +++ chan_alsa.c 2004-03-24 15:19:09.674270072 +0000 @@ -795,7 +795,7 @@ static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state) { struct ast_channel *tmp; - tmp = ast_channel_alloc(0); + tmp = ast_channel_alloc(1); if (tmp) { snprintf(tmp->name, sizeof(tmp->name), "ALSA/%s", indevname); tmp->type = type; @@ -950,8 +950,9 @@ return RESULT_FAILURE; } hookstate = 0; - if (alsa.owner) - needhangup++; + if (alsa.owner) { + ast_queue_hangup(alsa.owner, 1); + } return RESULT_SUCCESS; } @@ -995,7 +996,7 @@ strncpy(alsa.exten, mye, sizeof(alsa.exten)-1); strncpy(alsa.context, myc, sizeof(alsa.context)-1); hookstate = 1; - alsa_new(&alsa, AST_STATE_UP); + alsa_new(&alsa, AST_STATE_RINGING); } else ast_cli(fd, "No such extension '%s' in context '%s'\n", mye, myc); return RESULT_SUCCESS;