[asterisk-dev] Defining new section type in sip.conf - question about syntax

Michiel van Baak michiel at vanbaak.info
Wed Apr 15 13:01:55 CDT 2009


On 13:54, Wed 15 Apr 09, Leif Madsen wrote:
> 
> 
> Jared Smith wrote:
> > On Tue, 2009-04-14 at 21:47 +0200, Olle E. Johansson wrote:
> >> I want to find a way to define settings per domain, that applies as  
> >> defaults for devices within that domain. Instead of having only one  
> >> set of default settings in the general section, I want to be able to  
> >> have multiple default settings. I see two alternatives:
> >>
> >> 1. Using a prefix
> >> =============
> > 
> >> 2. Using type=
> >> ============
> > 
> > I'm strongly in favor of *not* using method number two.  It's hard
> > enough to explain users/peers/friends to people trying to learn Asterisk
> > (especially as we have cases where calls come into peers).  Overloading
> > the "type=" field for a totally different type of construct just further
> > muddies the waters.
> > 
> > I personally don't have a problem with doing [domain-jaredsmith.net], as
> > long as we use a hyphen and not an underscore after the word "domain" to
> > be consistent with macros, etc. (We have enough inconsistencies in
> > Asterisk as it is, and don't need to be adding more!)  
> > 
> > If people would rather move the per-domain settings to a separate config
> > file (say sip_domains.conf) I'm OK with it as well, as long as we
> > document that fact in both sip.conf and the new configuration file, so
> > that it doesn't surprise people too much.
> 
> My first instinct was that I'd prefer to see the 'type' method used, however 
> Jared and Olle do bring up good points about not wanting to overload that method 
> to get something else.
> 
> I'm not a big fan of using the prefix method, so would much prefer to see the 
> separate .conf file used. It seemed to be the best middle ground, as it were.

I agree with the seperate .conf file.
the prefix is too error-prone and may clash with current configuration.
(we have setups where the domain at foo.nl email address and domain-foo-nl
sip user are there for handling communication about the foo.nl domain)



-- 

Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer aficionados are both called users?"




More information about the asterisk-dev mailing list