Revision
15191
Author
anthm
Date
2009-10-21 18:09:41 -0500 (Wed, 21 Oct 2009)

Log Message

add sip-force-extension

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (15190 => 15191)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2009-10-21 23:01:37 UTC (rev 15190)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2009-10-21 23:09:41 UTC (rev 15191)
@@ -714,6 +714,7 @@
 	char *dup_mwi_account = NULL;
 	char *mwi_user = NULL;
 	char *mwi_host = NULL;
+	char *var = NULL;
 	const char *from_user = NULL;
 	const char *from_host = NULL;
 	const char *reg_host = profile->reg_db_domain;
@@ -1008,6 +1009,11 @@
 	}
   reg:
 
+
+	if (v_event && *v_event && (var = switch_event_get_header(*v_event, "sip-force-extension"))) {
+		to_user = var;
+	}
+
 	if (v_event && *v_event && (mwi_account = switch_event_get_header(*v_event, "mwi-account"))) {
 		dup_mwi_account = strdup(mwi_account);
 		switch_assert(dup_mwi_account != NULL);