<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
Sorry for having kept silent for so long.<br>
I see how rtcp is not that important for this use-case - even if it fails. But this causes
<span style="color: rgb(51, 51,
      51); font-family: Verdana, sans-serif; font-size: 12px;
      font-style: normal; font-variant: normal; font-weight: normal;
      letter-spacing: normal; line-height: 16px; orphans: auto;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 1; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; display: inline !important; float:
      none; background-color: rgb(255, 255, 221);">
</span>"osmo-ortp(): network_error" error messages which are confusing the user. Just my opinion.<br>
<br>
My statement about broken LibORTP was somewhat futile. Just a guess. I see that an 0.23.0 implementation of
<i>rtp_session_set_local_addr</i> uses     <i>create_and_bind</i>(addr,rtcp_port,&sockfamily,session->reuseaddr) if (rtp_port>0) and
<i>create_and_bind_random</i>(addr,&sockfamily,&rtcp_port) elsewise. Whereas an 0.24.0+ implementation of
<i>rtp_session_set_local_addr </i>differs significantly. Looks like there was an attempt to merge (?), maybe this functionality got lost in transition ?<br>
<br>
I am calling from cell phone to SIP phone via LCR+FreeSWITCH. The audio is heard on mobile but not on SIP phone.<br>
<br>
<br>
Regards,<br>
Pavel.<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 04/27/2016 08:18 PM, Max wrote:<br>
</div>
<blockquote cite="mid:5720F456.3050902@sysmocom.de" type="cite">
<pre wrap="">Thanks for looking into this. Some comments are inline.

On 04/22/2016 01:40 PM, Pavel Balashov wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello!
I can confirm a compatiblity issue with LibORTP >= 0.24.0.

Here are some of my findings:

In /osmo-bts/src/common/rsl.c in /rsl_rx_ipac_XXcx/ there is a call to
libosmo-abis function:/osmo_rtp_socket_bind(lchan->abis_ip.rtp_socket,
ipstr, -1)./ I assume, that last argument "-1" means that the random
udp port should be selected for socket.

in /libosmo-abis/src/trau/osmo-rtp.c in a function /int
osmo_rtp_socket_bind(struct osmo_rtp_socket *rs, const char *ip, int
port)/ there is a call to LibORTP
/rtp_session_set_local_addr(rs->sess, ip, port, port+1)/. So as result
this function calls rtp_session_set_local_addr with last arguments
being equal to "-1" and "0".
/
/The LibORTP function///int rtp_session_set_local_addr (RtpSession *
session, const char * addr, int rtp_port, int rtcp_port)/ has a
folollowing description:/
/**
 *rtp_session_set_local_addr:
 *@session:        a rtp session freshly created.
 *@addr:        a local IP address in the xxx.xxx.xxx.xxx form.
 *@rtp_port:        a local port or -1 to let oRTP choose the port
randomly
 *@rtcp_port:        a local port or -1 to let oRTP choose the port
randomly
 *
  ...
**/

/So this results in calling////osmo_rtp_socket_bind/(...,-1) //->
///rtp_session_set_local_addr(...,-1,0) //what tries to bind rtp to
random udp port and rtcp to 0th udp port, but not to random port./
/I guess that rtcp socket is never created regardless of LibORTP
version. (there are periodic osmo-ortp(): network_error osmo-bts log
messages due to ICMP port unreachable messages received, besides those
mentioned in <a class="moz-txt-link-freetext" href="https://osmocom.org/issues/1662">https://osmocom.org/issues/1662</a>). So I suppose the
correct code should check port value and either calling
/rtp_session_set_local_addr(rs->sess, ip, port, port+1) /if port >0 or
else
calling /rtp_session_set_local_addr(rs->sess, ip, port, port) /?
/
/
</pre>
</blockquote>
<pre wrap="">
Your're right. I've fixed that in max/ortp branch. Not yet in master
because there seems to be more issues in play - I'm still unable to hear
audio with ortp 0.25. The RTCP is not that important for our use-case -
even if it fails (as indicated by ICMP messages) it should not affect
actual voice in RTP streams. Anyway, I'll keep digging :)

</pre>
<blockquote type="cite">
<pre wrap="">//Also, after inspecting  sources of LibORTP it seems that the
implementation//of /rtp_session_set_local_addr/ has changed for
LibORTP >= 0.24.0/./ As I understand the functionality of selecting a
random UDP port is broken.
</pre>
</blockquote>
<pre wrap="">
What makes you think that? I can see random UDP ports selected by oRTP
just fine in my test setup. Do you see it in pcap trace?

</pre>
<blockquote type="cite">
<pre wrap="">What results is one way audio.
</pre>
</blockquote>
<pre wrap="">
Could you please share some more details on your test setup? Are you
calling between 2 phones connected to the same BTS? Or using echo test?
That 1-way audio you hear - which way does it come from?

</pre>
</blockquote>
<br>
</body>
</html>