[asterisk-dev] Behaviour in trunk's pbx_config.c, app_stack.c and users.conf

Octavio Ruiz tacvbo at tacvbo.net
Mon Sep 3 22:28:42 CDT 2012


Tilghman and Richard,

> That eliminates the flexibility of there being different definitions
> depending upon the context in which a phone starts.  For example, you
> might want a different stdexten for outside callers than you do for
> internal callers.

That flexibility never existed before Gosub, and probably it's not a
feature expected for whom used Macros has subroutines or have a
completely AEL written dialplan and migrated from old version of
asterisk to new ones, meanwhile silently switching from Macro to Gosub
internally.

>There is an exception to this, and that is,
> if you need to call a subroutine written in AEL, you can use the
> AELSub() application for a consistent entry point.

You are right, so I came up with an idea to add an extra option for
stdexten in order to have that sane entry point for an AEL written
stdexten.

asterisk.conf would look like this:

;stdexten = gosub ; How to invoke the extensions.conf stdexten.
; macro  - Invoke the stdexten using a macro as
;          done by legacy Asterisk versions.
; aelsub - Invoke the stdexten sutbroutine using AELSub
;          when stdexten is defined in AEL.
; gosub  - Invoke the stdexten using a gosub as
;          documented in extensions.conf.sample.

code is here

http://pastebin.com/hbXRisZz

and I've filled a bug report with this, here:
https://issues.asterisk.org/jira/browse/ASTERISK-20355

After this thread, do you think this little improvement it's suitable
for make it into Asterisk?



More information about the asterisk-dev mailing list