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

Jared Smith jsmith at digium.com
Wed Apr 15 08:59:14 CDT 2009


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.


-- 
Jared Smith
Training Manager
Digium, Inc.




More information about the asterisk-dev mailing list