aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/trau/osmo_ortp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index a9503ea..0e1e108 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -351,6 +351,11 @@ int osmo_rtp_socket_connect(struct osmo_rtp_socket *rs, const char *ip, uint16_t
{
int rc;
+ /* enable the use of connect() so later getsockname() will
+ * actually return the IP address that was chosen for the local
+ * sid of the connection */
+ rtp_session_set_connected_mode(rs->sess, 1);
+
rc = rtp_session_set_remote_addr(rs->sess, ip, port);
if (rc < 0)
return rc;