<div>A few points.</div>
<div>&nbsp;</div>
<div>Firstly, If you are going to run 2 different instances on the same server, they should have different ports (e.g. 5060 for the 1st instance and&nbsp;5062 for 2nd).<br>&nbsp;</div>
<div>Secondly, if you are trying to resolve 2 different Local IPs to the same server (in your case <a href="http://192.168.1.112">192.168.1.112</a> and <a href="http://192.168.1.113">192.168.1.113</a>), one of any of these should happen:
</div>
<div>1.&nbsp;you should either have&nbsp;2 network card interfaces in your server, or </div>
<div>2.&nbsp;Linux does this thing where it is able to split&nbsp;a single (physical)&nbsp;NIC interface into seperate virtual interfaces (e.g. for a single interface <strong>eth0</strong> splits it&nbsp;into&nbsp;<strong>eth0:<font color="#ff0000">
0</font></strong> for the 1st virtual interface and <strong>eth0:<font color="#3333ff">1</font></strong> for the 2nd, etc). The process is called <strong>IP aliasing</strong>. You should then allocate the 2 local IPs to the 2 virtual interfaces like so:
</div>
<div>&nbsp;eth0:0 -&gt; <a href="http://192.168.1.112">192.168.1.112</a>, and</div>
<div>&nbsp;eth0:1 -&gt; <a href="http://192.168.1.113">192.168.1.113</a></div>
<div>&nbsp;</div>
<div>commands are something like this:</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp; ifconfig eth0&nbsp;&nbsp; <i>XXX.XXX.XXX.XXX</i> netmask <a href="http://255.255.255.0">255.255.255.0</a> broadcast <i>XXX.XXX.XXX</i>.255<br>&nbsp;&nbsp;&nbsp; ifconfig eth0:0 <a href="http://192.168.1.112">192.168.1.112</a>&nbsp;&nbsp; netmask 
<a href="http://255.255.255.0">255.255.255.0</a> broadcast <a href="http://192.168.1.255">192.168.1.255</a><br>&nbsp;&nbsp;&nbsp; ifconfig eth0:1 <a href="http://192.168.1.113">192.168.1.113</a>&nbsp;&nbsp; netmask <a href="http://255.255.255.0">
255.255.255.0</a> broadcast <a href="http://192.168.1.255">192.168.1.255</a><br><br>&nbsp;&nbsp;&nbsp; route add -host <i>XXX.XXX.XXX.XXX</i> dev eth0<br>&nbsp;&nbsp;&nbsp; route add -host <a href="http://192.168.1.112">192.168.1.112</a> dev eth0<br>&nbsp;&nbsp;&nbsp; route add -host 
<a href="http://192.168.1.113">192.168.1.113</a>&nbsp; dev eth0<br>&nbsp;&nbsp;&nbsp; route add default gw &lt;Gateway IP&gt;</div>
<div>&nbsp;</div>
<div>where <em>XXX.XXX.XXX.XXX</em> in the 1st instance refers to another local IP e.g. <a href="http://192.168.1.3">192.168.1.3</a>.</div>
<div>(I am no Linux guru so maybe the gurus here could pipe in). :)</div>
<div>&nbsp;</div>
<div>Method 1 is probably the simpler and more straight-forward, but if you can&#39;t afford 2 NICs I don&#39;t think Method 2&nbsp;will be&nbsp;too difficult either.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Simply putting the entries in etc/hosts is not enough as the server needs to be able to&nbsp;identify them as 2 separate instances. This is why you are getting that error - it&#39;s because only one interface was identified and that has already been &quot;bound&quot; to the first Local IP (
<a href="http://192.168.1.112">192.168.1.112</a>).</div>
<div>&nbsp;</div>
<div>Also, if I understand your <em>ifconfig</em> output correctly, then this is not setup correctly. You seem to be mixing private and public IP addresses. If you are going through a router or NATed environement you don&#39;t need to&nbsp;assign the external interfaces to the NIC(s), nor do you specifically need to&nbsp;define them in your 
openser.cfgs (i.e. listen=external IP). You only need this if you are in a non-NATed environment, so it&#39;s a case of either or.</div>
<div>&nbsp;</div>
<div>Hope that made sense.</div>
<div><br>&nbsp;</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 05/01/07, <b class="gmail_sendername">Gerardo Amaya</b> &lt;<a href="mailto:openser@gerardoamaya.com">openser@gerardoamaya.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello All. I&#39;m trying to install 2 Instances of openser on the same<br>machine with the following interfaces:
<br><br>Instance #1 -----&gt; <a href="http://172.16.18.2">172.16.18.2</a> and <a href="http://192.168.1.112">192.168.1.112</a><br>Instance #2 -----&gt; <a href="http://172.16.1.2">172.16.1.2</a> and <a href="http://192.168.1.113">
192.168.1.113</a><br><br>I made one installation on the default OpenSER folders and one in the<br>/usr/loca/openser_1/<br><br>The configuration went quite smooth. The first instance of the server is<br>running with no problem at all, but when I try to start the second
<br>instance I got an error that it was unable to resolve the IP addresses I<br>add the following lines to the /etc/hosts file:<br><br>### OpenSER 1st interface configuration ####<br><a href="http://192.168.1.112">192.168.1.112
</a>&nbsp;&nbsp; openser1_internal<br><a href="http://172.16.18.2">172.16.18.2</a>&nbsp;&nbsp;&nbsp;&nbsp; openser1_external<br>### OpenSER 1st Interface configuration ####<br><br>### OpenSER 2nd Interface configuration ####<br><a href="http://192.168.1.113">
192.168.1.113</a>&nbsp;&nbsp; openser1_internal<br><a href="http://172.16.1.2">172.16.1.2</a>&nbsp;&nbsp;&nbsp;&nbsp; openser1_external<br>### OpenSER 2nd Interface configuration ####<br><br><br>After that Now I have the following error:<br><br>Jan&nbsp;&nbsp;5 17:26:30 atel-router ./openser[17772]: ERROR: tcp_init: bind(7,
<br>0x813e194, 16) on <a href="http://192.168.1.112:5060">192.168.1.112:5060</a> : Address already in use<br><br><br>Any Help will be appreciated, of better is there a How-to on OpenSER<br>multiple instances please let me know.
<br><br>Thanks in advance<br><br>Gerardo Amaya<br><br>Here is the configuration file for each instance:<br><br>OpenSER.cfg Instance #1<br><br>#<br># $Id: ser.cfg,v <a href="http://1.25.2.1">1.25.2.1</a> 2005/02/18 14:30:44 andrei Exp $
<br>#<br># simple quick-start config script<br>#<br><br># ----------- global configuration parameters ------------------------<br><br>debug=5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# debug level (cmd line: -dddddddddd)<br>fork=yes<br>log_stderror=no # (cmd line: -E)
<br><br>/* Uncomment these lines to enter debugging mode<br>#fork=no<br>#log_stderror=yes<br>*/<br><br>check_via=no&nbsp;&nbsp;&nbsp;&nbsp;# (cmd. line: -v)<br>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -r)<br>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# (cmd. line: -R)<br>listen=
<a href="http://192.168.1.112">192.168.1.112</a><br>listen=<a href="http://172.16.18.2">172.16.18.2</a><br>port=5060<br>mhomed=1<br>children=4<br>fifo=&quot;/tmp/ser_fifo&quot;<br><br># ------------------ module loading ----------------------------------
<br><br># Uncomment this if you want to use SQL database<br>loadmodule &quot;/usr/local/lib/openser/modules/mysql.so&quot;<br><br>loadmodule &quot;/usr/local/lib/openser/modules/sl.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/tm.so&quot;
<br>loadmodule &quot;/usr/local/lib/openser/modules/rr.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/maxfwd.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/usrloc.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/registrar.so&quot;
<br>loadmodule &quot;/usr/local/lib/openser/modules/textops.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/uri.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/uri_db.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/domain.so&quot;
<br>loadmodule &quot;/usr/local/lib/openser/modules/mediaproxy.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/nathelper.so&quot;<br><br># Uncomment this if you want digest authentication<br># mysql.so must be loaded !
<br>loadmodule &quot;/usr/local/lib/openser/modules/auth.so&quot;<br>loadmodule &quot;/usr/local/lib/openser/modules/auth_db.so&quot;<br><br># ----------------- setting module-specific parameters ---------------<br><br># -- usrloc params --
<br><br>#modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,&nbsp;&nbsp; 0)<br><br># Uncomment this if you want to use SQL database<br># for persistent storage and comment the previous line<br>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)
<br><br># -- auth params --<br># Uncomment if you are using auth module<br>#<br>#modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)<br>#<br># If you set &quot;calculate_ha1&quot; parameter to yes (which true in this config),
<br># uncomment also the following parameter)<br>#<br>#modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br><br># -- rr params --<br># add value to ;lr param to make some broken UAs happy<br>
modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<br><br># -- nathelper and mediaproxy params --<br>modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)<br>modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1)
<br>modparam(&quot;nathelper&quot;, &quot;rtpproxy_sock&quot;, &quot;unix:/var/run/rtpproxy.sock&quot;)<br># -- End of nathelper and mediaproxy params --<br><br># -- auth_db database params for domain.so module to work properly --
<br><br>modparam(&quot;auth_db|domain|uri_db|usrloc&quot;,&quot;db_url&quot;,&quot;mysql://root:codevoz@localhost/openser&quot;)<br>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, 1)<br>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)
<br># -- End of database params --<br><br><br># -------------------------&nbsp;&nbsp;request routing logic -------------------<br><br># main routing logic<br><br>route{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # initial sanity checks -- messages with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # max_forwards==0, or excessively long requests
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (msg:len &gt;=&nbsp;&nbsp;2048 ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;REGISTER&quot; || ! search(&quot;^Record-Route:&quot;)) {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact(); # Rewrite contact with source IP of<br>signalling
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #if (method == &quot;INVITE&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;fix_nated_sdp(&quot;1&quot;); # Add direction=active to SDP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #};<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport(); # Add rport parameter to topmost Via<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;INVITE&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dst_ip == <a href="http://192.168.1.112">192.168.1.112</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAII&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://172.16.18.2">172.16.18.2</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAEI&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://192.168.1.112">
192.168.1.112</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAIE&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://172.16.18.2">172.16.18.2</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAEE&quot;))
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Record-route all messages -- to make sure that<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # subsequent messages will go through our proxy; that&#39;s<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # particularly good if upstream and downstream entities
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # use different transport protocol<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This is the Call Tear Down Section<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unforce_rtp_proxy();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(1);<br>}<br><br>route[1] {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #force_rtp_proxy();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay(&quot;udp:<a href="http://192.168.1.2:5060">192.168.1.2:5060</a>&quot;);<br><br><br>}<br>
<br>onreply_route[1] {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!search(&quot;^Content-Length:[ ]*0&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (nat_uac_test(&quot;1&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>}<br><br><br>OpenSER.cfg Instance #2<br>#<br># $Id: ser.cfg,v <a href="http://1.25.2.1">1.25.2.1</a> 2005/02/18 14:30:44 andrei Exp $<br>#<br># simple quick-start config script<br>#<br><br># ----------- global configuration parameters ------------------------
<br><br>debug=5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# debug level (cmd line: -dddddddddd)<br>fork=yes<br>log_stderror=no # (cmd line: -E)<br><br>/* Uncomment these lines to enter debugging mode<br>#fork=no<br>#log_stderror=yes<br>*/<br><br>check_via=no&nbsp;&nbsp;&nbsp;&nbsp;# (cmd. line: -v)
<br>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -r)<br>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# (cmd. line: -R)<br>listen=udp:<a href="http://192.168.1.113:5060">192.168.1.113:5060</a><br>listen=udp:<a href="http://172.16.1.2:5060">172.16.1.2:5060</a><br>#port=5060
<br>mhomed=1<br>children=4<br>fifo=&quot;/tmp/ser_fifo2&quot;<br><br># ------------------ module loading ----------------------------------<br><br># Uncomment this if you want to use SQL database<br>loadmodule &quot;/usr/local/lib/openser/modules/mysql.so&quot;
<br><br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/sl.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/tm.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/rr.so&quot;
<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/maxfwd.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/usrloc.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/registrar.so&quot;
<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/textops.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/uri.so&quot;loadmodule<br>&quot;/usr/local/openser_1/lib/openser/modules/nathelper.so&quot;
<br><br># Uncomment this if you want digest authentication<br># mysql.so must be loaded !<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/auth.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/auth_db.so&quot;
<br><br># ----------------- setting module-specific parameters ---------------<br><br># -- usrloc params --<br><br>#modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,&nbsp;&nbsp; 0)<br><br># Uncomment this if you want to use SQL database
<br># for persistent storage and comment the previous line<br>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)<br><br># -- auth params --<br># Uncomment if you are using auth module<br>#<br>#modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)
<br>#<br># If you set &quot;calculate_ha1&quot; parameter to yes (which true in this config),<br># uncomment also the following parameter)<br>#<br>#modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)
<br><br># -- rr params --<br># add value to ;lr param to make some broken UAs happy<br>modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<br><br># -- nathelper and mediaproxy params --<br>modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)
<br>modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1)<br>modparam(&quot;nathelper&quot;, &quot;rtpproxy_sock&quot;, &quot;unix:/var/run/rtpproxy_1.sock&quot;)<br># -- End of nathelper and mediaproxy params --
<br><br># -- auth_db database params for domain.so module to work properly --<br><br>modparam(&quot;auth_db|domain|uri_db|usrloc&quot;,&quot;db_url&quot;,&quot;mysql://root:codevoz@localhost/openser&quot;)<br>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, 1)
<br>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br># -- End of database params --<br><br><br># -------------------------&nbsp;&nbsp;request routing logic -------------------<br><br># main routing logic
<br><br>route{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # initial sanity checks -- messages with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # max_forwards==0, or excessively long requests<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (msg:len &gt;=&nbsp;&nbsp;2048 ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;REGISTER&quot; || ! search(&quot;^Record-Route:&quot;)) {
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact(); # Rewrite contact with source IP of<br>signalling<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #if (method == &quot;INVITE&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;fix_nated_sdp(&quot;1&quot;); # Add direction=active to SDP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #};
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport(); # Add rport parameter to topmost Via<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;INVITE&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dst_ip == <a href="http://192.168.1.113">192.168.1.113</a>){<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAII&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://172.16.1.2">172.16.1.2</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAEI&quot;))
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://192.168.1.113">192.168.1.113</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAIE&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://192.168.1.113">192.168.1.113</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAIE&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (dst_ip == <a href="http://172.16.1.2">172.16.1.2</a>){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (force_rtp_proxy(&quot;FAEE&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Record-route all messages -- to make sure that
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # subsequent messages will go through our proxy; that&#39;s<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # particularly good if upstream and downstream entities<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # use different transport protocol<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This is the Call Tear Down Section
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unforce_rtp_proxy();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(1);<br>}<br><br>route[1] {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #force_rtp_proxy();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay(&quot;udp:<a href="http://192.168.1.2:5060">192.168.1.2:5060</a>&quot;);<br><br><br>}<br><br>onreply_route[1] {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!search(&quot;^Content-Length:[ ]*0&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (nat_uac_test(&quot;1&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>}<br><br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/uri_db.so&quot;<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/domain.so&quot;
<br>loadmodule &quot;/usr/local/openser_1/lib/openser/modules/mediaproxy.so&quot;<br><br><br><br><br><br>ifconfig output<br><br>eth0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Link encap:Ethernet&nbsp;&nbsp;HWaddr 00:0E:2E:0A:61:68<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:<a href="http://172.16.18.2">
172.16.18.2</a>&nbsp;&nbsp;Bcast:<a href="http://172.16.18.255">172.16.18.255</a>&nbsp;&nbsp;Mask:<a href="http://255.255.255.0">255.255.255.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: fe80::20e:2eff:fe0a:6168/64 Scope:Link<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST MULTICAST&nbsp;&nbsp;MTU:1500&nbsp;&nbsp;Metric:1
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:216465 errors:0 dropped:0 overruns:0 frame:0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:323925 errors:0 dropped:0 overruns:0 carrier:0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:1000<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:18190685 (17.3 MiB)&nbsp;&nbsp;TX bytes:118579358 (
113.0 MiB)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interrupt:185 Base address:0xaf00<br><br>eth1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Link encap:Ethernet&nbsp;&nbsp;HWaddr 00:0E:2E:06:EC:17<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:<a href="http://172.16.1.2">172.16.1.2</a>&nbsp;&nbsp;Bcast:<a href="http://172.16.1.255">
172.16.1.255</a>&nbsp;&nbsp;Mask:<a href="http://255.255.255.0">255.255.255.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST MULTICAST&nbsp;&nbsp;MTU:1500&nbsp;&nbsp;Metric:1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:1000<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:0 (0.0 b)&nbsp;&nbsp;TX bytes:0 (0.0 b)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interrupt:209 Base address:0xce00<br><br>eth2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Link encap:Ethernet&nbsp;&nbsp;HWaddr 00:0C:76:BE:E5:87<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:
<a href="http://192.168.1.112">192.168.1.112</a>&nbsp;&nbsp;Bcast:<a href="http://192.168.1.255">192.168.1.255</a>&nbsp;&nbsp;Mask:<a href="http://255.255.255.0">255.255.255.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: fe80::20c:76ff:febe:e587/64 Scope:Link
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST RUNNING MULTICAST&nbsp;&nbsp;MTU:1500&nbsp;&nbsp;Metric:1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:1155321 errors:0 dropped:0 overruns:0 frame:0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:664343 errors:0 dropped:0 overruns:0 carrier:0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:1000
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:187622098 (178.9 MiB)&nbsp;&nbsp;TX bytes:125573054 (119.7 MiB)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interrupt:217 Base address:0xed00<br><br>eth2:0&nbsp;&nbsp;&nbsp;&nbsp;Link encap:Ethernet&nbsp;&nbsp;HWaddr 00:0C:76:BE:E5:87<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:<a href="http://192.168.1.113">
192.168.1.113</a>&nbsp;&nbsp;Bcast:<a href="http://192.168.1.255">192.168.1.255</a>&nbsp;&nbsp;Mask:<a href="http://255.255.255.0">255.255.255.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST RUNNING MULTICAST&nbsp;&nbsp;MTU:1500&nbsp;&nbsp;Metric:1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interrupt:217 Base address:0xed00
<br><br><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openser.org">Users@openser.org</a><br><a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users
</a><br></blockquote></div><br>