Summary: | ASTERISK-12777: [patch] pbx_lua does not allow numeric strings as extension numbers | ||
Reporter: | Matthew Nicholson (mnicholson) | Labels: | |
Date Opened: | 2008-09-25 11:32:01 | Date Closed: | 2008-09-25 12:54:00 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | PBX/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) pbx_lua7.diff | |
Description: | If you put a numeric string as the extension number in a pbx_lua extension, pbx_lua will fail to execute the extension claiming it attempted to execute a nil value. This patch fixes that. ****** ADDITIONAL INFORMATION ****** This works: extensions = { default = { [100] = function() app.noop() end; } } This fails: extensions = { default = { ["100"] = function() app.noop() end; } } | ||
Comments: | By: Digium Subversion (svnbot) 2008-09-25 12:41:19 Repository: asterisk Revision: 144482 U trunk/pbx/pbx_lua.c ------------------------------------------------------------------------ r144482 | murf | 2008-09-25 12:41:18 -0500 (Thu, 25 Sep 2008) | 14 lines (closes issue ASTERISK-12777) Reported by: mnicholson Considering that the example extensions.lua used nothing but ["12345"] notation, and that the resulting error message: [Sep 24 17:01:16] ERROR[12393]: pbx_lua.c:1204 exec: Error executing lua extension: attempt to call a nil value is not very informative as to the nature of the problem, I think this bug fix is a big win! ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=144482 By: Matthew Nicholson (mnicholson) 2008-09-25 12:46:57 Should this go into 1.6.0 and 1.6.1 as well? By: Steve Murphy (murf) 2008-09-25 12:53:58 already is. |