diff -ur asterisk.hangfix/channels/chan_alsa.c asterisk/channels/chan_alsa.c --- asterisk.hangfix/channels/chan_alsa.c 2004-04-08 03:26:11.178825488 +0100 +++ asterisk/channels/chan_alsa.c 2004-04-07 17:46:39.000000000 +0100 @@ -267,9 +267,9 @@ while (hookstate) { /* When no doing announcements */ if (driver->cursound > -1) { - res = poll(&driver->pfd[0], driver->playback_nfds, 1000); + res = poll(&driver->pfd[0], driver->playback_nfds, -1); } else { - res = poll(&driver->pfd[ci], driver->capture_nfds, 1000); + res = poll(&driver->pfd[ci], driver->capture_nfds, -1); } /* When doing announcements */ @@ -282,7 +282,7 @@ } } else { snd_pcm_poll_descriptors_revents(driver->capture_handle, &driver->pfd[ci], driver->capture_nfds, &revents); - if ((revents & POLLERR) && (hookstate)) { + if (revents & POLLERR) { alsa_state = snd_pcm_state(driver->capture_handle); if (alsa_state == SND_PCM_STATE_XRUN) { snd_pcm_prepare(driver->capture_handle); @@ -292,7 +292,7 @@ snd_pcm_start(driver->capture_handle); } } - if ((revents & POLLIN) && (hookstate)) { + if (revents & POLLIN) { if (sound_capture(driver)) { ast_log(LOG_WARNING, "Failed to read sound\n"); }