Half sided calls

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Pavel Balashov psb1979 at hotmail.com
Fri Apr 22 11:40:18 UTC 2016


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 https://osmocom.org/issues/1662). 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) ?

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.
What results is one way audio.

Regards,
Pavel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20160422/df02c7ed/attachment.htm>


More information about the OpenBSC mailing list