[asterisk-dev] implementation suggestion (was: decrease Max-Forwards header)

Klaus Darilion klaus.mailinglists at pernau.at
Mon Sep 22 04:58:51 CDT 2008


Hi!

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?

klaus

Klaus Darilion schrieb:
> Hi!
> 
> Currently Asterisk sets the Max-Forwards header always to 70 for any 
> outgoing requests. IMO it would be cool to decrease the Max-Forwards on 
> outgoing SIP calls if the incoming channel is also a SIP channel. (E.g. 
> if you have multiple Asterisk servers mistakenly configured to route 
> calls in circle you could detect that loop).
> 
> What do you think about that?
> 
> regards
> klaus
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list