diff --git a/config.c b/config.c
index dda916e209daceea10cb7f3eb8c5587198a5e0f0..ce68b60ab503934955c57d948b1901655700916a 100644
--- a/config.c
+++ b/config.c
@@ -811,9 +811,19 @@ void read_config_maps(void)
 	for (v = ast_variable_browse(config, "settings"); v; v = v->next) {
 		stringp = v->value;
 		driver = strsep(&stringp, ",");
-		database = strsep(&stringp, ",");
+
+		/* check if the database text starts with a double quote */
+		if (*stringp == '"') {
+			stringp++;
+			database = strsep(&stringp, "\"");
+			strsep(&stringp, ",");
+		} else {
+			/* apparently this text has no quotes */
+			database = strsep(&stringp, ",");
+		}
+
 		table = strsep(&stringp, ",");
-			
+
 		if (!strcmp(v->name, extconfig_conf)) {
 			ast_log(LOG_WARNING, "Cannot bind '%s'!\n", extconfig_conf);
 			continue;
diff --git a/configs/extconfig.conf.sample b/configs/extconfig.conf.sample
index 1cf923fb38e608d92363e3cb03e602e77aa2556e..1f82b88d70e798ed5d3d17954b7d14f7201a08ec 100644
--- a/configs/extconfig.conf.sample
+++ b/configs/extconfig.conf.sample
@@ -40,6 +40,8 @@
 ; the family if the table is not specified
 ;
 ;example => odbc,asterisk,alttable
+;example2 => ldap,"dc=oxymium,dc=net",example2
+;
 ;iaxusers => odbc,asterisk
 ;iaxpeers => odbc,asterisk
 ;sipusers => odbc,asterisk