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
This commit is contained in:
Michael Jerris 2009-04-09 22:34:59 +00:00
parent cf3d715036
commit ccd22e8029

View File

@ -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);