Skip to content

Commit 25ae76c

Browse files
committed
Final patch and documentation for Restcomm act as Proxy feature
This close #2286
1 parent 5cd9dc7 commit 25ae76c

8 files changed

Lines changed: 127 additions & 2 deletions

File tree

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
[[intro]]
2+
= Restcomm as a generic Proxy
3+
4+
Restcomm can be configured to act as B2BUA and proxy out incoming calls (that didn't matched a registered application or a registered client) based on certain rules.
5+
6+
On incoming call, the feature will be executed after Restcomm-Connect finish checking:
7+
8+
1. Call to a registered Application/DID
9+
2. Call to a registered Client
10+
11+
Restcomm-Connect will use Dial SIP RCML to proxy the call to the destination which means that media server will be in the call path.
12+
13+
== Configuration
14+
15+
To enable this feature you will need to modify the **restcomm.xml** configuation file, and edit the **ims-authentication** section:
16+
17+
[source,xml]
18+
----
19+
<acting-as-proxy>
20+
<enabled>false</enabled>
21+
<use-from-header>true</use-from-header>
22+
<proxy-rules>
23+
<rule>
24+
<from-uri></from-uri>
25+
<to-uri></to-uri>
26+
<!-- Optionally provide username -->
27+
<proxy-to-username></proxy-to-username>
28+
<proxy-to-password></proxy-to-password>
29+
</rule>
30+
<rule>
31+
<from-uri></from-uri>
32+
<to-uri></to-uri>
33+
<!-- Optionally provide username -->
34+
<proxy-to-username></proxy-to-username>
35+
<proxy-to-password></proxy-to-password>
36+
</rule>
37+
</proxy-rules>
38+
</acting-as-proxy>
39+
----
40+
41+
42+
=== Options
43+
44+
* `enabled` set to **true** to enable the feature
45+
* `use-from-header` if set to **true**, From header will be used to determine the From URI. If set to **false** the Contact header will be used to determine the From URI. Default **true** (use From header)
46+
* `proxy-rules` Define the rules to match incoming traffic. You can define as many rules as you need
47+
** `from-uri` Define the **From URI** that will be used to match the incoming traffic
48+
** `to-uri` Define the **To URI** which will be used to proxy out incoming traffic that matched the rule
49+
** `proxy-to-username` (Optional) Username for proxy
50+
** `proxy-to-password` (Optional) Password for proxy
51+
52+
53+
When enabled, the feature will try to match incoming traffic from **from-uri** and if matched will proxy it to **to-uri**
54+
55+
=== Example configuration
56+
57+
Given
58+
59+
* ClientA: **192.168.100.10:5060**
60+
* Restcomm InstanceA: **192.168.100.11:5080**
61+
* Restcomm InstanceB: **192.168.200.11:5080**
62+
63+
The configuration should be:
64+
65+
[source,xml]
66+
----
67+
<acting-as-proxy>
68+
<enabled>true</enabled>
69+
<use-from-header>true</use-from-header>
70+
<proxy-rules>
71+
<rule>
72+
<from-uri>192.168.100.10:5060</from-uri>
73+
<to-uri>192.168.200.11:5080</to-uri>
74+
<!-- Optionally provide username -->
75+
<proxy-to-username></proxy-to-username>
76+
<proxy-to-password></proxy-to-password>
77+
</rule>
78+
<rule>
79+
<from-uri>192.168.200.11:5080</from-uri>
80+
<to-uri>192.168.100.10:5060</to-uri>
81+
<!-- Optionally provide username -->
82+
<proxy-to-username></proxy-to-username>
83+
<proxy-to-password></proxy-to-password>
84+
</rule>
85+
</proxy-rules>
86+
</acting-as-proxy>
87+
----
88+
89+
90+
91+
The first rule:
92+
[source,xml]
93+
----
94+
<rule>
95+
<from-uri>192.168.100.10:5060</from-uri>
96+
<to-uri>192.168.200.11:5080</to-uri>
97+
<!-- Optionally provide username -->
98+
<proxy-to-username></proxy-to-username>
99+
<proxy-to-password></proxy-to-password>
100+
</rule>
101+
----
102+
103+
Will match traffic from **192.168.100.10:5060** (**ClientA**) and will proxy out to **192.168.200.11:5080** (**Restcomm InstanceB**)
104+
105+
106+
107+
The second rule:
108+
[source,xml]
109+
----
110+
<rule>
111+
<from-uri>192.168.200.11:5080</from-uri>
112+
<to-uri>192.168.100.10:5060</to-uri>
113+
<!-- Optionally provide username -->
114+
<proxy-to-username></proxy-to-username>
115+
<proxy-to-password></proxy-to-password>
116+
</rule>
117+
----
118+
Will match traffic from **192.168.200.11:5080** (**Restcomm InstanceB**) and will proxy out to **192.168.100.10:5060** (**ClientA**)
119+
120+
== Call flows
121+
122+
Following a call flow for how the feature is used
123+
124+
image::images/RestcommB2BUA.png[Restcomm B2BUA]

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims/Restcomm_IMS_GW.adoc renamed to restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims_b2bua/Restcomm_IMS_GW.adoc

File renamed without changes.
28.8 KB
Loading

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims/images/webrtc_call_hold.png renamed to restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims_b2bua/images/webrtc_call_hold.png

File renamed without changes.

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims/images/webrtc_client_outgoing_call.png renamed to restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims_b2bua/images/webrtc_client_outgoing_call.png

File renamed without changes.

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims/images/webrtc_client_registration.png renamed to restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims_b2bua/images/webrtc_client_registration.png

File renamed without changes.

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims/images/webrtc_incoming_call.png renamed to restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/ims_b2bua/images/webrtc_incoming_call.png

File renamed without changes.

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/configuration/index.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ There is two different ways to install Restcomm Connect. Either through Docker o
7070
* <<ha/Restcomm - Using a Single Mysql Database for 2 Restcomm Servers.adoc#mysql,Using a Single Mysql Database for 2 Restcomm Connect Servers>>
7171
* <<ha/Restcomm - Single RVD Workspace for two Restcomm Instances.adoc#rvd,Single RVD Workspace for two Restcomm Instances>>
7272

73-
=== IMS related features
73+
=== IMS GW - B2BUA
7474

75-
* <<ims/Restcomm_IMS_GW.adoc#intro,Restcomm as a WebRTC GW to IMS >>
75+
* <<ims_b2bua/Restcomm_IMS_GW.adoc#intro,Restcomm-Connect as a WebRTC GW to IMS >>
76+
* <<ims_b2bua/Restcomm_ActAsProxy.adoc#intro, Restcomm-Connect acting as a generic Proxy>>
7677

7778
=== Amazon S3 Integration
7879

0 commit comments

Comments
 (0)