diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index 410f5ce1d4..8afe2fb5f0 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -932,6 +932,10 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char * } + if (jsock->profile->register_domain) { + domain = jsock->profile->register_domain; + } + if (!(id && domain)) { *code = CODE_AUTH_FAILED; switch_snprintf(message, mlen, "Missing or improper credentials"); @@ -4223,6 +4227,8 @@ static switch_status_t parse_config(const char *cf) profile->mcast_port = (switch_port_t) atoi(val); } else if (!strcasecmp(var, "timer-name") && !zstr(var)) { profile->timer_name = switch_core_strdup(profile->pool, val); + } else if (!strcasecmp(var, "force-register-domain") && !zstr(val)) { + profile->register_domain = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "local-network") && !zstr(val)) { profile->local_network = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "apply-candidate-acl")) { diff --git a/src/mod/endpoints/mod_verto/mod_verto.h b/src/mod/endpoints/mod_verto/mod_verto.h index b864dcf8b7..beb26ab072 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.h +++ b/src/mod/endpoints/mod_verto/mod_verto.h @@ -249,6 +249,8 @@ struct verto_profile_s { verto_vhost_t *vhosts; + char *register_domain; + struct verto_profile_s *next; };