diff --git a/conf/sip_profiles/external.xml b/conf/sip_profiles/external.xml
index 27e76a2edb..fd7e5818db 100644
--- a/conf/sip_profiles/external.xml
+++ b/conf/sip_profiles/external.xml
@@ -77,6 +77,8 @@
+
+
diff --git a/conf/sip_profiles/internal.xml b/conf/sip_profiles/internal.xml
index c9855c4bfe..ea0df56228 100644
--- a/conf/sip_profiles/internal.xml
+++ b/conf/sip_profiles/internal.xml
@@ -184,6 +184,8 @@
+
+
diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h
index 13e50cdf51..8e96d853f3 100644
--- a/src/mod/endpoints/mod_sofia/mod_sofia.h
+++ b/src/mod/endpoints/mod_sofia/mod_sofia.h
@@ -639,6 +639,7 @@ struct sofia_profile {
switch_mutex_t *gw_mutex;
uint32_t queued_events;
uint32_t cseq_base;
+ char *tls_passphrase;
};
struct private_object {
diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index c116acad4b..11c2db8388 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -1870,6 +1870,8 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
NUTAG_SIPS_URL(profile->tls_bindurl)),
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS),
NUTAG_CERTIFICATE_DIR(profile->tls_cert_dir)),
+ TAG_IF(sofia_test_pflag(profile, PFLAG_TLS) && profile->tls_passphrase,
+ TPTAG_TLS_PASSPHRASE(profile->tls_passphrase)),
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS),
TPTAG_TLS_VERIFY_POLICY(0)),
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS),
@@ -4409,6 +4411,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
}
} else if (!strcasecmp(var, "tls-cert-dir")) {
profile->tls_cert_dir = switch_core_strdup(profile->pool, val);
+ } else if (!strcasecmp(var, "tls-passphrase")) {
+ profile->tls_passphrase = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "tls-version")) {
if (!strcasecmp(val, "tlsv1")) {