[OpenSIPS-Users] Check the User-Agent for registered user

Callum Guy callum.guy at x-on.co.uk
Mon Oct 17 07:10:17 UTC 2022


Hi Vlad,

Thank you for your recommendation, I can't use branch routes for my
implementation as I'm making the decision at registration time -
"User-Agent A" captures registrations from "User-Agent B", but not the
other way around.

It looks like attr_avp should get populated when using is_registered so
that will work well for me - I'm only expecting a single active
registration per AoR so this should be a good fit.

Many thanks for your help, I'll let you know if I run into any issues!

Callum

On Sat, 15 Oct 2022 at 09:54, Vlad Paiu <vladpaiu at opensips.org> wrote:

> Hello,
>
> At registration time you could save the User Agent in the attributes per
> registration [1] and at INVITE time you can check that in branch_route and
> make your decision there.
>
> [1]
> https://opensips.org/html/docs/modules/3.2.x/registrar.html#param_attr_avp
>
>
> Regards,
> Vlad
> On 14.10.2022 17:02, Callum Guy wrote:
>
> Hi All,
>
> I'm working on a project that requires me to evaluate the user agent of a
> registered contact before making a decision on a current registration
> attempt.
>
> Is there a method to do this natively? If not, what is the best approach?
>
> I haven't found anything yet, the current options i'm evaluating are to:
>
> 1. Use mi_script module to allow me to pull the contact record
> via ul_show_contact
> 2. Use rest_get to pull this data via a web service
>
> Neither is ideal for my requirements but both would do the job, I'm hoping
> someone in the community has a cleaner solution before I start!
>
> Best regards,
>
> Callum
>
>
>
> *0333 332 0000  |  x-on.co.uk <https://www.x-on.co.uk>  |   **
> <https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel>
>   <https://twitter.com/xonuk> **  |  Coronavirus
> <https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm>**
> |  Practice Index Reviews <https://practiceindex.co.uk/gp/x-on>*
>
> *Our new office address: 22 Riduna Park, Melton IP12 1QT.*
>
> *THE COMMS COUNCIL UK AWARDS 2022 AND Best Comms Software are trade marks
> of the Comms Council UK, used under licence -
> https://commscouncil.uk/awards <https://commscouncil.uk/awards>*
>
> X-on is a trading name of Storacall Technology Ltd a limited company
> registered in England and Wales.
> Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke,
> Hampshire, England RG25 2AD. Company Registration No. 2578478.
> The information in this e-mail is confidential and for use by the
> addressee(s) only. If you are not the intended recipient, please notify
> X-on immediately on +44(0)333 332 0000 and delete the
> message from your computer. If you are not a named addressee you must not
> use, disclose, disseminate, distribute, copy, print or reply to this email. Views
> or opinions expressed by an individual
> within this email may not necessarily reflect the views of X-on or its
> associated companies. Although X-on routinely screens for viruses,
> addressees should scan this email and any attachments
> for viruses. X-on makes no representation or warranty as to the absence of
> viruses in this email or any attachments.
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-- 






*0333 332 0000  |  x-on.co.uk <https://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> **  |  Coronavirus 
<https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm>**  |  
Practice Index Reviews <https://practiceindex.co.uk/gp/x-on>*

*Our new 
office address: 22 Riduna Park, Melton IP12 1QT.*







*THE COMMS COUNCIL 
UK AWARDS 2022 AND Best Comms Software are trade marks of the Comms Council 
UK, used under licence - https://commscouncil.uk/awards 
<https://commscouncil.uk/awards>*

X-on
is a trading name of Storacall 
Technology Ltd a limited company registered in
England and Wales.

Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, 
Hampshire, England RG25 2AD. Company Registration No. 2578478.

The 
information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately 
on +44(0)333 332 0000 and delete the
message from your computer. If you are 
not a named addressee you must not use,
disclose, disseminate, distribute, 
copy, print or reply to this email. Views
or opinions expressed by an 
individual
within this email may not necessarily
reflect the views of X-on 
or its associated companies. Although X-on routinely
screens for viruses, 
addressees should scan this email and any attachments
for
viruses. X-on 
makes no representation or warranty as to the absence of viruses
in this 
email or any attachments.








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221017/0d6d3619/attachment.html>


More information about the Users mailing list