[SR-Users] Use specific expires per User-Agent

mayamatakeshi mayamatakeshi at gmail.com
Mon Jan 31 07:44:33 CET 2022


That's what I need.
Thanks.

On Mon, Jan 31, 2022 at 3:20 PM Alex Balashov <abalashov at evaristesys.com>
wrote:

> Hi,
>
> It sounds like you should be able to do this using a special XAVP called
> `xavp_cfg`:
>
>
> https://kamailio.org/docs/modules/5.5.x/modules/registrar.html#registrar.p.xavp_cfg
>
> Ignore the incorrect documentation for the ‘expires’ parameter; it appears
> to be a duplicate of the summary for the ‘max_contacts’ parameter.
>
> — Alex
>
> > On Jan 31, 2022, at 1:15 AM, mayamatakeshi <mayamatakeshi at gmail.com>
> wrote:
> >
> > Hi,
> > I have a requirement to specify a REGISTER max_expires based on the
> User-Agent.
> > I checked the docs and it seems there is no pseudo-variable or something
> like that would permit this.
> > I would like to be able to do something like this:
> > if($ua ~= "Some-UA") {
> >     $max_expires=100;
> > } else {
> >     $max_expires=150;
> > }
> > save("location");
> > Is there some way to achieve this?
> >
> > __________________________________________________________
> > Kamailio - Users Mailing List - Non Commercial Discussions
> >  * sr-users at lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
> >  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220131/082fa998/attachment.htm>


More information about the sr-users mailing list