Quantcast
Channel: Telestax Docs Online
Viewing all articles
Browse latest Browse all 94

Restcomm – Binding to a Different IP Address

$
0
0

When working with Restcomm on a local server install, you will of be using the default 127.0.0.1 address during the test phase. However, using the loopback IP does not allow for routable network communications. The same applies when you have to setup Restcomm for incoming SIP calls generated from a remote network. This tutorial will show you how to change the default IP address to a local interface of your server.

The internal server IP address used in this tutorial is 192.168.1.5 with the subnet mask set to 255.255.255.0

Requirements

  • Telscale Restcomm Binary or Mobicents Restcomm

 

Step 1 – The Media Server

  • Go to directory  $RESTCOMM_HOME/mobicents-media/mobicents-media-server/deploy
  • Edit the file server-beans.xml by changing the default 127.0.0.1 to the desired IP of your server.
  • Make sure the local subnet mask  is correctly set.
  • Search for the class=:”org.mobicents.media.server.io.network.UdpManage”

Change the following

 

<bean name="localhost" class="org.mobicents.media.server.io.network.UdpManager">
<constructor>
<parameter><inject bean="Scheduler"/></parameter>
</constructor>
<property name="bindAddress">127.0.0.1</property>
<property name="localBindAddress">127.0.0.1</property>
<property name="localNetwork">127.0.0.1</property>
<property name="localSubnet">255.255.255.255</property>
<property name="useSbc">false</property>
<property name="rtpTimeout">0</property>
</bean>

To the setting

 

<bean name="localhost" class="org.mobicents.media.server.io.network.UdpManager">

<constructor>
<parameter><inject bean="Scheduler"/></parameter>
</constructor>
<property name="bindAddress">192.168.1.5</property>
<property name="localBindAddress">192.168.1.5</property>
<property name="localNetwork">192.168.1.5</property>
<property name="localSubnet">255.255.255.0</property>
<property name="useSbc">false</property>
<property name="rtpTimeout">0</property>
</bean>

  • Go to the directory  $RESTCOMM_HOME/mobicents-media/mobicents-media-server/bin/
  • Start the media server as follows : ../run.sh

Check the output to make sure that the media server is correctly started and bound to the IP address desired.
The line below shows that the Media Server is bound to 192.168.1.5

 

7:54:28,468 INFO  [Scheduler] Started
07:54:28,499 INFO  [UdpManager] Initialized UDP interface[unknown]: bind address=192.168.1.5

 

 

Step 2 – Restcomm

  • Go to the directory  $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/
  • Open and edit the file restcomm.xml
  • Change all occurrence of the IP 127.0.0.1 to 192.168.1.5
  • The medis-server-manager section should now be similar to the extract below:

 

<media-server-manager>
<mgcp-server class="org.mobicents.servlet.restcomm.mgcp.MediaGateway"
name="Mobicents Media Server">
<local-address>192.168.1.5</local-address>
<local-port>2727</local-port>
<remote-address>192.168.1.5</remote-address>
<remote-port>2427</remote-port>
<response-timeout>500</response-timeout>
<!-- <external-address></external-address> -->
</mgcp-server>
</media-server-manager>

To start Restcomm, go to the directory $RESTCOMM_HOME/bin

run the command:  ./standalone.sh -b 192.168.0.1

 

The post Restcomm – Binding to a Different IP Address appeared first on Telestax Docs Online.


Viewing all articles
Browse latest Browse all 94

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>