From 09d8f47478e05342ec544bc10d93848044de5f79 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 27 Sep 2016 15:53:38 -0500 Subject: [PATCH] FS-9548 #resolve [crash on Invite due to bad config for sip profile ] --- src/mod/endpoints/mod_sofia/sofia.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 0983bc4301..d1f4407775 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4840,11 +4840,13 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name) } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-rtp-ip\n"); } - } else if (!strcasecmp(var, "rtp-ip") && val) { + } else if (!strcasecmp(var, "rtp-ip")) { char *ip = mod_sofia_globals.guess_ip; char buf[64]; - if (!strcmp(val, "0.0.0.0")) { + if (zstr(val)) { + ip = mod_sofia_globals.guess_ip; + } else if (!strcmp(val, "0.0.0.0")) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid IP 0.0.0.0 replaced with %s\n", mod_sofia_globals.guess_ip); } else if (!strncasecmp(val, "interface:", 10)) { char *ifname = val+10;