Registrar load branch flags

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Registrar load branch flags

Grant Bagdasarian-2
Hello,

I’m looking for a way to load the branch flags (set before calling save()) for a registered contact, without rewriting the request uri. Basically, test if the requested contact is registered, if so load its branch flags, but not rewrite the request uri. The lookup function provides the “B” flag, but this didn’t load the branch flags. I’ve also tried the other is_* functions exposed by the registrar module, but these also didn’t load the branch flags. 

Are there ways to accomplish this using already exposed functions in opensips or should I get creative and for instance use the sql_cacher to load the branch flags myself? 

Thanks and kind regards,

Grant

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Registrar load branch flags

Bogdan-Andrei Iancu-2
Hi Grant,

The branch flags seems to be exposed only via the lookup() function.

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/16/20 11:38 PM, Grant Bagdasarian wrote:
Hello,

I’m looking for a way to load the branch flags (set before calling save()) for a registered contact, without rewriting the request uri. Basically, test if the requested contact is registered, if so load its branch flags, but not rewrite the request uri. The lookup function provides the “B” flag, but this didn’t load the branch flags. I’ve also tried the other is_* functions exposed by the registrar module, but these also didn’t load the branch flags. 

Are there ways to accomplish this using already exposed functions in opensips or should I get creative and for instance use the sql_cacher to load the branch flags myself? 

Thanks and kind regards,

Grant

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Registrar load branch flags

Ben Newlin

You could try saving the request uri prior to calling lookup() and then restore it after. There’s also the $ou variable which provides the original request uri for the message prior to any modifications.

 

Ben Newlin

 

From: Users <[hidden email]> on behalf of Bogdan-Andrei Iancu <[hidden email]>
Reply-To: OpenSIPS users mailling list <[hidden email]>
Date: Friday, March 20, 2020 at 7:13 AM
To: OpenSIPS users mailling list <[hidden email]>, Grant Bagdasarian <[hidden email]>
Subject: Re: [OpenSIPS-Users] Registrar load branch flags

 

Hi Grant,

The branch flags seems to be exposed only via the lookup() function.

Regards,

Bogdan-Andrei Iancu
 
OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/
 

On 3/16/20 11:38 PM, Grant Bagdasarian wrote:

Hello,

 

I’m looking for a way to load the branch flags (set before calling save()) for a registered contact, without rewriting the request uri. Basically, test if the requested contact is registered, if so load its branch flags, but not rewrite the request uri. The lookup function provides the “B” flag, but this didn’t load the branch flags. I’ve also tried the other is_* functions exposed by the registrar module, but these also didn’t load the branch flags. 

 

Are there ways to accomplish this using already exposed functions in opensips or should I get creative and for instance use the sql_cacher to load the branch flags myself? 

 

Thanks and kind regards,

 

Grant



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users