diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index 8f8c1ca926..505b9892ee 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -970,10 +970,10 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char * } else if (switch_true(jsock->profile->userauth)) { id = switch_core_strdup(jsock->pool, login); - if ((domain = strchr(id, '@'))) { + if (jsock->profile->chop_domain && (domain = strchr(id, '@'))) { *domain++ = '\0'; } - + } if (jsock->profile->register_domain) { @@ -5065,7 +5065,7 @@ static switch_status_t parse_config(const char *cf) profile->mcast_sub.sock = KS_SOCK_INVALID; profile->mcast_pub.sock = KS_SOCK_INVALID; - + profile->chop_domain = SWITCH_TRUE; for (param = switch_xml_child(xprofile, "param"); param; param = param->next) { char *var = NULL; @@ -5107,6 +5107,8 @@ static switch_status_t parse_config(const char *cf) 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, "chop-domain") && !zstr(val)) { + profile->chop_domain = switch_true(val); } else if (!strcasecmp(var, "root-password") && !zstr(val)) { profile->root_passwd = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "send-auth-password") && !zstr(val)) { diff --git a/src/mod/endpoints/mod_verto/mod_verto.h b/src/mod/endpoints/mod_verto/mod_verto.h index c9087e5ada..112fb09ae6 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.h +++ b/src/mod/endpoints/mod_verto/mod_verto.h @@ -241,7 +241,8 @@ struct verto_profile_s { int ssl_ready; int ready; int debug; - + int chop_domain; + int in_thread; int blind_reg;