[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-users
Subject: Re: [SR-Users] Use specific expires per User-Agent
From: mayamatakeshi <mayamatakeshi () gmail ! com>
Date: 2022-01-31 6:44:33
Message-ID: CABaNFCbQ=gm9xFEeo5TZLZMrVX5g9XvawDbQotXw-xMV2wF00g () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
That's what I need.
Thanks.
On Mon, Jan 31, 2022 at 3:20 PM Alex Balashov <abalashov@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@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@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@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
>
[Attachment #5 (text/html)]
<div dir="ltr"><div>That's what I need.</div><div>Thanks.</div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 31, 2022 at 3:20 PM \
Alex Balashov <<a \
href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br>
It sounds like you should be able to do this using a special XAVP called \
`xavp_cfg`:<br> <br>
<a href="https://kamailio.org/docs/modules/5.5.x/modules/registrar.html#registrar.p.xavp_cfg" \
rel="noreferrer" target="_blank">https://kamailio.org/docs/modules/5.5.x/modules/registrar.html#registrar.p.xavp_cfg</a><br>
<br>
Ignore the incorrect documentation for the ‘expires' parameter; it appears to be a \
duplicate of the summary for the ‘max_contacts' parameter.<br> <br>
— Alex<br>
<br>
> On Jan 31, 2022, at 1:15 AM, mayamatakeshi <<a \
href="mailto:mayamatakeshi@gmail.com" target="_blank">mayamatakeshi@gmail.com</a>> \
wrote:<br> > <br>
> Hi,<br>
> I have a requirement to specify a REGISTER max_expires based on the \
User-Agent.<br> > I checked the docs and it seems there is no pseudo-variable or \
something like that would permit this.<br> > I would like to be able to do \
something like this:<br> > if($ua ~= "Some-UA") {<br>
> $max_expires=100;<br>
> } else {<br>
> $max_expires=150;<br>
> }<br>
> save("location");<br>
> Is there some way to achieve this?<br>
> <br>
> __________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial Discussions<br>
> * <a href="mailto:sr-users@lists.kamailio.org" \
target="_blank">sr-users@lists.kamailio.org</a><br> > Important: keep the mailing \
list in the recipients, do not reply only to the sender!<br> > Edit mailing list \
options or unsubscribe:<br> > * <a \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" \
target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br> \
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" \
target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" \
rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br> <br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
* <a href="mailto:sr-users@lists.kamailio.org" \
target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the \
sender!<br> Edit mailing list options or unsubscribe:<br>
* <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" \
rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic