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

Chris Lee cslee-list at cybericom.co.uk
Thu Apr 16 05:01:26 CDT 2009


Tzafrir Cohen wrote:
> On Tue, Apr 14, 2009 at 04:08:45PM -0500, Kevin P. Fleming wrote:
>   
>> Olle E. Johansson wrote:
>>
>>     
>>> I personally favour #1, even though it's not very beautiful. It's used  
>>> today in Asterisk.
>>>       
>> I prefer that as well, although there is of course the risk that the
>> chosen naming pattern will conflict with actual peer/user entry names
>> that some user is already using.
>>
>> There is a third option, not necessarily prettier, but that is to just
>> create another configuration file (sip_domains.conf or something
>> similar). The Asterisk configuration mechanism is really only designed
>> to handle one type of 'object' per configuration file, and even the
>> example you specified for extensions.conf they are still all the same
>> type of 'object' (a dialplan context), they just have different semantic
>> meaning.
>>     
>
> Just to clarify things:
>
> Do you think that there's any use for:
>
> [common](!)
> <some stuff>
>
> [example.org](common)
> type = domain
> <domain stuff>
>
> [peer-example](common)
> type = peer
> <peer stuff>
>
>   
What about allowing a complex directive in the [general] section like:
[general]
<some stuff>
domain={
name=test.com
bindaddr=10.1.1.1
bindport=5060
<other domain stuff>
}

[peer1]
<some peer stuff>

[peer2]
<some peer stuff>
...

Not sure that is even worth 2 cents, but it is how it works best for me.


Chris.



More information about the asterisk-dev mailing list