From ccd22e8029924af396173535c5e335186e5d8fb9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 9 Apr 2009 22:34:59 +0000 Subject: [PATCH] mod_sofia: add sip_call_info variable (SFSIP-138) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12977 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 40e55f102a..d98113a8d2 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4052,6 +4052,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ 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 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ 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);