2005-11-15 Kevin P. Fleming <kpfleming@limerick.digium.com>
+ * channels/chan_alsa.c (alsa_hangup): handle autohangup properly (issue #5672)
+
* channels/chan_misdn.c (and other files): various fixes (issue #5739)
* channels/chan_sip.c (handle_request_info): properly forward 'flash' events received via SIP INFO (issue #5751, different patch)
usecnt--;
ast_mutex_unlock(&usecnt_lock);
if (hookstate) {
- res = 2;
- write(sndcmd[1], &res, sizeof(res));
+ if (autoanswer) {
+ hookstate = 0;
+ } else {
+ /* Congestion noise */
+ res = 2;
+ write(sndcmd[1], &res, sizeof(res));
+ hookstate = 0;
+ }
}
snd_pcm_drop(alsa.icard);
ast_mutex_unlock(&alsalock);
/* Make congestion noise */
res = 2;
write(sndcmd[1], &res, sizeof(res));
+ hookstate = 0;
}
}
return 0;