Summary: | ASTERISK-05524: [patch] When "autoanswer=yes" channel doesn't auto hangup. | ||
Reporter: | Dmytro Mishchenko (arkadia) | Labels: | |
Date Opened: | 2005-11-09 06:00:09.000-0600 | Date Closed: | 2008-01-15 15:56:12.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_alsa |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20051115__alsa_autohangup.diff.txt | |
Description: | chan_oss (old & new version) autohangup when "autoanswer=yes". It'll be great to have the same behavior at ALSA driver. The fix is trivial: alsa_hangup() should have the same code as you see in chan_oss_old.c oss_hangup(). ..... if (autoanswer) { /* Assume auto-hangup too */ hookstate = 0; } else { /* Make congestion noise */ res = 2; write(sndcmd[1], &res, sizeof(res)); } .... I've tested such fix. Works fine. | ||
Comments: | By: Matt O'Gorman (mogorman) 2005-11-09 10:14:40.000-0600 you will need a disclaimer for any code contributed, even if it is an obvious one liner. By: Matt O'Gorman (mogorman) 2005-11-09 10:15:31.000-0600 oops looking at your history it seems as if you already do have one on file, please say this next time. By: Tilghman Lesher (tilghman) 2005-11-09 10:20:48.000-0600 It would appear that chan_alsa already has code to support setting a hangup, if the hookstate is set to non-zero (off-hook). If there's a problem with the hookstate not getting set, then we need to fix that, instead. By: Dmytro Mishchenko (arkadia) 2005-11-10 01:36:41.000-0600 mogorman: I'm not submitting the new code. I'm saying that the code which exists at chan_oss_old.c, already written by somebody and disclaimed can be applied to chan_alsa.c to make channels behavior consistent. Please correct me if it wrong. Right now for one channel: autoanswer means - autoanswer and auto hangup (which is good IMHO), and for another channel it means autoanswer only. Corydon76: check current alsa_hangup() code and you'll see that there is no code for reseting hookstate. Then compare it to oss_hangup() from chan_oss_old.c By: Tilghman Lesher (tilghman) 2005-11-15 15:48:06.000-0600 Patch uploaded. By: Kevin P. Fleming (kpfleming) 2005-11-15 16:06:31.000-0600 Committed to CVS HEAD, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:56:12.000-0600 Repository: asterisk Revision: 7106 U trunk/ChangeLog U trunk/channels/chan_alsa.c U trunk/channels/chan_oss_old.c ------------------------------------------------------------------------ r7106 | kpfleming | 2008-01-15 15:56:11 -0600 (Tue, 15 Jan 2008) | 2 lines issue ASTERISK-5524 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7106 |