[asterisk-users] Conditional "includes" in iax.conf

Kevin P. Fleming kpfleming at digium.com
Wed Jul 7 13:52:25 CDT 2010


On 07/07/2010 01:46 PM, Scott Stingel wrote:
> On 7/7/2010 11:25 AM, Danny Nicholas wrote:
>>
>> --
>> Rather than trying to determine what system you are on, just make the
>> included file be empty on all except the desired server.
>>
>>
>>    
> OK, thanks.  I thought I might have to do it that way, which is slightly 
> less desirable, as it makes the systems "different" from each other.

You could also enable 'execincludes' in asterisk.conf, then use #exec to
execute a small script (even just a shell script) that outputs the
desired iax.conf content for the server it is running on. That's much
easier and more effective than trying to put conditional logic and other
programming constructs into the configuration file reader.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming at digium.com
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list