[asterisk-dev] implementation suggestion

Kevin P. Fleming kpfleming at digium.com
Mon Sep 22 08:27:55 CDT 2008


Klaus Darilion wrote:

> I started thinking about how to implement this feature. What about:
> 
> 1. Define a channel data store "SIPopts".
> 2. On incoming SIP calls, the SIPopts channel data store is created, the 
> member maxfwd is set to the value of the incoming Max-Forwards Header 
> and the channel data store will be linked to the incoming channel as 
> "global".
> 3. Dial() applikation will copy ghe globel data store to all outgoing 
> channels.
> 4. If the outgoing channel is a SIP channel, chan_sip will check if the 
> destination (peer) has set decmaxfwd==true and if yes, it will set 
> Max-Forwards to the value in the data store minus 1 instead of using 70.
> 
> What do you think about this?

Well, I would suggest making the variable and config option names a bit
more expressive (no need for such short abbreviated names), but other
than that this is an excellent approach, and exactly why we created
datastores in the first place.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list