BLF with only one domain?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

BLF with only one domain?

maatohewetbi
I have a strange behaviour in Opensips. Look at this, In active_watchers table I get something like this:

presentity_ur i:sip:11111@sip.test.com.pl
watcher_username: 11111
watcher_domain: sip.test.com.pl
to_user: 11111
to_domain:  sip.test.com.p

so it means my user 11111 wants to look BLF of itself. And when a connection goes from certain server  to user 11111 it uses IP in Invite, not a domain name. When it happens, my BLF doesn't work although my user has a subscription. If I use a domain name in this Invite - it works ok. But the problem is, that I have many domains, pointing to one IP. My users can use all domains. So, how can I make Opensips BLF module work domain independently? My users should use BLF in every domain.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BLF with only one domain?

Bogdan-Andrei Iancu-2
"....And when a connection goes from certain server to user 11111 it
uses IP in Invite, not a domain name. "

Wrong ^^^^. If you want to subscribe to the same entity, the same SIP
URI must be in the RURI (same username, same domain) .

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/24/2017 03:55 PM, maatohewetbi wrote:

> I have a strange behaviour in Opensips. Look at this, In active_watchers
> table I get something like this:
>
> presentity_ur i:sip:[hidden email]
> watcher_username: 11111
> watcher_domain: sip.test.com.pl
> to_user: 11111
> to_domain:  sip.test.com.p
>
> so it means my user 11111 wants to look BLF of itself. And when a connection
> goes from certain server  to user 11111 it uses IP in Invite, not a domain
> name. When it happens, my BLF doesn't work although my user has a
> subscription. If I use a domain name in this Invite - it works ok. But the
> problem is, that I have many domains, pointing to one IP. My users can use
> all domains. So, how can I make Opensips BLF module work domain
> independently? My users should use BLF in every domain.
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/BLF-with-only-one-domain-tp7607133.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: BLF with only one domain?

maatohewetbi
I've realized that bla_presentity_spec (str) should do the trick:

modparam("presence", "bla_presentity_spec", "$var(bla_pres)")

I could set this module, and set a variable ($var(bla_pres)) to
$var(bla_pres) = "sip:" + $au + "@" + "192.168.0.111";
burt active_watchers table still show auto-generated values. Why is that? Did I miss something?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BLF with only one domain?

Bogdan-Andrei Iancu-2
Hi,

That param will not help you  (if I correctly understand your scenario).
Even if you leverage all the presentities at subscription time, what
about NOTIFY time. Here is the my case:
     * A@dom1 subscribers to B@dom1
     * in opensips, in SUBSCRIBE, you change B@dom1 into B@dom2
     * when you have a call involving B@dom2, a NOTIFY with B@dom2 will
be fired
     * A@dom1 receives a NOTIFY for B@dom2, for which A never subscribed
?!?!

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/25/2017 12:02 PM, maatohewetbi wrote:

> I've realized that bla_presentity_spec (str) should do the trick:
>
> modparam("presence", "bla_presentity_spec", "$var(bla_pres)")
>
> I could set this module, and set a variable ($var(bla_pres)) to
> $var(bla_pres) = "sip:" + $au + "@" + "192.168.0.111";
> burt active_watchers table still show auto-generated values. Why is that?
> Did I miss something?
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/BLF-with-only-one-domain-tp7607133p7607169.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: BLF with only one domain?

maatohewetbi
I think I didn't describe it correctly. Let me explain my scenario:

AsteriskBox1(IP:192.168.0.100)<-SIP->Opensips1.11(192.168.0.110)

Asterisk sends Invites to Opensips to an IP, eg. 192.168.0.110. Opensips listens on this IP, but it has also a few domains:
sip1.com
sip2.com
...
There are users, that uses different domain names to register to OpenSips. If one user registers to domain sip1.com, and he wants to know BLF states of other user which registers to sip2.com, it can't be done, because asterisk sends invite with an IP and SIP Presentity doesn't match. So I wanted to store every subscription with and IP(eg.: 123456789@192.168.0.110 instead of 123456789@sip1.com in active_watchers), even a user uses domain name. Ok, I can do it to tell a user to register using an IP, but I want them to use domain names instead of IP. So I wanted to use  modparam("presence", "bla_presentity_spec", "$var(bla_pres)")  to change it, but I might don't understand what it should do.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BLF with only one domain?

maatohewetbi
Can I get any response?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BLF with only one domain?

maatohewetbi
I think this param will not work for me, because I use event:dialog which is not supported in this function. So, how can I change presentity_uri before user subscription?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BLF with only one domain?

maatohewetbi
Maybe there is another way to change presentity_uri? I might want to rewrite uri before user subscription? Do You think it might help?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BLF with only one domain?

maatohewetbi
Before subscription, every data has to be loaded to cache and/or to database. If I want to change presentity_uri I can do it manually before subscription route is called. But I have to find out what variable I should set. Is anybody here who knows which variable store presentity_uri just to change it before saving into cache/database? I think this is the only way to change it.
Loading...