Summary: | ASTERISK-14194: [patch] Patch to allow tone-list as argument to ReadExten | ||
Reporter: | John Covert (jcovert) | Labels: | |
Date Opened: | 2009-05-22 10:32:19 | Date Closed: | 2010-07-05 08:41:33 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_readexten |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_readexten.c.patch | |
Description: | It is desirable to allow ReadExten to prompt with tones that are specific to the use of ReadExten. This patch allows support of tones (a) not in indications.conf and/or (b) independent of the tone-zone. With no flag, the "filename" argument causes ReadExten to play the file in the background. There is an "i" flag, which causes it to look the "filename" argument up in indications.conf and play the tone sequence instead. Current behaviour if the "indication" isn't found is to fall back to trying to treat it as a filename (even though "i" is given). That will probably fail. The attached patch allows a tone sequence to be specified instead of an indication. Effectively, if the "i" option is specified, the filename argument is treated exactly like an argument to the "Playtones" application. Since the Playtones application accepts "|" as a separator, even a multiple tone sequence may be specified. example: exten => s,n,ReadExten(exten,390+460/400|330+400,unrestricteddisa,i,20) This plays 390+440 for 400 ms and then 330+400 from then on. ****** ADDITIONAL INFORMATION ****** Note: I developed and tested this on 1.6.0.3 but this diff between the two indicates that there should be no problem taking this forward: diff asterisk-1.6.0.3/apps/app_readexten.c asterisk-1.6.0.9/apps/app_readexten.c 30c30 < ASTERISK_FILE_VERSION(__FILE__, "$Revision: 89522 $") --- > ASTERISK_FILE_VERSION(__FILE__, "$Revision: 168564 $") 82c82 < struct ind_tone_zone_sound *ts = NULL; --- > struct tone_zone_sound *ts = NULL; | ||
Comments: | By: Jason Parker (jparker) 2009-12-14 15:26:26.000-0600 I'm about to commit something slightly different. My method will fix the flaw you suggested might exist, and maintain backwards compatibility. By: Digium Subversion (svnbot) 2009-12-14 15:32:05.000-0600 Repository: asterisk Revision: 234776 U trunk/apps/app_readexten.c ------------------------------------------------------------------------ r234776 | qwell | 2009-12-14 15:32:04 -0600 (Mon, 14 Dec 2009) | 12 lines Allow tonelist as argument to ReadExten. ReadExten already supported playing a tonezone from indications.conf. It now has the ability to use a tonelist like 440+480/2000|0/4000 (closes issue ASTERISK-14194) Reported by: jcovert Patches: app_readexten.c.patch uploaded by jcovert (license 551) Tested by: qwell Patch modified by me, to maintain backwards compatibility. ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234776 By: Digium Subversion (svnbot) 2009-12-14 15:32:31.000-0600 Repository: asterisk Revision: 234777 _U branches/1.6.0/ ------------------------------------------------------------------------ r234777 | qwell | 2009-12-14 15:32:30 -0600 (Mon, 14 Dec 2009) | 18 lines Blocked revisions 234776 via svnmerge ........ r234776 | qwell | 2009-12-14 15:32:03 -0600 (Mon, 14 Dec 2009) | 12 lines Allow tonelist as argument to ReadExten. ReadExten already supported playing a tonezone from indications.conf. It now has the ability to use a tonelist like 440+480/2000|0/4000 (closes issue ASTERISK-14194) Reported by: jcovert Patches: app_readexten.c.patch uploaded by jcovert (license 551) Tested by: qwell Patch modified by me, to maintain backwards compatibility. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234777 By: Digium Subversion (svnbot) 2009-12-14 15:32:48.000-0600 Repository: asterisk Revision: 234778 _U branches/1.6.1/ ------------------------------------------------------------------------ r234778 | qwell | 2009-12-14 15:32:48 -0600 (Mon, 14 Dec 2009) | 18 lines Blocked revisions 234776 via svnmerge ........ r234776 | qwell | 2009-12-14 15:32:03 -0600 (Mon, 14 Dec 2009) | 12 lines Allow tonelist as argument to ReadExten. ReadExten already supported playing a tonezone from indications.conf. It now has the ability to use a tonelist like 440+480/2000|0/4000 (closes issue ASTERISK-14194) Reported by: jcovert Patches: app_readexten.c.patch uploaded by jcovert (license 551) Tested by: qwell Patch modified by me, to maintain backwards compatibility. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234778 By: Digium Subversion (svnbot) 2009-12-14 15:33:10.000-0600 Repository: asterisk Revision: 234779 _U branches/1.6.2/ ------------------------------------------------------------------------ r234779 | qwell | 2009-12-14 15:33:09 -0600 (Mon, 14 Dec 2009) | 18 lines Blocked revisions 234776 via svnmerge ........ r234776 | qwell | 2009-12-14 15:32:03 -0600 (Mon, 14 Dec 2009) | 12 lines Allow tonelist as argument to ReadExten. ReadExten already supported playing a tonezone from indications.conf. It now has the ability to use a tonelist like 440+480/2000|0/4000 (closes issue ASTERISK-14194) Reported by: jcovert Patches: app_readexten.c.patch uploaded by jcovert (license 551) Tested by: qwell Patch modified by me, to maintain backwards compatibility. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234779 |