[Serusers] Session-Expires Header
Jan Janak
jan at iptel.org
Wed Mar 9 14:24:55 CET 2005
On 09-03 11:04, Nils Ohlmeier wrote:
> On Wednesday 09 March 2005 02:17, Jiri Kuthan wrote:
> > At 11:04 PM 3/8/2005, Nils Ohlmeier wrote:
> > >Both UA's have to support the Session-Timer draft, otherwise the inserted
> > >Session-Expires Header will simply be ignored and you will never see any
> > >re-INVITE's. But if both UA's support the Session-Timer they should
> > > normaly agree on using automatically by looking at the Supported header.
> > > So in my opinion there is no extra value in adding a Session-Expires
> > > header to a request at a proxy.
> >
> > That's actually not correct. It is sufficient in one UA supports ST. It is
> > up to proxy server to handle the case correctly. We do that and there are
> > reasonable use cases.
>
> I did not wanted to write down this special case, but I feared that someone
> will come up with it :-)
> But in this special case you will also have to watch out for the replies, if
> they contain a Session-Expires header. The draft gives a fairly good overview
> what a new SER module would have to do ;-) (although it should also be doable
> in the script itself).
It can be done in the script, there is no need for a new module, we
have been using it with cisco gateways, they do support session timer,
so the proxy server inserts the headers into requests and replies.
You can test for an INVITE coming from cisco and set an onreply_route.
In the onreply_route you can do something like:
if (status =~ "2[0-9][0-9]") {
remove_hf("Session-Expires");
append_hf("Session-Expires: 120;refresher=UAC\r\n");
};
which "emulates" session-timer support in the user agent that sent 200
OK. After receiving such a reply, the cisco gateway would keep sending
re-INVITEs.
Jan.
More information about the sr-users
mailing list