mirror of
https://gerrit.osmocom.org/osmo-gbproxy
synced 2024-08-21 18:36:25 +00:00
mgcp/rtp: Send dummy packet to the RTCP destination, too
Currently a dummy packet is only sent to the RTP port. This is not enough if RTCP must also cross the SNAT. This patch sends an additional dummy packet to the RTCP net destination if omit_rtcp is not set. Sponsored-by: On-Waves ehf
This commit is contained in:
parent
9b7eb7b6af
commit
2752328448
1 changed files with 9 additions and 2 deletions
|
@ -129,9 +129,16 @@ static int mgcp_udp_send(int fd, struct in_addr *addr, int port, char *buf,
|
|||
int mgcp_send_dummy(struct mgcp_endpoint *endp)
|
||||
{
|
||||
static char buf[] = { MGCP_DUMMY_LOAD };
|
||||
int rc;
|
||||
|
||||
return mgcp_udp_send(endp->net_end.rtp.fd, &endp->net_end.addr,
|
||||
endp->net_end.rtp_port, buf, 1);
|
||||
rc = mgcp_udp_send(endp->net_end.rtp.fd, &endp->net_end.addr,
|
||||
endp->net_end.rtp_port, buf, 1);
|
||||
|
||||
if (rc == -1 || endp->tcfg->omit_rtcp)
|
||||
return rc;
|
||||
|
||||
return mgcp_udp_send(endp->net_end.rtcp.fd, &endp->net_end.addr,
|
||||
endp->net_end.rtcp_port, buf, 1);
|
||||
}
|
||||
|
||||
static int32_t compute_timestamp_aligment_error(struct mgcp_rtp_stream_state *sstate,
|
||||
|
|
Loading…
Reference in a new issue