[asterisk-dev] 11.0.0 bug in the new stdexten code in pbx_config.c
George Joseph
george.joseph at fairview5.com
Wed Oct 31 20:40:11 CDT 2012
Before I open a ticket I wanted to be sure I wasn't missing anything...
11.0.0 introduced a change to pbx_config where if "hasvoicemail" is set for
a user in users.conf, a "Gosub" is executed to "stdexten" (it used to be a
"Macro" call). Unfortunately, the parameters supplied to Gosub tell it to
jump to a PRIORITY named "stdexten" in the same context it was called from
(I.E. default) instead of the context named "stdexten" as Macro did.
Gosub has the syntax
Gosub([[context,]exten,]priority[(arg1[,...][,argN])])
The following code (where cat = user I.E 1000)...
snprintf(tmp, sizeof(tmp), "%s,stdexten(${HINT})", cat);
ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Gosub", ast_strdup(tmp),
ast_free_ptr, registrar);
...causes...
[Oct 28 18:44:35] WARNING[30034][C-00000003] pbx.c: Priority 'stdexten'
must be a number > 0, or valid label
[Oct 28 18:44:35] ERROR[30034][C-00000003] app_stack.c: Gosub address is
invalid: '1000,stdexten(SIP/1000)'
A more reasonable set of arguments would be...
snprintf(tmp, sizeof(tmp), "stdexten,%s,1(${HINT})", cat);
I mentioned this problem in issue
https://issues.asterisk.org/jira/browse/ASTERISK-18809 back in March there
was no response.
What am I missing? The way extensions.conf.sample is written supports my
"more reasonable" arguments where stdexten is a context so what was
originally intended? Does anyone have a extensions.conf sample that fits
the code?
Thanks...george
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121031/3713beef/attachment-0001.htm>
More information about the asterisk-dev
mailing list