[asterisk-users] Question regarding keywords in sip.conf/users.conf

Eric "ManxPower" Wieling eric at fnords.org
Mon Nov 3 23:57:07 CST 2008


Historically Asterisk's config file parser ignored unknown keywords. 
This is useful for exactly the things you are trying to do.  I hope 1.6 
did not remove this "feature".

Rob Hillis wrote:
> Barry L. Kline wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Rob Hillis wrote:
>>   
>>> Unfortunately RealTime isn't going to be an option - it's another level 
>>> of configuration I want to avoid, but more importantly since I'm 
>>> planning on being able to run these scripts on an Astlinux install, 
>>> there won't always be a MySQL database available.  If worst comes to 
>>> worst, and the extra configuration included in sip.conf becomes a 
>>> problem, I'll move it to another text-based config file - not my 
>>> preferred option (since I'd like to keep everything close-to-hand) but 
>>> not a major problem since I'm likely to need a separate config file for 
>>> global configuration options anyway.
>>>     
>> You could still store them in sip.conf, just make each line a comment.
>>
>> e.g.:
>> ;[myentry]keyword=value
>> ;[myentry]keyword=value
>>
>> You could then search for ;[myentry] for your keywords and strip them
>> off when you write out the real entries.
>>   
> 
> I did think of that, but the idea of using something that's actually a 
> comment as configuration seems fraught with danger - not to mention it 
> being an awful hack.


-- 
Consulting and design services for LAN, WAN, voice and data.  Based near 
Birmingham, AL.  Now accepting clients worldwide. Contact me for Tellabs 
echo canceling systems.  Also see http://www.fnords.org/skillslist.html



More information about the asterisk-users mailing list