<div dir="ltr">Hi Trevor,<div><br></div><div>Yes we have the modparam("rtpproxy", "rtpproxy_autobridge", 1) in our configuration. Actually, I think that we "may" run on bridge(we use it within a Firewall so I think is possible), I don't know it, in two weeks, this was as far I could get with the protocol/OpenSIPs/Possible configurations :(.</div><div><br></div><div><div>modparam("rtpproxy", "rtpproxy_sock", "%CONTROL_SOCKET%")</div><div>modparam("rtpproxy", "rtpproxy_disable_tout", 10)</div><div>modparam("rtpproxy", "rtpproxy_autobridge", 1)</div><div>modparam("rtpproxy", "rtpp_notify_socket", "%TIMEOUT_NOTIFY_SOCKET%")</div></div><div><br></div><div>Other point is we are actually using a "custom" solution for the rtpproxy as we need direct interaction with the Firewall (it is proprietary and because of GPL we couldn't just use make a patch without exposing kernel functionality), but bassically using the unix socket specified in the "CONTROL_SOCKET" parameter we send commands to that process. This custom "rtpproxy" is just reading the information on the commands, creating possible sessions based on the call-id / totag / fromtag and creating "RTP acceptors" on the system (It should be the same as the rtpproxy, but we needed it proprietary).</div><div><br></div><div>With the current script + custom rtpproxy we are covering more than 99% of cases in our customers, but this specific one is pretty weird and because of my complete ignorance on this area, I face this blocking issue with one customer (the other Engineer had more than 5 years with SIPs configurations and I know this would be trivial for him).</div><div><br></div><div>If I get more information I will share it here, probably rtp commands received by our rtpproxy would be a good start.</div><div><br></div><div>Kind regards,</div><div>Jose Palma</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-30 17:26 GMT+02:00 Trevor Steyn <span dir="ltr"><<a href="mailto:trevor@webon.co.za" target="_blank">trevor@webon.co.za</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
HI Jose, <br>
<br>
I was not aware its running in bridge mode, Could you post your how
you start rtpproxy?<br>
<br>
also do you have the following in your module settings<br>
<br>
<pre>modparam("rtpproxy", "rtpproxy_autobridge", 1)
</pre>
I have a working config of bridgemode with rtpproxy will be happy to
share it with you just want to confirm your setup.<br>
<br>
Regards<br>
Trevor Steyn<br>
<br>
also you dont use rtpproxy in re-invites this would cause re-invites
to skip rtpproxy im sure this is a mistake.<div><div class="h5"><br>
<br>
<br>
<br>
<div>On 30/09/2015 17:05, Raistlin Majere
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">First of all thanks for your quick response.
<div><br>
</div>
<div>At the moment this is the point where we have the
t_on_reply for that onreply_route I sent in the previous
email.</div>
<div><br>
</div>
<div>
<div>route[1] {</div>
<div><span style="white-space:pre-wrap"> </span>if(!cache_fetch("local",
"outerip_$var(destinationIp)", $avp(outerIp))) {</div>
<div><span style="white-space:pre-wrap"> </span>get_outer_ip("$var(destinationIp)",
"$avp(outerIp)");</div>
<div><span style="white-space:pre-wrap"> </span>cache_store("local",
"outerip_$var(destinationIp)", "$avp(outerIp)", 10);</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>$fs =
$proto + ":" + $avp(outerIp);</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>if
(is_method("BYE|CANCEL")) {</div>
<div><span style="white-space:pre-wrap"> </span>unforce_rtp_proxy();</div>
<div><span style="white-space:pre-wrap"> </span>} else if
(is_method("INVITE")){</div>
<div><span style="white-space:pre-wrap"> </span>if
(has_body("application/sdp")) {</div>
<div><span style="white-space:pre-wrap"> </span>$var(trustconnectionip)
= "%TRUSTCONNECTIONIP%";</div>
<div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
= "no";</div>
<div><span style="white-space:pre-wrap"> </span>if
($var(trustconnectionip)=="yes") {</div>
<div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
= "yes";</div>
<div><span style="white-space:pre-wrap"> </span>} else if
($var(trustconnectionip)=="auto") {</div>
<div><span style="white-space:pre-wrap"> </span>$var(sdpc)
= $(rb{sdp.line,c}{s.substr,9,0});</div>
<div><span style="white-space:pre-wrap"> </span>if($td ==
$fd && $td != $var(sdpc)) {</div>
<div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
= "yes";</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>if
($var(ciptrusted)=="yes") {</div>
<div><span style="white-space:pre-wrap"> </span>rtpproxy_offer("focnr");</div>
<div><span style="white-space:pre-wrap"> </span>} else {</div>
<div><span style="white-space:pre-wrap"> </span>rtpproxy_offer("focn");</div>
<div><span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span># Prevent
$var(destinationPort) from getting default port number 5060
for TLS if no port specified in R-URI.</div>
<div><span style="white-space:pre-wrap"> </span>if($(ru{uri.port})==""
&& $proto=="tls" &&
$var(destinationPort)=="5060") {</div>
<div><span style="white-space:pre-wrap"> </span>$var(destinationPort)
= 5061;</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span># force
the transport protocol to the same one the client used</div>
<div><span style="white-space:pre-wrap"> </span>$du =
"sip:"+$var(destinationIp)+":"+$var(destinationPort)+";transport="+$proto;</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>t_on_reply("1");</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span># for
INVITEs enable some additional helper routes</div>
<div><span style="white-space:pre-wrap"> </span>if
(is_method("INVITE")) {</div>
<div><span style="white-space:pre-wrap"> </span>t_on_failure("1");</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>if
(!t_relay()) {</div>
<div><span style="white-space:pre-wrap"> </span>xlog("L_INFO",
"Relay error");</div>
<div><span style="white-space:pre-wrap"> </span>sl_reply_error();</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>exit;</div>
<div>}</div>
</div>
<div><br>
</div>
<div>The route[1] is set in the main route under this conditions</div>
<div><br>
</div>
<div>
<div>if (has_totag()) {</div>
<div><span style="white-space:pre-wrap"> </span>#
sequential request within a dialog should</div>
<div><span style="white-space:pre-wrap"> </span># take
the path determined by record-routing</div>
<div><span style="white-space:pre-wrap"> </span>if
(loose_route()) {</div>
<div><span style="white-space:pre-wrap"> </span>$var(destinationIp)
= $avp(requestIp);</div>
<div><span style="white-space:pre-wrap"> </span>$var(destinationPort)
= $rp;</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>if
(is_method("INVITE")) {</div>
<div><span style="white-space:pre-wrap"> </span># even if
in most of the cases is useless, do RR for</div>
<div><span style="white-space:pre-wrap"> </span>#
re-INVITEs alos, as some buggy clients do change route set</div>
<div><span style="white-space:pre-wrap"> </span># during
the dialog.</div>
<div><span style="white-space:pre-wrap"> </span>record_route();</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span># route
it out to whatever destination was set by loose_route()</div>
<div><span style="white-space:pre-wrap"> </span># in $du
(destination URI).</div>
<div><span style="white-space:pre-wrap"> </span>route(1);</div>
</div>
<div>...</div>
<div> exit;</div>
<div>}</div>
<div>....</div>
<div><br>
</div>
<div>And if there is no REGISTER, PUBLISH, CANCEL</div>
<div><br>
</div>
<div>route(1);</div>
<div>}</div>
<div><br>
</div>
<div>About the engage_rtp_proxy I was actually thinking about it
but I'm a bit scared because of the bridge mode, as it is a
"generic" script, I need to identify all this cases and create
configuration cases to make scripts automatically for those
setups. </div>
<div><br>
</div>
<div>Srly, thanks for the response >.< I have only 1 week
experience with this protocol and I'm having nightmares
already.</div>
<div><br>
</div>
<div>Kind regards</div>
<div>Jose Palma</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-09-30 16:51 GMT+02:00 Trevor
Steyn <span dir="ltr"><<a href="mailto:trevor@webon.co.za" target="_blank">trevor@webon.co.za</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> HI Raistlin, <br>
<br>
from your script we cannot see where you are setting
t_on_reply routes as im sure this is where you are
probably missing the rtpproxy_answer() but cannot see
why as that part of the script is missing<br>
<br>
<br>
maybe you can also try use engage_rtp_proxy() and you
wont have to worry about the answer and you could remove
the reply routes and just relay <br>
<br>
<div><span style="white-space:pre-wrap"> </span>if
($var(ciptrusted)=="yes") {</div>
<div><span style="white-space:pre-wrap"> </span>engage_rtp_proxy("focnr");</div>
<div><span style="white-space:pre-wrap"> </span>} else
{</div>
<div><span style="white-space:pre-wrap"> </span>engage_rtpproxy("focn");</div>
<div><span style="white-space:pre-wrap"> </span>}<br>
<br>
Regards<br>
Trevor Steyn<br>
<br>
</div>
<div>
<div> <br>
<br>
<br>
<br>
<div>On 30/09/2015 14:56, Raistlin Majere wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>Recently the maintainer of the SIPs proxy
in our company quit, and well I'm the new in
charge of this project, the bad new is I had 0
experience with SIP. After some week I got my
first case related to our "SIP proxy".</div>
<div><br>
</div>
<div>We are using OpenSIP 1.8 within our
Firewall to handle the protocol and the NAT
that it will imply within a Firewall. The
script my ex coworker did is working in 99% of
cases but this specific case. </div>
<div><br>
</div>
<div>The customer has one setup like this</div>
<div><br>
</div>
<div><br>
</div>
<div>PhoneA</div>
<div>PhoneB</div>
<div>PhoneC --- Call Manager --- Firewall ---
SBC --- Farm of RTP Media servers</div>
<div>....</div>
<div>PhoneN</div>
<div><br>
</div>
<div>The opensips instance is running within the
firewall. The next IPs are fake but follow the
"rules" of internal/external it is just to
avoid problems</div>
<div><br>
</div>
<div>Call Manager: 172.17.1.1</div>
<div>Firewall: Internal Network 192.168.0.10</div>
<div>Firewall: Extenal Network 62.1.1.10</div>
<div>SBC: 210.200.100.100</div>
<div>Farm of Media Servers: <a href="http://210.200.100.128/25" target="_blank">210.200.100.128/25</a></div>
<div><br>
</div>
<div>So the invite works as Expected but on the
180 Ringing either 200 OK the moment the
messages traverse the SIP proxy, doesn't
contain the "farm" IP but the SBC IP.</div>
<div><br>
</div>
<div>This are the 180 Ringing:</div>
<div><br>
</div>
<div>From SBC to the Firewall</div>
<div><br>
</div>
<div>
<div>SIP/2.0 180 Ringing</div>
<div>Via:
SIP/2.0/UDP 62.1.1.10:5060;branch=z9hG4bKd091.937a047.0</div>
<div>Via:
SIP/2.0/UDP 172.17.1.1:5060;rport=5060;received=172.17.1.1;branch=z9hG4bKac393424402</div>
<div>From: <<a href="mailto:sip%3A5000@210.200.100.100" target="_blank">sip:5000@210.200.100.100</a>>;tag=1c393411873</div>
<div>To: <<a href="mailto:sip%3A5001@210.200.100.100" target="_blank">sip:5001@210.200.100.100</a>;user=phone>;tag=gK08c71cc5</div>
<div>Call-ID: <a href="mailto:39341083229920151062@172.17.1.1" target="_blank">39341083229920151062@172.17.1.1</a></div>
<div>CSeq: 1 INVITE</div>
<div>Record-Route:
<sip:62.1.1.10:5060;r2=on;lr;did=6d8.933abaa6></div>
<div>Record-Route:
<sip:192.168.0.10:5060;r2=on;lr;did=6d8.933abaa6></div>
<div>Contact: <<a href="http://sip:5001@210.200.100.100:5060" target="_blank">sip:5001@210.200.100.100:5060</a>></div>
<div>Allow:
INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH</div>
<div>Require: 100rel</div>
<div>RSeq: 433990</div>
<div>Content-Length: 266</div>
<div>Content-Disposition: session;
handling=required</div>
<div>Content-Type: application/sdp</div>
<div><br>
</div>
<div>v=0</div>
<div>o=Sonus_UAC 176482 50736 IN IP4
210.200.100.100</div>
<div>s=SIP Media Capabilities</div>
<div>c=IN IP4 210.200.100.243</div>
<div>t=0 0</div>
<div>m=audio 61348 RTP/AVP 8 101</div>
<div>a=rtpmap:8 PCMA/8000</div>
<div>a=rtpmap:101 telephone-event/8000</div>
<div>a=fmtp:101 0-15</div>
<div>a=sendrecv</div>
<div>a=ptime:20</div>
<div>a=silenceSupp:off - - - -</div>
</div>
<div><br>
</div>
<div>After the firewall + Opensips have
processed this message to the call center</div>
<div><br>
</div>
<div>
<div>SIP/2.0 180 Ringing</div>
<div>Via:
SIP/2.0/UDP 172.17.1.1:5060;branch=z9hG4bKac393424402</div>
<div>From: <<a href="mailto:sip%3A5000@210.200.100.100" target="_blank">sip:5000@210.200.100.100</a>>;tag=1c393411873</div>
<div>To: <<a href="mailto:sip%3A5001@210.200.100.100" target="_blank">sip:5001@210.200.100.100</a>;user=phone>;tag=gK08c71cc5</div>
<div>Call-ID: <a href="mailto:39341083229920151062@172.17.1.1" target="_blank">39341083229920151062@172.17.1.1</a></div>
<div>CSeq: 1 INVITE</div>
<div>Record-Route:
<sip::62.1.1.10:5060;r2=on;lr;did=6d8.933abaa6></div>
<div>Record-Route:
<sip:192.168.0.10:5060;r2=on;lr;did=6d8.933abaa6></div>
<div>Contact: <<a href="mailto:sip%3A5001@210.200.100.100" target="_blank">sip:5001@210.200.100.100</a>></div>
<div>Allow:
INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH</div>
<div>Require: 100rel</div>
<div>RSeq: 433990</div>
<div>Content-Length: 295</div>
<div>Content-Disposition: session;
handling=required</div>
<div>Content-Type: application/sdp</div>
<div><br>
</div>
<div>v=0</div>
<div>o=Sonus_UAC 176482 50736 IN IP4
210.200.100.100</div>
<div>s=SIP Media Capabilities</div>
<div>t=0 0</div>
<div>m=audio 4845 RTP/AVP 8 101</div>
<div>a=rtpmap:8 PCMA/8000</div>
<div>a=rtpmap:101 telephone-event/8000</div>
<div>a=fmtp:101 0-15</div>
<div>a=sendrecv</div>
<div>a=ptime:20</div>
<div>a=silenceSupp:off - - - -</div>
<div>a=nortpproxy:yes</div>
<div>c=IN IP4 210.200.100.100</div>
<div>a=rtcp:4848</div>
</div>
<div><br>
</div>
<div>----</div>
<div><br>
</div>
<div>The RTP "acceptor" is created under the IP
210.200.100.100 instead of the IP 210.200.243
as the SIPproxy is changing the SDP connection
information.</div>
<div><br>
</div>
<div><br>
</div>
<div>This is the logic we are using in our
script for the INVITE and for the
onreply_route</div>
<div><br>
</div>
<div>
<div><span style="white-space:pre-wrap"> </span>if
(is_method("INVITE")){</div>
<div><span style="white-space:pre-wrap"> </span>if
(has_body("application/sdp")) {</div>
<div><span style="white-space:pre-wrap"> </span>$var(trustconnectionip)
= "%TRUSTCONNECTIONIP%";</div>
<div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
= "no";</div>
<div><span style="white-space:pre-wrap"> </span>if
($var(trustconnectionip)=="yes") {</div>
<div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
= "yes";</div>
<div><span style="white-space:pre-wrap"> </span>}
else if ($var(trustconnectionip)=="auto") {</div>
<div><span style="white-space:pre-wrap"> </span>$var(sdpc)
= $(rb{sdp.line,c}{s.substr,9,0});</div>
<div><span style="white-space:pre-wrap"> </span>if($td
== $fd && $td != $var(sdpc)) {</div>
<div><span style="white-space:pre-wrap"> </span>$var(ciptrusted)
= "yes";</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>if
($var(ciptrusted)=="yes") {</div>
<div><span style="white-space:pre-wrap"> </span>rtpproxy_offer("focnr");</div>
<div><span style="white-space:pre-wrap"> </span>}
else {</div>
<div><span style="white-space:pre-wrap"> </span>rtpproxy_offer("focn");</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
</div>
<div><span style="white-space:pre-wrap"> }</span><br>
</div>
<div><span style="white-space:pre-wrap"><br>
</span></div>
<div><span style="white-space:pre-wrap"><br>
</span></div>
<div><span style="white-space:pre-wrap"><br>
</span></div>
<div><span style="white-space:pre-wrap">And on
the onreply</span></div>
<div><span style="white-space:pre-wrap"><br>
</span></div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">if
(has_body("application/sdp")) {
$var(trustconnectionip) =
"%TRUSTCONNECTIONIP%"; $var(ciptrusted) =
"no"; if ($var(trustconnectionip)=="yes") {
$var(ciptrusted) = "yes"; } else if
($var(trustconnectionip)=="auto") {
$var(sdpc) =
$(rb{sdp.line,c}{s.substr,9,0}); if($td ==
$fd && $td != $var(sdpc)) {
$var(ciptrusted) = "yes"; } } if
($var(ciptrusted)=="yes") {
rtpproxy_answer("fr"); } else {
rtpproxy_answer("f"); } }</span><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Where TRUSTONNECTIONIP = "no" so basically
we are doing</div>
<div><br>
</div>
<div>rptproxy_offer("focn") and
rtpproxy_answer("f").</div>
<div><br>
</div>
<div>Kind regards:</div>
<div><br>
</div>
<div>Jose Palma</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>