summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 03cba9244..8f547bf1a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -224,7 +224,6 @@
ASTERISK_REGISTER_FILE()
#include <signal.h>
-#include <sys/signal.h>
#include <regex.h>
#include <inttypes.h>
@@ -12996,7 +12995,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p,
/* Opus mandates 2 channels in rtpmap */
if (ast_format_cmp(format, ast_format_opus) == AST_FORMAT_CMP_EQUAL) {
ast_str_append(a_buf, 0, "a=rtpmap:%d %s/%u/2\r\n", rtp_code, mime, rate);
- } else {
+ } else if ((35 <= rtp_code) || !(sip_cfg.compactheaders)) {
ast_str_append(a_buf, 0, "a=rtpmap:%d %s/%u\r\n", rtp_code, mime, rate);
}
@@ -15791,11 +15790,12 @@ static void start_register_timeout(struct sip_registry *reg)
static const char *sip_sanitized_host(const char *host)
{
- struct ast_sockaddr addr = { { 0, 0, }, };
+ struct ast_sockaddr addr;
/* peer/sip_pvt->tohost and sip_registry->hostname should never have a port
* in them, so we use PARSE_PORT_FORBID here. If this lookup fails, we return
* the original host which is most likely a host name and not an IP. */
+ memset(&addr, 0, sizeof(addr));
if (!ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID)) {
return host;
}