B2B user agent logic

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

B2B user agent logic

Donat Zenichev
Hello OpenSIPS community!

I have a brief question regarding how to better implement B2B user agent logic, within OpenSIPS installation.

The goal is quite simple:
- I have OpenSIPS as a routing system (making decisions on calls)
- OpenSIPS at the same time separates dialog into two legs (so two Call-IDs as result)

Firstly I've started looking into b2b_logic + b2b_entities modules
I read manuals provided by OpenSIPS dev team and everything is quite clear for me.

But, from what I understand provided b2b module is not compatible with a dialog module
(paragraph 6 at Back-to-Back User Agent manual).
But dialog module is quite significant for me, at least since of "dialog_replication_cluster" parameter.

Another feature of the b2b_logic module is, that it only implements scenarios within a separate xml configuration file. And from the script routing you're only able to access coming requests and responses in a read-only mode.

To sum up, the general goal is to separate call into two legs, to let both legs have different call-ids. And it's also quite important to be able to rule changes on requests (e.g. resetting of R-URI) from the routing script.

Everything from mentioned above led me to a thought, that there could be some much elaborate solution for implementation of B2B within OpenSIPS installation.
For sure b2b_logic and b2b_entities modules are great! But still I'm looking for a bit different installation.

I know, OpenSIPS is a SIP proxy and it's not supposed to be run with a role of B2BUA.
But still, might be someone can share his/her own experience and hint some better way out for this?

Many thanks in advance and have a nice day!



--

Best regards,
Donat Zenichev


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

Re: B2B user agent logic

Ben Newlin

If you just need to change the Call-ID you can look at the topology_hiding module [1]. It has the ability to mangle the Call-ID in addition to other identifying information. If you must have B2BUA functionality that won’t work.

 

I believe that the B2BUA messages can be “caught” and modified to some extent in local_route [2].

 

[1] - https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html

[2] - https://www.opensips.org/Documentation/Script-Routes-3-0#toc6

 

Ben Newlin

 

From: Users <[hidden email]> on behalf of Donat Zenichev <[hidden email]>
Reply-To: OpenSIPS users mailling list <[hidden email]>
Date: Friday, January 10, 2020 at 10:22 AM
To: "[hidden email]" <[hidden email]>
Subject: [OpenSIPS-Users] B2B user agent logic

 

Hello OpenSIPS community!

 

I have a brief question regarding how to better implement B2B user agent logic, within OpenSIPS installation.

 

The goal is quite simple:

- I have OpenSIPS as a routing system (making decisions on calls)

- OpenSIPS at the same time separates dialog into two legs (so two Call-IDs as result)

 

Firstly I've started looking into b2b_logic + b2b_entities modules

I read manuals provided by OpenSIPS dev team and everything is quite clear for me.

 

But, from what I understand provided b2b module is not compatible with a dialog module

(paragraph 6 at Back-to-Back User Agent manual).

But dialog module is quite significant for me, at least since of "dialog_replication_cluster" parameter.

 

Another feature of the b2b_logic module is, that it only implements scenarios within a separate xml configuration file. And from the script routing you're only able to access coming requests and responses in a read-only mode.

 

To sum up, the general goal is to separate call into two legs, to let both legs have different call-ids. And it's also quite important to be able to rule changes on requests (e.g. resetting of R-URI) from the routing script.

 

Everything from mentioned above led me to a thought, that there could be some much elaborate solution for implementation of B2B within OpenSIPS installation.

For sure b2b_logic and b2b_entities modules are great! But still I'm looking for a bit different installation.

 

I know, OpenSIPS is a SIP proxy and it's not supposed to be run with a role of B2BUA.

But still, might be someone can share his/her own experience and hint some better way out for this?

 

Many thanks in advance and have a nice day!

 

 


--

 

Best regards,

Donat Zenichev


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

Re: B2B user agent logic

Răzvan Crainea-2
In reply to this post by Donat Zenichev
Hi, Donat!

Indeed, the B2B module(s) are not compatible with the dialog module.
However, if your purpose is just to have different callids between the
two legs, why not using the topology hiding module[1], which does change
the callids (using the "C" flag for the topology_hiding() function[2])
and is built on top of the dialog module.
The B2B does indeed offer a similar behavior, but it is usually used for
  much more complex calling scenarios - if you don't need those complex
scenarios, simply use the topology_hiding mode.

[1] https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html
[2]
https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html#func_topology_hiding

Best regards,
Răzvan

On 1/10/20 5:21 PM, Donat Zenichev wrote:

> Hello OpenSIPS community!
>
> I have a brief question regarding how to better implement B2B user agent
> logic, within OpenSIPS installation.
>
> The goal is quite simple:
> - I have OpenSIPS as a routing system (making decisions on calls)
> - OpenSIPS at the same time separates dialog into two legs (so two
> Call-IDs as result)
>
> Firstly I've started looking into b2b_logic + b2b_entities modules
> I read manuals provided by OpenSIPS dev team and everything is quite
> clear for me.
>
> But, from what I understand provided b2b module is not compatible with a
> dialog module
> (paragraph 6 at Back-to-Back User Agent manual).
> But dialog module is quite significant for me, at least since of
> "dialog_replication_cluster" parameter.
>
> Another feature of the b2b_logic module is, that it only implements
> scenarios within a separate xml configuration file. And from the script
> routing you're only able to access coming requests and responses in a
> read-only mode.
>
> To sum up, the general goal is to separate call into two legs, to let
> both legs have different call-ids. And it's also quite important to be
> able to rule changes on requests (e.g. resetting of R-URI) from the
> routing script.
>
> Everything from mentioned above led me to a thought, that there could be
> some much elaborate solution for implementation of B2B within OpenSIPS
> installation.
> For sure b2b_logic and b2b_entities modules are great! But still I'm
> looking for a bit different installation.
>
> I know, OpenSIPS is a SIP proxy and it's not supposed to be run with a
> role of B2BUA.
> But still, might be someone can share his/her own experience and hint
> some better way out for this?
>
> Many thanks in advance and have a nice day!
>
>
>
> --
>
> Best regards,
> Donat Zenichev
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com

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

Re: B2B user agent logic

Donat Zenichev
First of all thanks for your replies Răzvan and Ben.

Ben, the case with local_route might be the thing I need. I read a bit on the matter, but haven’t digged into it deeply yet. 
I will try to play with this, one of these days, and will share my experience to OpenSIPS community.

From what I got, local_route first of all gives a possibility to catch and then edit messages coming to B2Bua. Am I wrong?

Răzvan, yes topology hiding module fits this demand and I guess this is even more simple implementation in comparison with B2B.

The idea I’m trying to follow, is that OpenSIPS plays a role of a routing server for a border controller. And the border controller in its turn can consider an INVITE (with already changed destination) having the same call-id as a loop.
Thus routing solution can be implemented using two ways:
- 3XX redirection server
- B2BUA that divides a call into two legs

I guess, topology hiding module fits the second case (when I need to divide a call) just fine.

I will try both ways with topology hiding module and local_route of b2b module(s) and see which one fits better.
Of course I will share my experience in the end!

Have a nice day!




On Fri, 10 Jan 2020 at 5:43 PM, Răzvan Crainea <[hidden email]> wrote:
Hi, Donat!

Indeed, the B2B module(s) are not compatible with the dialog module.
However, if your purpose is just to have different callids between the
two legs, why not using the topology hiding module[1], which does change
the callids (using the "C" flag for the topology_hiding() function[2])
and is built on top of the dialog module.
The B2B does indeed offer a similar behavior, but it is usually used for
  much more complex calling scenarios - if you don't need those complex
scenarios, simply use the topology_hiding mode.

[1] https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html
[2]
https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html#func_topology_hiding

Best regards,
Răzvan

On 1/10/20 5:21 PM, Donat Zenichev wrote:
> Hello OpenSIPS community!
>
> I have a brief question regarding how to better implement B2B user agent
> logic, within OpenSIPS installation.
>
> The goal is quite simple:
> - I have OpenSIPS as a routing system (making decisions on calls)
> - OpenSIPS at the same time separates dialog into two legs (so two
> Call-IDs as result)
>
> Firstly I've started looking into b2b_logic + b2b_entities modules
> I read manuals provided by OpenSIPS dev team and everything is quite
> clear for me.
>
> But, from what I understand provided b2b module is not compatible with a
> dialog module
> (paragraph 6 at Back-to-Back User Agent manual).
> But dialog module is quite significant for me, at least since of
> "dialog_replication_cluster" parameter.
>
> Another feature of the b2b_logic module is, that it only implements
> scenarios within a separate xml configuration file. And from the script
> routing you're only able to access coming requests and responses in a
> read-only mode.
>
> To sum up, the general goal is to separate call into two legs, to let
> both legs have different call-ids. And it's also quite important to be
> able to rule changes on requests (e.g. resetting of R-URI) from the
> routing script.
>
> Everything from mentioned above led me to a thought, that there could be
> some much elaborate solution for implementation of B2B within OpenSIPS
> installation.
> For sure b2b_logic and b2b_entities modules are great! But still I'm
> looking for a bit different installation.
>
> I know, OpenSIPS is a SIP proxy and it's not supposed to be run with a
> role of B2BUA.
> But still, might be someone can share his/her own experience and hint
> some better way out for this?
>
> Many thanks in advance and have a nice day!
>
>
>
> --
>
> Best regards,
> Donat Zenichev
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com

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

Best regards,
Donat Zenichev


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

Re: B2B user agent logic

Donat Zenichev
Hi there.
I finished working on it and I tested this during a while.

The way with topology_hiding module turned out to be the best fit.
First of all because it's much more simple in terms of configuring.
And I don't need to do any elaborate configuration and just change call-id of INVITE request using this module.
It worked out fine, border controller thinks that this is a brand-new call and doesn't consider this (routed) INVITE as a loop.

The way with B2B_logic/B2B_entities modules was not the best fit.
First of all because its configuration takes more time and is harder for understanding, thus is harder in terms of issues investigation (when it comes to issues).
Another thing is that it doesn't work (as it was said last time) with a dialog module, that actually plays a huge role in my environment.
And the last one thing I wanna mention regarding this module - it doesn't have any built-in capabilities to implement failover mechanism (so migration of on-going calls to a stand-by side).
Or am I missing something?

And 3XX redirection server.
This one is also a good way to route calls. It's simple as that, you just reset a destination URI and send 302 response.
That's all. You just need to have a logic for processing 3XX replies on the remote side (to which you send 3XX responses).

So, to summarize.
The fastest and the lightest way to implement (or to be honest - to imitate) B2B UA is - topology_hiding module.
But this only works until you don't need a real B2B functionality.
The advantage of this solution is - an ability to manipulate coming/outgoing messages in a simple way (directly from OpenSIPS routes).

And you might as well use Redirection server, in case a remote side supports 3XX messages processing.
This way is even more simple, since you literally add 4 lines in your route code and it starts working.

Thanks again for given advice and have a nice day!





On Sat, Jan 11, 2020 at 12:38 PM Donat Zenichev <[hidden email]> wrote:
First of all thanks for your replies Răzvan and Ben.

Ben, the case with local_route might be the thing I need. I read a bit on the matter, but haven’t digged into it deeply yet. 
I will try to play with this, one of these days, and will share my experience to OpenSIPS community.

From what I got, local_route first of all gives a possibility to catch and then edit messages coming to B2Bua. Am I wrong?

Răzvan, yes topology hiding module fits this demand and I guess this is even more simple implementation in comparison with B2B.

The idea I’m trying to follow, is that OpenSIPS plays a role of a routing server for a border controller. And the border controller in its turn can consider an INVITE (with already changed destination) having the same call-id as a loop.
Thus routing solution can be implemented using two ways:
- 3XX redirection server
- B2BUA that divides a call into two legs

I guess, topology hiding module fits the second case (when I need to divide a call) just fine.

I will try both ways with topology hiding module and local_route of b2b module(s) and see which one fits better.
Of course I will share my experience in the end!

Have a nice day!




On Fri, 10 Jan 2020 at 5:43 PM, Răzvan Crainea <[hidden email]> wrote:
Hi, Donat!

Indeed, the B2B module(s) are not compatible with the dialog module.
However, if your purpose is just to have different callids between the
two legs, why not using the topology hiding module[1], which does change
the callids (using the "C" flag for the topology_hiding() function[2])
and is built on top of the dialog module.
The B2B does indeed offer a similar behavior, but it is usually used for
  much more complex calling scenarios - if you don't need those complex
scenarios, simply use the topology_hiding mode.

[1] https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html
[2]
https://opensips.org/html/docs/modules/3.0.x/topology_hiding.html#func_topology_hiding

Best regards,
Răzvan

On 1/10/20 5:21 PM, Donat Zenichev wrote:
> Hello OpenSIPS community!
>
> I have a brief question regarding how to better implement B2B user agent
> logic, within OpenSIPS installation.
>
> The goal is quite simple:
> - I have OpenSIPS as a routing system (making decisions on calls)
> - OpenSIPS at the same time separates dialog into two legs (so two
> Call-IDs as result)
>
> Firstly I've started looking into b2b_logic + b2b_entities modules
> I read manuals provided by OpenSIPS dev team and everything is quite
> clear for me.
>
> But, from what I understand provided b2b module is not compatible with a
> dialog module
> (paragraph 6 at Back-to-Back User Agent manual).
> But dialog module is quite significant for me, at least since of
> "dialog_replication_cluster" parameter.
>
> Another feature of the b2b_logic module is, that it only implements
> scenarios within a separate xml configuration file. And from the script
> routing you're only able to access coming requests and responses in a
> read-only mode.
>
> To sum up, the general goal is to separate call into two legs, to let
> both legs have different call-ids. And it's also quite important to be
> able to rule changes on requests (e.g. resetting of R-URI) from the
> routing script.
>
> Everything from mentioned above led me to a thought, that there could be
> some much elaborate solution for implementation of B2B within OpenSIPS
> installation.
> For sure b2b_logic and b2b_entities modules are great! But still I'm
> looking for a bit different installation.
>
> I know, OpenSIPS is a SIP proxy and it's not supposed to be run with a
> role of B2BUA.
> But still, might be someone can share his/her own experience and hint
> some better way out for this?
>
> Many thanks in advance and have a nice day!
>
>
>
> --
>
> Best regards,
> Donat Zenichev
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com

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

Best regards,
Donat Zenichev



--

Best regards,
Donat Zenichev


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