<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>15. Advanced Network Configuration</title><link rel="stylesheet" type="text/css" href="css/sipwise.css" /><link rel="stylesheet" type="text/css" href="css/html.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="The sip:provider CE Handbook trunk" /><link rel="up" href="index.html" title="The sip:provider CE Handbook trunk" /><link rel="prev" href="ar01s14.html" title="14. Network Configuration" /><link rel="next" href="ar01s16.html" title="16. Security and Maintenance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="ar01s14.html"><img src="images/icons/prev.png" alt="Prev" /></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s16.html"><img src="images/icons/next.png" alt="Next" /></a></td></tr></table><hr /></div><div class="section" title="15. Advanced Network Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_advanced_network_configuration_2"></a>15. Advanced Network Configuration</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ar01s15.html#_extra_sip_sockets">15.1. Extra SIP Sockets</a></span></dt><dt><span class="section"><a href="ar01s15.html#_extra_sip_and_rtp_sockets">15.2. Extra SIP and RTP Sockets</a></span></dt></dl></div><p>You have a typical deployment now and you are good to go, however you may need to do extra configuration depending on the devices you are using and functionality you want to achieve.</p><div class="section" title="15.1. Extra SIP Sockets"><div class="titlepage"><div><div><h3 class="title"><a id="_extra_sip_sockets"></a>15.1. Extra SIP Sockets</h3></div></div></div><p>By default, the load-balancer listens on the UDP and TCP ports 5060 (<span class="emphasis"><em>kamailio</em></span>→<span class="emphasis"><em>lb</em></span>→<span class="emphasis"><em>port</em></span>) and TLS port 5061 (<span class="emphasis"><em>kamailio</em></span>→<span class="emphasis"><em>lb</em></span>→<span class="emphasis"><em>tls</em></span>→<span class="emphasis"><em>port</em></span>). If you need to setup one or more extra non-standard SIP listening ports in addition to those standard ports, please edit the <span class="emphasis"><em>kamailio</em></span>→<span class="emphasis"><em>lb</em></span>→<span class="emphasis"><em>extra_sockets</em></span> option in your <span class="emphasis"><em>/etc/ngcp-config/config.yml</em></span> file.</p><p>The correct format consists of a label and value like this:</p><pre class="programlisting"> extra_sockets:
port_5064: udp:10.15.20.108:5064
test: udp:10.15.20.108:6060</pre><p>The label is shown in <code class="literal">outbound_socket</code> peer preference (if you want to route calls to specific peer out via specific socket); the value must contain a transport specification as in example above (udp, tcp or tls).</p><div class="important" title="Important" style="margin-left: 0; margin-right: 10%;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/icons/important.png" /></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>in this case you have just added an extra SIP listening port. RTP traffic will still use your default IP address.</p></td></tr></table></div></div><div class="section" title="15.2. Extra SIP and RTP Sockets"><div class="titlepage"><div><div><h3 class="title"><a id="_extra_sip_and_rtp_sockets"></a>15.2. Extra SIP and RTP Sockets</h3></div></div></div><p>If you want to use one more interface (with a different IP address) for SIP signalling and also RTP traffic (for example you need that connect to a spefici peering server), what you need to do is to add your new interface in the <span class="emphasis"><em>/etc/network/interface</em></span> file.
After that the new interface should be declared in <span class="emphasis"><em>/etc/ngcp-config/network.yml</em></span> . Let’s supposed to add a new SIP socket and a new RTP socket on VLAN 100:</p><pre class="programlisting">..
..
eth0.100:
hwaddr: ff:ff:ff:ff:ff:ff
ip: 192.168.1.3
netmask: 255.255.255.0
type:
- sip_ext
- rtp_int_100
..
..
interfaces:
- lo
- eth0
- eth0.100
- eth1
..
..</pre><p>Then, in order to use the new vlan100 IP as SIP signalling socket towards your peering a label (<span class="emphasis"><em>int_100</em></span> for example) must be added in <span class="emphasis"><em>/etc/ngcp-config/config.yml</em></span> :</p><pre class="programlisting"> extra_sockets:
port_5064: udp:10.15.20.108:5064
test: udp:10.15.20.108:6060
int_100: udp:192.168.1.3:5060</pre><p>Finally changes have to be applied:</p><pre class="programlisting">ngcpcfg apply 'added extra SIP and RTP socket'</pre><p>After have applied the changes, a new SIP socket will listen on IP <code class="literal">192.168.1.3</code> and this socket can now be used as source socket to send SIP messages to your peer for example. The new label "int_100" is now shown in <code class="literal">outbound_socket</code> peer preference.
Also, RTP socket is now listening on <code class="literal">192.168.1.3</code> and you can choose the new RTP socket to use by setting parameter <code class="literal">rtp_interface</code> to the Label "int_100" in your Domain/Subscriber/Peer preferences.</p><p></p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s14.html"><img src="images/icons/prev.png" alt="Prev" /></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s16.html"><img src="images/icons/next.png" alt="Next" /></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/icons/home.png" alt="Home" /></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>