mgcp: Use the calculated remote port from the mgcp_rtp_end
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c
index aeaafc8..f8c552c 100644
--- a/openbsc/src/mgcp/mgcp_network.c
+++ b/openbsc/src/mgcp/mgcp_network.c
@@ -182,13 +182,11 @@
return -1;
}
- port = rtp_calculate_port(ENDPOINT_NUMBER(endp), cfg->transcoder_remote_base);
- if (!is_rtp)
- port += 1;
+ port = is_rtp ? endp->trans_bts.rtp_port : endp->trans_bts.rtcp_port;
addr.sin_family = AF_INET;
addr.sin_addr = cfg->transcoder_in;
- addr.sin_port = htons(port);
+ addr.sin_port = port;
rc = sendto(is_rtp ?
endp->trans_bts.rtp.fd :