Summary: | ASTERISK-04409: [patch] Add function to read a text string from a channel. | ||
Reporter: | Sarah Nordstrom (sarahemm) | Labels: | |
Date Opened: | 2005-06-13 18:08:17 | Date Closed: | 2008-01-15 15:38:46.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) recvtext-20050613-3-sn.diff | |
Description: | There is currently no way to read an entire string of text from a channel. The "ast_recvchar" and "RECEIVE CHAR" functions read one character from a channel, then discard the rest of the string. This functions fine for TDD MODE text and similar character-based text modes, but does not work for sending text from a local channel (app_sendtext) and such. There should be a command to read an entire string at once from a channel. ****** ADDITIONAL INFORMATION ****** The attached patch creates a new function accessable from apps called "ast_recvtext" that returns the string, and also exposes this via AGI as "RECEIVE TEXT", the opposite of the existing "SEND TEXT" command. The original "ast_recvchar" and "RECEIVE CHAR" functions are not modified, so as to not break applications that are currently using these functions. | ||
Comments: | By: Sarah Nordstrom (sarahemm) 2005-06-13 19:46:25 Uploaded patch recvtext-20050613-2-sn.diff which obsoletes patch recvtext-20050613-sn.diff. The new patch fixes multiple formatting issues, as well as adds a check for the return of malloc() to avoid dereferencing a null pointer if the malloc() fails. By: Sarah Nordstrom (sarahemm) 2005-06-13 20:10:52 Uploaded patch recvtext-20050613-3-sn.diff which obsoletes patch recvtext-20050613-2-sn.diff. The new patch fixes more formatting issues. By: Kevin P. Fleming (kpfleming) 2005-06-20 21:15:39 Committed to CVS HEAD with some minor doc fixes, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:38:46.000-0600 Repository: asterisk Revision: 5950 U trunk/channel.c U trunk/include/asterisk/channel.h U trunk/res/res_agi.c ------------------------------------------------------------------------ r5950 | kpfleming | 2008-01-15 15:38:45 -0600 (Tue, 15 Jan 2008) | 2 lines add AGI 'RECEIVE TEXT' command (bug ASTERISK-4409) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5950 |