summaryrefslogtreecommitdiff
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2002-01-13 18:51:27 +0000
committerMark Spencer <markster@digium.com>2002-01-13 18:51:27 +0000
commitc36135eebf6822c8f1ad1889daba07bfe53147d4 (patch)
tree6fd02493d44e48745b47e5aac27496e51758a646 /channels/chan_oss.c
parent0cbb5dd731bd89e16a70a332075098f7d667be3f (diff)
Version 0.1.11 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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;
}