diff -ur tmp/asterisk/apps/app_enumlookup.c asterisk/apps/app_enumlookup.c
--- tmp/asterisk/apps/app_enumlookup.c	Mon Sep  1 17:36:52 2003
+++ asterisk/apps/app_enumlookup.c	Wed Sep  3 17:17:28 2003
@@ -16,6 +16,8 @@
 #include <asterisk/logger.h>
 #include <asterisk/channel.h>
 #include <asterisk/pbx.h>
+#include <asterisk/options.h>
+#include <asterisk/config.h>
 #include <asterisk/module.h>
 #include <asterisk/enum.h>
 #include <stdlib.h>
@@ -35,14 +37,21 @@
 
 static char *descrip = 
 "  EnumLookup(exten):  Looks up an extension via ENUM and sets\n"
-"the variable 'ENUM'.  Returns -1 on hangup, or 0 on completion\n"
-"regardless of whether the lookup was successful. Currently, the\n"
-"enumservices SIP and TEL are recognized. A good SIP entry\n"
-"will result in normal priority handling, whereas a good TEL entry\n"
-"will increase the priority by 51 (if existing)\n"
+"the variable 'ENUM'. For VoIP URIs this variable will \n"
+"look like 'TECHNOLOGY/URI' with the appropriate technology.\n"
+"Returns -1 on hangup, or 0 on completion regardless of whether the \n"
+"lookup was successful. \n"
+"Currently, the enumservices SIP, H323, IAX, IAX2 and TEL are recognized. \n"
+"A good SIP, H323, IAX or IAX2 entry will result in normal priority handling, \n"
+"whereas a good TEL entry will increase the priority by 51 (if existing).\n"
 "If the lookup was *not* successful and there exists a priority n + 101,\n"
 "then that priority will be taken next.\n" ;
 
+#define ENUM_CONFIG "enum.conf"
+
+static char h323driver[80];
+#define H323DRIVERDEFAULT "H323"
+
 STANDARD_LOCAL_USER;
 
 LOCAL_USER_DECL;
@@ -73,19 +82,23 @@
 				c += 4;
 			snprintf(tmp, sizeof(tmp), "SIP/%s", c);
 			pbx_builtin_setvar_helper(chan, "ENUM", tmp);
-		} else if (!strcasecmp(tech, "H323")) {
+		} else if (!strcasecmp(tech, "h323")) {
 			c = dest;
 			if (!strncmp(c, "h323:", 5))
 				c += 5;
-			snprintf(tmp, sizeof(tmp), "H323/%s", c);
+			snprintf(tmp, sizeof(tmp), "%s/%s", h323driver, c);
+/* do a s!;.*!! on the H323 URI */
+			t = strchr(c,';');
+			if (t) 
+				*t = 0;
 			pbx_builtin_setvar_helper(chan, "ENUM", tmp);
-		} else if (!strcasecmp(tech, "IAX")) {
+		} else if (!strcasecmp(tech, "iax")) {
 			c = dest;
 			if (!strncmp(c, "iax:", 4))
 				c += 4;
 			snprintf(tmp, sizeof(tmp), "IAX/%s", c);
 			pbx_builtin_setvar_helper(chan, "ENUM", tmp);
-		} else if (!strcasecmp(tech, "IAX2")) {
+		} else if (!strcasecmp(tech, "iax2")) {
 			c = dest;
 			if (!strncmp(c, "iax2:", 5))
 				c += 5;
@@ -129,6 +142,28 @@
 	return res;
 }
 
+static int load_config(void)
+{
+	struct ast_config *cfg;
+	char *s;
+
+	ast_log(LOG_WARNING, "reading enum config\n");
+
+	cfg = ast_load(ENUM_CONFIG);
+	if (cfg) {
+		if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
+			strcpy(h323driver, H323DRIVERDEFAULT);
+		} else {
+			strcpy(h323driver, s);
+		}
+		ast_destroy(cfg);
+		return 0;
+	}
+	ast_log(LOG_WARNING, "Error reading enum config\n");
+	return -1;
+}
+
+
 int unload_module(void)
 {
 	STANDARD_HANGUP_LOCALUSERS;
@@ -137,9 +172,22 @@
 
 int load_module(void)
 {
-	return ast_register_application(app, enumlookup_exec, synopsis, descrip);
+	int res;
+	res = ast_register_application(app, enumlookup_exec, synopsis, descrip);
+	if (res)
+		return(res);
+	if ((res=load_config())) {
+		return(res);
+	}
+	return(0);
 }
 
+int reload(void)
+{
+	return(load_config());
+}
+
+
 char *description(void)
 {
 	return tdesc;
@@ -156,3 +204,4 @@
 {
 	return ASTERISK_GPL_KEY;
 }
+
diff -ur tmp/asterisk/configs/enum.conf.sample asterisk/configs/enum.conf.sample
--- tmp/asterisk/configs/enum.conf.sample	Thu May  1 06:29:25 2003
+++ asterisk/configs/enum.conf.sample	Wed Sep  3 17:33:50 2003
@@ -9,3 +9,8 @@
 ; in the order they are listed here.
 ;
 search => e164.arpa
+;
+; As there are more H323 drivers available you have to select to which
+; drive a H323 URI will map. Default is "H323".
+;
+h323driver => H323
diff -ur tmp/asterisk/enum.c asterisk/enum.c
--- tmp/asterisk/enum.c	Mon Sep  1 17:36:52 2003
+++ asterisk/enum.c	Wed Sep  3 14:18:34 2003
@@ -187,20 +187,23 @@
 	if ((!strncasecmp(services, "e2u+sip", 7)) || 
 	    (!strncasecmp(services, "sip+e2u", 7))) {
 		strncpy(tech, "sip", techsize -1); 
-	} else if ((!strncasecmp(services, "e2u+h323", 7)) || 
-	    (!strncasecmp(services, "h323+e2u", 7))) {
+	} else if ((!strncasecmp(services, "e2u+h323", 8)) || 
+	    (!strncasecmp(services, "h323+e2u", 8))) {
 		strncpy(tech, "h323", techsize -1); 
 	} else if ((!strncasecmp(services, "e2u+iax", 7)) || 
 	    (!strncasecmp(services, "iax+e2u", 7))) {
 		strncpy(tech, "iax", techsize -1); 
-	} else if ((!strncasecmp(services, "e2u+iax2", 7)) || 
-	    (!strncasecmp(services, "iax2+e2u", 7))) {
+	} else if ((!strncasecmp(services, "e2u+iax2", 8)) || 
+	    (!strncasecmp(services, "iax2+e2u", 8))) {
 		strncpy(tech, "iax2", techsize -1); 
 	} else if ((!strncasecmp(services, "e2u+tel", 7)) || 
 	    (!strncasecmp(services, "tel+e2u", 7))) {
 		strncpy(tech, "tel", techsize -1); 
-	} else if (strncasecmp(services, "e2u+voice:", 10)) {
-		ast_log(LOG_WARNING, "Services must be e2u+sip, sip+e2u, e2u+h323, h323+e2u, e2u+iax, iax+e2u, e2u+iax2, iax2+e2u, e2u+tel, tel+e2u or e2u+voice:\n");
+	} else if (!strncasecmp(services, "e2u+voice:", 10)) {
+		strncpy(tech, services+10, techsize -1); 
+	} else {
+		ast_log(LOG_WARNING, 
+		"Services must be e2u+${tech}, ${tech}+e2u, or e2u+voice: where $tech is from (sip, h323, tel,iax, iax2). \n");
 		return -1;
 	}
 
@@ -277,9 +280,6 @@
 	}
 	*d = 0;
 	strncpy(dst, temp, dstsize);
-	d = strchr(services, ':');
-	if (d) 
-		strncpy(tech, d+1, techsize -1); 
 	return 0;
 }
