aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_oss.c')
-rwxr-xr-xchannels/chan_oss.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 3959cda13..297c578c1 100755
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -476,8 +476,14 @@ static int oss_hangup(struct ast_channel *c)
needhangup = 0;
needanswer = 0;
if (hookstate) {
- res = 2;
- write(sndcmd[1], &res, sizeof(res));
+ if (autoanswer) {
+ /* Assume auto-hangup too */
+ hookstate = 0;
+ } else {
+ /* Make congestion noise */
+ res = 2;
+ write(sndcmd[1], &res, sizeof(res));
+ }
}
return 0;
}