shitsco should be embarrassed how damn stupid they are

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9149 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-07-23 22:21:24 +00:00
parent 0b75c853df
commit 0cacd091ba
1 changed files with 9 additions and 3 deletions

View File

@ -137,7 +137,10 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
if (sip->sip_user_agent && !switch_strlen_zero(sip->sip_user_agent->g_string)) {
switch_channel_set_variable(channel, "sip_user_agent", sip->sip_user_agent->g_string);
} else if (sip->sip_user_agent && !switch_strlen_zero(sip->sip_server->g_string)) {
switch_channel_set_variable(channel, "sip_user_agent", sip->sip_server->g_string);
}
if ((tmp = sofia_glue_get_unknown_header(sip, "rtp-txstat"))) {
switch_channel_set_variable(channel, "sip_rtp_txstat", tmp);
}
@ -2134,9 +2137,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
status = 180;
}
if (channel && (status == 180 || status == 183 || status == 200) &&
sip && sip->sip_user_agent && sip->sip_user_agent->g_string && switch_channel_test_flag(channel, CF_OUTBOUND)) {
switch_channel_set_variable(channel, "sip_user_agent", sip->sip_user_agent->g_string);
if (sip && channel && (status == 180 || status == 183 || status == 200) && switch_channel_test_flag(channel, CF_OUTBOUND)) {
if (sip->sip_user_agent && sip->sip_user_agent->g_string) {
switch_channel_set_variable(channel, "sip_user_agent", sip->sip_user_agent->g_string);
} else if (sip->sip_user_agent && sip->sip_server->g_string) {
switch_channel_set_variable(channel, "sip_user_agent", sip->sip_server->g_string);
}
}
if (channel && (status == 180 || status == 183) && switch_channel_test_flag(channel, CF_OUTBOUND)) {