]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add blind-reg param to verto
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 18 Jul 2014 19:42:49 +0000 (00:42 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 18 Jul 2014 19:42:49 +0000 (00:42 +0500)
conf/vanilla/autoload_configs/verto.conf.xml
src/mod/endpoints/mod_verto/mod_verto.c
src/mod/endpoints/mod_verto/mod_verto.h

index 6d84929baf14893ff29e2c7fce5824dbe006c88b..12897b0431f273c4ded165bdd1a9949517c21ddc 100644 (file)
@@ -11,6 +11,8 @@
       <param name="secure-combined" value="/usr/local/freeswitch/certs/wss.pem"/>
       <param name="secure-chain" value="/usr/local/freeswitch/certs/wss.pem"/>
       <param name="userauth" value="true"/>
+      <!-- setting this to true will allow anyone to register even with no account so use with care -->
+      <param name="blind-reg" value="false"/>
       <param name="mcast-ip" value="224.1.1.1"/>
       <param name="mcast-port" value="1337"/>
       <param name="rtp-ip" value="$${local_ip_v4}"/>
index 335e3e0c06b6db5f3728a3936a3f1789aa65fd0c..61ba82f93b92d9187b829e1a8b1079819480c737 100644 (file)
@@ -916,6 +916,9 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char *
                switch_event_destroy(&req_params);
        }
 
+       if (jsock->profile->blind_reg) {
+               r = SWITCH_TRUE;
+       }
        
  end:
 
@@ -3531,6 +3534,8 @@ static switch_status_t parse_config(const char *cf)
                                        profile->inbound_codec_string = switch_core_strdup(profile->pool, val); 
                                } else if (!strcasecmp(var, "outbound-codec-string") && !zstr(val)) {
                                        profile->outbound_codec_string = switch_core_strdup(profile->pool, val); 
+                               } else if (!strcasecmp(var, "blind-reg") && !zstr(val)) {
+                                       profile->blind_reg = switch_true(val);
                                } else if (!strcasecmp(var, "userauth") && !zstr(val)) {
                                        profile->userauth = switch_core_strdup(profile->pool, val);
                                } else if (!strcasecmp(var, "root-password") && !zstr(val)) {
index 84a98649b9c378b269de1491e73b016ab2bd79d2..db61cdedd1e2cea25eb4ec7d746d1ce86168bf53 100644 (file)
@@ -187,6 +187,7 @@ struct verto_profile_s {
        int debug;
        
        int in_thread;
+       int blind_reg;
 
        char *userauth;
        char *root_passwd;