diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c
index 0c4def97c9..a503309c0b 100644
--- a/src/mod/endpoints/mod_sofia/mod_sofia.c
+++ b/src/mod/endpoints/mod_sofia/mod_sofia.c
@@ -1561,6 +1561,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
stream->write_function(stream, "TLS-BIND-URL \t%s\n", switch_str_nil(profile->tls_bindurl));
}
stream->write_function(stream, "HOLD-MUSIC \t%s\n", switch_strlen_zero(profile->hold_music) ? "N/A" : profile->hold_music);
+ stream->write_function(stream, "OUTBOUND-PROXY \t%s\n", switch_strlen_zero(profile->outbound_proxy) ? "N/A" : profile->outbound_proxy);
stream->write_function(stream, "CODECS \t%s\n", switch_str_nil(profile->codec_string));
stream->write_function(stream, "TEL-EVENT \t%d\n", profile->te);
if (profile->dtmf_type == DTMF_2833) {
@@ -1751,6 +1752,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
stream->write_function(stream, "%s\n", switch_str_nil(profile->tls_bindurl));
}
stream->write_function(stream, "%s\n", switch_strlen_zero(profile->hold_music) ? "N/A" : profile->hold_music);
+ stream->write_function(stream, "%s\n", switch_strlen_zero(profile->outbound_proxy) ? "N/A" : profile->outbound_proxy);
stream->write_function(stream, "%s\n", switch_str_nil(profile->codec_string));
stream->write_function(stream, "%d\n", profile->te);
if (profile->dtmf_type == DTMF_2833) {
diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h
index 83eb9791ab..4ba44c70c9 100644
--- a/src/mod/endpoints/mod_sofia/mod_sofia.h
+++ b/src/mod/endpoints/mod_sofia/mod_sofia.h
@@ -379,6 +379,7 @@ struct sofia_profile {
char *sipdomain;
char *timer_name;
char *hold_music;
+ char *outbound_proxy;
char *bind_params;
char *tls_bind_params;
char *tls_cert_dir;
diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index 666ca7de80..bfcaa8f9e1 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -730,6 +730,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
TAG_IF(!strchr(profile->sipip, ':'), NTATAG_UDP_MTU(65535)),
TAG_IF(profile->disable_srv, NTATAG_USE_SRV(0)),
TAG_IF(profile->disable_naptr, NTATAG_USE_NAPTR(0)),
+ NTATAG_DEFAULT_PROXY(profile->outbound_proxy),
NTATAG_SERVER_RPORT(profile->rport_level),
TAG_IF(tportlog, TPTAG_LOG(1)),
TAG_END()); /* Last tag should always finish the sequence */
@@ -1587,6 +1588,8 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
profile->reg_db_domain = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "hold-music")) {
profile->hold_music = switch_core_strdup(profile->pool, val);
+ } else if (!strcasecmp(var, "outbound-proxy")) {
+ profile->outbound_proxy = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "session-timeout")) {
int v_session_timeout = atoi(val);
if (v_session_timeout >= 0) {
@@ -1979,6 +1982,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
profile->timer_name = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "hold-music")) {
profile->hold_music = switch_core_strdup(profile->pool, val);
+ } else if (!strcasecmp(var, "outbound-proxy")) {
+ profile->outbound_proxy = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "session-timeout")) {
int v_session_timeout = atoi(val);
if (v_session_timeout >= 0) {