From: Anthony Minessale Date: Thu, 23 Apr 2015 15:45:48 +0000 (-0500) Subject: FS-7470: add force-register-domain param to verto X-Git-Tag: v1.4.19~6^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3a747ad020b038fc1fe5794662bb96d983b6611;p=thirdparty%2Ffreeswitch.git FS-7470: add force-register-domain param to verto --- 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; };