Browse Source

MT#55283 switch DTMF socket to connectionless

Make it possible to send to other/multiple destinations

Change-Id: Ic46f420f5fb9719c72063966f3e8e8fe73ed817a
pull/1640/head
Richard Fuchs 3 years ago
parent
commit
711d43646f
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      daemon/dtmf.c

+ 4
- 3
daemon/dtmf.c View File

@ -17,7 +17,7 @@ void dtmf_init(void) {
ilog(LOG_DEBUG, "log dtmf over ng %d", rtpe_config.dtmf_via_ng);
ilog(LOG_DEBUG, "no log injected dtmf %d", rtpe_config.dtmf_no_log_injects);
if (rtpe_config.dtmf_udp_ep.port) {
if (connect_socket(&dtmf_log_sock, SOCK_DGRAM, &rtpe_config.dtmf_udp_ep))
if (open_v46_socket(&dtmf_log_sock, SOCK_DGRAM))
ilog(LOG_ERR, "Failed to open/connect DTMF logging socket: %s", strerror(errno));
}
}
@ -150,8 +150,9 @@ static void dtmf_end_event(struct call_media *media, unsigned int event, unsigne
if (_log_facility_dtmf)
dtmflog(buf);
if (dtmf_log_sock.family)
if (send(dtmf_log_sock.fd, buf->str, buf->len, 0) < 0)
ilog(LOG_ERR, "Error sending DTMF event info to UDP socket: %s",
if (socket_sendto(&dtmf_log_sock, buf->str, buf->len, &rtpe_config.dtmf_udp_ep) < 0)
ilog(LOG_ERR, "Error sending DTMF event info to UDP destination %s: %s",
endpoint_print_buf(&rtpe_config.dtmf_udp_ep),
strerror(errno));
if (rtpe_config.dtmf_via_ng)


Loading…
Cancel
Save