]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7470: add force-register-domain param to verto
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Apr 2015 15:45:48 +0000 (10:45 -0500)
committerBrian <brian@freeswitch.org>
Fri, 24 Apr 2015 14:49:54 +0000 (09:49 -0500)
src/mod/endpoints/mod_verto/mod_verto.c
src/mod/endpoints/mod_verto/mod_verto.h

index 410f5ce1d47a8cc373a89c5a58e828012b540b24..8afe2fb5f0f682911f2acb5a8d9e6eef9c1f9f1d 100644 (file)
@@ -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")) {
index b864dcf8b7b55f1d85e7555f8a3b25824f6aa544..beb26ab072a2537ef88ec145afa1310d0e198731 100644 (file)
@@ -249,6 +249,8 @@ struct verto_profile_s {
 
        verto_vhost_t *vhosts;
 
+       char *register_domain;
+
        struct verto_profile_s *next;
 };