[Home]

Summary:ASTERISK-04268: [patch] TDD MODE ON command hangs up channel if TDD MODE not supported by that channel.
Reporter:Sarah Nordstrom (sarahemm)Labels:
Date Opened:2005-05-24 20:34:47Date Closed:2011-06-07 14:10:04
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_agi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) tddmode.fix-20050605-sn.diff
Description:If the TDD MODE ON command is executed against a channel that does not support TDD MODE, the channel is hung up.  The proper behavior according to the documentation is to return 0 if it is unsupported (1 if it is supported and enabled).

****** ADDITIONAL INFORMATION ******

Function 'ast_channel_setoption' in 'channel.c' is returning -1 and errno=ENOSYS for channels that do not have the 'setoption' function defined.  This function is used to set TDD MODE.  If a channel does not have this function, setting any options on the channel generates an error, and appears to hang up the channel.  The TDD MODE option should not do this, instead it should return zero.
The attached patch does fix the issue, however i'm fairly new to Asterisk code, and it may not be the right place/way to fix the issue.
I have faxed a signed disclaimer.
Comments:By: twisted (twisted) 2005-05-25 00:02:04

I still think the if statement for TDD should just define the return as discussed on IRC.  Can someone experienced in AGI confirm this issue and see if the patch fixes it?

Thanks.

By: Sarah Nordstrom (sarahemm) 2005-06-03 14:47:30

Uploaded patch tddmode.fix-20050603-sn.diff which obsoletes patch tddmode.fix-20050524-sn.diff.  The new patch is simpler, clearer, and incorporates the note added by twisted on 05-25-05.

By: Kevin P. Fleming (kpfleming) 2005-06-05 12:00:47

I'm not sure we should change the behavior for all callers of ast_channel_setoption() like this... I didn't see your original patch, but did it just change res_agi.c?

By: Sarah Nordstrom (sarahemm) 2005-06-05 12:50:24

Agreed, kpfleming.  The older patch didn't specifically target AGI either, it was just less-clean, but doing the same thing as the current patch.  I'll prepare a new patch that's AGI specific.  Not sure why I didn't do that in the first place ;)
Should be ready in an hour or two.

By: Sarah Nordstrom (sarahemm) 2005-06-05 13:40:53

Uploaded patch tddmode.fix-20050605-sn.diff which obsoletes patch  tddmode.fix-20050603-sn.diff.  The new patch affects only the TDD MODE AGI command, and not anything else internal to Asterisk, as per kpfleming's note.

By: Kevin P. Fleming (kpfleming) 2005-06-05 16:58:09

Committed to CVS HEAD, thanks!

By: Russell Bryant (russell) 2005-06-14 15:44:20

fixed in 1.0 as well

By: Digium Subversion (svnbot) 2008-01-15 15:37:17.000-0600

Repository: asterisk
Revision: 5851

U   trunk/res/res_agi.c

------------------------------------------------------------------------
r5851 | kpfleming | 2008-01-15 15:37:16 -0600 (Tue, 15 Jan 2008) | 2 lines

make AGI 'TDD MODE' command behave as documented when the channel doesn't support options (bug ASTERISK-4268)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5851

By: Digium Subversion (svnbot) 2008-01-15 15:38:10.000-0600

Repository: asterisk
Revision: 5909

U   branches/v1-0/res/res_agi.c

------------------------------------------------------------------------
r5909 | russell | 2008-01-15 15:38:10 -0600 (Tue, 15 Jan 2008) | 2 lines

don't kill the call if tdd mode is not supported by a channel (bug ASTERISK-4268)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5909