[Freeswitch-svn] [commit] r11270 - freeswitch/branches/ctrix/mod_airpe

FreeSWITCH SVN ctrix at freeswitch.org
Sat Jan 17 17:15:39 PST 2009


Author: ctrix
Date: Sat Jan 17 19:15:39 2009
New Revision: 11270

Log:
Channel variables foe each airpe interface - on inbound calls



Modified:
   freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c

Modified: freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c
==============================================================================
--- freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c	(original)
+++ freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c	Sat Jan 17 19:15:39 2009
@@ -382,6 +382,26 @@
     switch_set_flag(tech_pvt, TFLAG_INBOUND);
     airpe_set_call_id(airpe, callid, switch_core_session_get_uuid(new_session) );
 
+    /* Setup specific client channel variables */
+    if ( airpe->variables_hash ) {
+	switch_hash_index_t *hi;
+	const void *var = NULL;
+	void *val = NULL;
+	const char *vname, *vvalue;
+
+	for (hi = switch_hash_first(NULL, airpe->variables_hash); hi; hi = switch_hash_next(hi)) {
+	    switch_hash_this(hi, &var, NULL, &val);
+	    vname = var;
+	    vvalue = (const char*) val;
+	    if ( vname && vvalue ) {
+		switch_channel_set_variable(channel, vname, vvalue);
+	    }
+	}
+
+    }
+
+
+
     switch_channel_set_state(channel, CS_INIT);
 
     if ( switch_core_session_thread_launch(new_session) != SWITCH_STATUS_SUCCESS ) {



More information about the Freeswitch-svn mailing list