Hey Klaus,<div><br></div><div>Thanks alot for your help, it was really helpful to understand few things. but the situation is the same :( unfortunately. Now I&#39;ve two Asterisks one on Private and the other on Public. </div>
<div>The Asterisk on PublicIP works well if I don&#39;t run RTPproxy in bridged mode !</div><div>The Asterisk on Private IP&#39;s situation remains the same. You&#39;re right about the RTPproxy not utilising its PrivateIP but I&#39;ve tried all possible options for force_rtp_proxy() - rtp_manage() is a great relaxation but unfortunately I&#39;m not using devel.</div>
<div><br></div><div>I&#39;m going to keep on trying until I finally make it work.</div><div><br></div><div>Any comments/suggestions from the List users is highly appreciated.</div><div><br></div><div>Regards,</div><div>Sammy</div>
<div><br><div class="gmail_quote">On Fri, Nov 4, 2011 at 7:08 PM, Klaus Darilion <span dir="ltr">&lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 04.11.2011 10:57, Sammy Govind wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
SORRY for PM but this is not getting through to the users List due to size.<br>
</blockquote>
<br></div>
I have cc-ed the list.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
---------- Forwarded message ----------<br>
From: *Sammy Govind* &lt;<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a> &lt;mailto:<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>&gt;&gt;<br>
Date: Fri, Nov 4, 2011 at 1:55 PM<br>
Subject: Re: [SR-Users] Kamailio as SBC / LB Media-Servers farm<br>
To: &quot;SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -<br>
Users Mailing List&quot; &lt;<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br></div>
&lt;mailto:<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-<u></u>router.org</a>&gt;&gt;<div class="im"><br>
<br>
<br>
Klaus: mhomed did work indeed - no need to force_send_socket() now :) Thanks<br>
<br>
I&#39;m progressing abit.<br>
<br>
RTP-Proxy was run in bridged mode like this.<br>
<br></div>
*rtpproxy -l 109.XX.XXX.212/<a href="http://192.168.2.29" target="_blank">192.168.2.29</a> &lt;<a href="http://192.168.2.29" target="_blank">http://192.168.2.29</a>&gt; -s<br>
udp:localhost:22222 -F -d DBUG*<br>
</blockquote>
<br>
See description of i,e flag:<br>
<a href="http://kamailio.org/docs/modules/3.2.x/modules/rtpproxy.html#id2535618" target="_blank">http://kamailio.org/docs/<u></u>modules/3.2.x/modules/<u></u>rtpproxy.html#id2535618</a><br>
<br>
Thus in your setup 109.... is the &quot;internal&quot; interface and 192.... is the &quot;external&quot; interface. That&#39;s mixed. Thus I advice you to switch the order of IP addresses so that internal is 192... and external is 109...<br>

<br>
This is essential to use the i,e flags correctly.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
I&#39;m getting RTPstats published on Kamailio/RTPproxy syslog.<br>
<br>
I am using Echo() application in asterisk. So I&#39;ve observed that my<br>
audio went to asterisk and asterisk did indeed send audio back to the<br>
RTPproxy assigned ports BUT the RTPproxy isn&#39;t forwarding the Audio back<br>
to the client or may-be the audio is lost somewhere in between<br></div>
RTPproxy&lt;---&gt;Client. /[See Wirshark Flow-Diagram taken<br>
on-Kamailio/RTPproxy Server]/<br>
</blockquote>
<br>
In your trace you see, that RTP does not use the internal IP address, but only the external IP address. Thus I suspect that the RTP packets from Asterisk to the public rtpproxy interface do not even arrive at rtpproxy.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The # DTMF signal sent from Client phone reached asterisk safely and<br>
terminated the Echo() application.<br>
<br>
I did the  ip_forwarding thingie too.-- somebody mentioned to do this if<br>
using RTPproxy in bridged mode.<br>
</blockquote>
<br></div>
This is bullshit. People seem to not understand IP at all. rtpproxy is forwarding in user mode - it receives on a UDP socket and sends on a UDP socket. Thus, kernel based forwarding is not involved when using rtpproxy. You can disable IP forwarding again.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
#echo &quot;1&quot; &gt;&gt; /proc/sys/net/ipv4/ip_forward<br>
#sysctl -p<br>
<br>
<br>
Here are the corresponding Logs from Kamailio and rtpproxy.<br>
</blockquote>
<br></div>
The thing is quite easy. Swap the IP addresses when starting rtpproxy and then configure Kamailio to call rtpproxy with the proper i,e flags (as described in my previous email).<br>
<br>
For example:<br>
<br>
if (has_body(&quot;application/sdp&quot;)) {<br>
  if ($si == &quot;192.168.2.75&quot;) {<br>
    # message from internal to external<br>
    rtpproxy_manage(&quot;ie&quot;);<br>
  } else {<br>
    # message from external to internal<br>
    rtpproxy_manage(&quot;ei&quot;);<br>
  }<br>
}<br>
<br>
Put above code block in the main route block and also in a reply route which will be activated (or in the default reply route). Put some xlog statements around the rtpproxy calls to verify the proper command is called.<br>

<br>
regards<span class="HOEnZb"><font color="#888888"><br>
Klaus<br>
<br>
<br>
</font></span></blockquote></div><br></div>