[asterisk-users] #include changes in 1.4
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Thu Sep 4 09:22:12 CDT 2008
On Thursday 04 September 2008 04:25:27 Chris Bagnall wrote:
> I finally got round to upgrading a few of our 1.2 servers to 1.4 over the
> last few days. Most of the changes in config files went without a hitch,
> but this one bothers me:
>
> ERROR[15836]: config.c:750 process_text_line: Future versions of Asterisk
> will treat a #include of a file that does not exist as an error, and will
> fail to load that configuration file. Please ensure that the file
> '*/iax.conf' exists, even if it is empty.
>
> The iax.conf on these servers contains general parameters common to all
> users who connect, with the following line at the bottom:
>
> #include */iax.conf
>
> The idea being each user has a subdirectory containing their user-specific
> config data, so it would usually contain either sip.conf or iax.conf,
> always extensions.conf, and possibly dundi.conf
>
> Will this method no longer work in 1.6 upwards? I'm sure there must be
> others who've taken a similar approach to ensuring user portability between
> servers (moving users is as simple as grabbing the user-specific directory
> and dropping it on a different server). Do I need to ensure there's an
> empty file for each include in each directory?
Yes, an empty file would do the trick, but I think you only need one in a
single directory for the glob not to return a warning.
The issue has been that in the past, Asterisk would silently ignore a file
which did not exist, which created problems for people who might have a simple
typo in their #include names and thus create nonworking dialplans.
If this would create a real problem for you, I'm sure we could find
alternative ways around this. Perhaps a warning that a file does not exist
is enough of a warning that somebody can either ignore (at their own peril)
or fix.
--
Tilghman
More information about the asterisk-users
mailing list