[asterisk-dev] unexpected behavior between chan_sip and chan_iax2 configuration files

Paul Belanger pabelanger at digium.com
Sat Sep 10 15:04:52 CDT 2011


On 11-09-08 07:06 AM, Olle E. Johansson wrote:
>
> 8 sep 2011 kl. 12:50 skrev Kevin P. Fleming:
>
>> On 09/08/2011 12:45 AM, Olle E. Johansson wrote:
>>
>>> This is often confusing people as we teach. It depends on the setting.
>>>
>>> Compare with multiple rows of allow/disallow or permit/deny. IAX2 allows multiple context= lines where SIP and other channels does not.
>>
>> This is indeed correct; it is inconsistent across modules, and in some cases within a module. To throw yet another example on the fire, settings in chan_dahdi.conf are not 'processed' until a "channel=>" line is encountered, so if the same setting is seen multiple times, the last one seen 'wins' (as Paul was expecting in his original post).
>>
>> The semantics of how configuration settings are processed and applied varies by module, which is not ideal. In many cases it could probably be changed without losing any useful behavior, but it would have to be done very carefully.
>
> Agree. The realtime implementation also pushed us forward, in that we can separate multiple values with the same parameter name in one row, like
>
> context=staff;executives
>
> in iax.conf
>
> We have cleaned up a lot - the stuff in musiconhold.conf was changed years ago. I don't remember the state of agents.conf but the syntax definitely needs to be changed, like in dahdi. The template system should be used.
>
> Queues.conf has a way of adding members that adds one per line too.
>
> So much to do, but we have made real progress since 1.0.
>
Lots of good information, I'd like it to continue if possible :)

Obviously there are lots of specific settings for modules that are 
unique (EG: allow/disallow) however to keep things simple I created a 
patch for cdr.conf[1].  This is one of the most basic configuration 
files I found would need to be updated, if you have time please look at 
reviewboard.  This would bring things inline with how we iterate over 
other configuration files (EG: manager.conf, features.conf, sip.conf).

[1] https://reviewboard.asterisk.org/r/1426/

-- 
Paul Belanger
Digium, Inc. | Software Developer
twitter: pabelanger | IRC: pabelanger (Freenode)
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list