[Freeswitch-svn] [commit] r12977 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Thu Apr 9 15:35:00 PDT 2009


Author: mikej
Date: Thu Apr  9 17:34:59 2009
New Revision: 12977

Log:
mod_sofia: add sip_call_info variable (SFSIP-138)

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Thu Apr  9 17:34:59 2009
@@ -4052,6 +4052,7 @@
 	sip_p_preferred_identity_t *ppreferred = NULL;
 	sip_privacy_t *privacy = NULL;
 	sip_alert_info_t *alert_info = NULL;
+	sip_call_info_t *call_info = NULL;
 	private_object_t *tech_pvt = NULL;
 	switch_channel_t *channel = NULL;
 	const char *channel_name = NULL;
@@ -4519,6 +4520,12 @@
 		su_free(profile->home, tmp);
 	}
 
+	if ((call_info = sip_call_info(sip))) {
+		char *tmp = sip_header_as_string(profile->home, (void *) call_info);
+		switch_channel_set_variable(channel, "sip_call_info", tmp);
+		su_free(profile->home, tmp);
+	}
+
 	if (profile->pres_type) {
 		const char *user = switch_str_nil(sip->sip_from->a_url->url_user);
 		const char *host = switch_str_nil(sip->sip_from->a_url->url_host);



More information about the Freeswitch-svn mailing list