[asterisk-users] 1.6.2 : global vars not read/set after #include w/ globals
Kevin P. Fleming
kpfleming at digium.com
Thu Feb 11 18:06:27 CST 2010
sean darcy wrote:
> OK, now clear on suffix v. prefix ( Doh! ) and having RTFM,
>
> I have extensions.conf:
>
> [general]
> ................
> #include exts/gvoice.exten.conf
>
>
> static=yes
> writeprotect=no
> autofallthrough=yes
>
> [globals]
> pstnline => DAHDI/4
> ...........
>
> and exts/gvoice.exten.conf:
>
> [globals](+)
> test-global => need-a-plus-sign
> .........
>
> But now:
>
> dialplan reload
> Dialplan reloaded.
> == Parsing '/etc/asterisk/extensions.conf': == Found
> ....................
> == Parsing '/etc/asterisk/exts/gvoice.exten.conf': == Found
> [Feb 11 18:39:52] WARNING[7443]: config.c:993 process_text_line:
> Category addition requested, but category 'globals' does not exist, line
> 1 of /etc/asterisk/exts/gvoice.exten.conf
The #include is being processed before the [globals] is seen in
extensions.conf, so the [globals](+) in gvoice.exten.conf is the first
time the parser sees 'globals'. The simple fix for this is to put an
empty [globals] at the very top of extensions.conf, then in any included
files (and later in extensions.conf), use the (+) syntax.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming at digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the asterisk-users
mailing list