[asterisk-users] Override sip.conf settings in extensions.conf? Possible?
Josh Fuller
Josh.Fuller at TELUS.COM
Fri May 8 10:59:42 CDT 2009
> > Does anyone know if it is possible to override sip.conf settings in
> extensions.conf
> > (for example: session-minse=90) without needing to create an overarching
> peer in sip.conf
> > and selecting it specifically in the dial plan?
> >
>
> You can do this to some extent starting with Asterisk 1.6.1. With the
> AST_CONFIG
> function, you can change a configuration file from the dialplan. The
> problem is
> that you would also have to reload the configuration file so that the
> change
> would take effect. After the call was completed, you would then have to
> reset
> the value of the option and reload the config file again, since you only
> want
> the option set for one call.
>
> If this doesn't sound absolutely horrible to you and you want the same
> functionality in Asterisk 1.4, you may be able to get away with simply
> copying
> func_config.c from Asterisk 1.6.1 into Asterisk 1.4's funcs/ directory. I
> haven't tried this myself, so I don't know what tweaks, if any, would be
> required to make the code compile.
>
> > I'm on the 1.4 stable code base and looking to implement session-timers
> on certain call
> > flows in a modular dial plan.
> >
>
> (Sorry if I'm not making the correct logical leap here)
>
> Being able to set the session-timers variables via the dialplan will not
> be
> sufficient in 1.4 in order to enable session timers on certain calls. You
> would
> also have to modify chan_sip.c so that the Asterisk would understand the
> concept
> of session timers and how to properly behave.
>
> Mark Michelson
Thanks for the fantastic answer, Mark. I'm hesitant to migrate to 1.6 because some
of the servers I want to make these changes on are production units.
I think-- based on what you've suggested-- that the best action for me would be
to clone my sip peer definitions in sip.conf and add the specific session-timers
I need for origination in the peer.
Then, I can just call the alternate peer with timers invoked. I've used this
successfully in the past to create unknown and anonymous calls so I think this is
the easiest course.
I'm not opposed to hacking code but it seems redundant when chan_sip technically
already has the functionality I need.
At any rate, great answer! You did make the correct logical leap, by the way. It's
nice to see an answer right from Digium on this question as well. We use your cards
in our labs and production and find your hardware very useful.
Thanks,
Josh Fuller josh.fuller at telus.com
The views expressed in this e-mail are mine alone and do not necessarily reflect the
views of my employer.
More information about the asterisk-users
mailing list