[Freeswitch-svn] [commit] r4074 - freeswitch/trunk/src/mod/applications/mod_enum

Freeswitch SVN brian at freeswitch.org
Sun Jan 28 16:43:00 EST 2007


Author: brian
Date: Sun Jan 28 16:43:00 2007
New Revision: 4074

Modified:
   freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c

Log:
update to allow args to enum dialplan for lookups.

Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c	Sun Jan 28 16:43:00 2007
@@ -521,6 +521,7 @@
 	enum_record_t *results, *rp;
 	switch_channel_t *channel = switch_core_session_get_channel(session);
 	enum_route_t *rtp;
+	char *dp = (char *) arg;
 
     assert(channel != NULL);
 
@@ -528,7 +529,7 @@
 	
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ENUM Lookup on %s\n", caller_profile->destination_number);
 
-	if (enum_lookup(globals.root, caller_profile->destination_number, &results) == SWITCH_STATUS_SUCCESS) {
+	if (enum_lookup(switch_strlen_zero(dp) ? globals.root : dp, caller_profile->destination_number, &results) == SWITCH_STATUS_SUCCESS) {
 		if ((extension = switch_caller_extension_new(session, caller_profile->destination_number, caller_profile->destination_number)) == 0) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
 			free_results(&results);	



More information about the Freeswitch-svn mailing list