Hi,<br><br>I have two SIP servers, <b>A</b> and <b>B</b>, connected each other though a OPENVPN tunnel. The server <b>B</b> needs to t_relay() every SIP message containing the method MESSAGE to the server <b>A</b> but these messages never reach destination. <br>
<br>I have tested the tunnel connectivity and works fine. I wrote a Perl script  (located in <b>B</b>) that sends SIP MESSAGES to Kamailio (located in <b>A</b>) trying to figure out what is happening but these messages are received by <b>A</b> and processed correctly but when <b>B</b> does the same from Kamailio, it is never received.<br>
<br>Here is the route part of kamailio.cfg in <b>B</b>:<br><br>Observation: ($rU == &quot;1004&quot;) result is <b>true</b><br><i><br> if(is_method(&quot;MESSAGE&quot;))<br> {         <br>            if($rU == &quot;1004&quot;)  <br>
             {<br>                        xlog(&quot;L_INFO&quot;,&quot;En 1004&quot;);<br><br>                        rewritehost(&quot;10.8.0.1&quot;);<br><br>                        if (!t_relay())<br>                                xlog(&quot;L_INFO&quot;,&quot;MIO Error en t_relay&quot;);<br>
                        <br>                        t_reply(&quot;200&quot;, &quot;Ok&quot;);<br>                        xlog(&quot;L_INFO&quot;,&quot;MIO despues rewrite&quot;);<br>                        exit;<br>             }<br>
.....</i> <br><br>The perl script that WORKS:<br><br><i>$msg = &#39;MESSAGE <a href="http://sip:1004@192.168.1.2:5060">sip:1004@192.168.1.2:5060</a> SIP/2.0<br>Via: SIP/2.0/UDP 192.168.1.2<br>From: &quot;2002&quot; &lt;<a href="mailto:sip%3A2002@192.168.1.2">sip:2002@192.168.1.2</a>&gt;;tag=1837944796<br>
To: &lt;<a href="mailto:sip%3A1004@192.168.1.2">sip:1004@192.168.1.2</a>&gt;<br>Call-ID: <a href="mailto:19722852989@192.168.1.2">19722852989@192.168.1.2</a><br>CSeq: 15773 MESSAGE<br>Contact: &lt;sip:2002@</i><i><b>PublicIP-protected</b></i><i>:5060&gt;<br>
Max-Forwards: 29<br>User-Agent: DBL<br>Content-Type: text/plain<br>Content-Length:    34<br><br>+595981[<b>protected</b>]<br>hello from kamailio<br>&#39;;<br><br>use IO::Socket;<br><br>my $sock = IO::Socket::INET-&gt;new( Proto=&gt;&#39;udp&#39;,<br>
                                  PeerHost=&gt;&#39;192.168.2.102&#39;,<br>                                  PeerPort=&gt;&#39;5060&#39;);<br><br>print &quot;Sending msg $msg\n&quot;;<br><br>$sock-&gt;send($msg) or die &quot;error sending $!\n&quot;;<br>
<br></i>Please help!<br><br>Thanks in advance.<br><br>Carlos.<br><br>