more workarounds for cisco the leader in communication
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9170 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3c0842d438
commit
270ef7f67d
|
@ -1956,6 +1956,14 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
|
||||||
|
|
||||||
switch_channel_clear_flag(channel, CF_REQ_MEDIA);
|
switch_channel_clear_flag(channel, CF_REQ_MEDIA);
|
||||||
|
|
||||||
|
if ((status == 180 || status == 183 || status == 200)) {
|
||||||
|
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_server && sip->sip_server->g_string) {
|
||||||
|
switch_channel_set_variable(channel, "sip_user_agent", sip->sip_server->g_string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||||
|
|
||||||
if (!switch_test_flag(tech_pvt, TFLAG_SENT_UPDATE)) {
|
if (!switch_test_flag(tech_pvt, TFLAG_SENT_UPDATE)) {
|
||||||
|
@ -2137,14 +2145,6 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||||
status = 180;
|
status = 180;
|
||||||
}
|
}
|
||||||
|
|
||||||
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_server && 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)) {
|
if (channel && (status == 180 || status == 183) && switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
||||||
const char *val;
|
const char *val;
|
||||||
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
|
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
|
||||||
|
@ -3686,7 +3686,6 @@ static void sofia_info_send_sipfrag(switch_core_session_t *aleg, switch_core_ses
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This subroutine will take the a_params of a sip_addr_s structure and spin through them.
|
* This subroutine will take the a_params of a sip_addr_s structure and spin through them.
|
||||||
* Each param will be used to create a channel variable.
|
* Each param will be used to create a channel variable.
|
||||||
|
|
|
@ -495,7 +495,12 @@ static switch_status_t uuid_bridge_on_soft_execute(switch_core_session_t *sessio
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ready_b) {
|
if (!ready_b) {
|
||||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
const char *cid = switch_channel_get_variable(other_channel, "rdnis");
|
||||||
|
if (ready_a && cid) {
|
||||||
|
switch_ivr_session_transfer(session, cid, NULL, NULL);
|
||||||
|
} else {
|
||||||
|
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
switch_core_session_rwunlock(other_session);
|
switch_core_session_rwunlock(other_session);
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
|
@ -825,6 +830,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_uuid_bridge(const char *originator_uu
|
||||||
switch_channel_t *originator_channel, *originatee_channel, *swap_channel;
|
switch_channel_t *originator_channel, *originatee_channel, *swap_channel;
|
||||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
switch_caller_profile_t *cp, *originator_cp, *originatee_cp;
|
switch_caller_profile_t *cp, *originator_cp, *originatee_cp;
|
||||||
|
char *p;
|
||||||
|
|
||||||
if ((originator_session = switch_core_session_locate(originator_uuid))) {
|
if ((originator_session = switch_core_session_locate(originator_uuid))) {
|
||||||
if ((originatee_session = switch_core_session_locate(originatee_uuid))) {
|
if ((originatee_session = switch_core_session_locate(originatee_uuid))) {
|
||||||
|
@ -895,6 +901,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_uuid_bridge(const char *originator_uu
|
||||||
cp->destination_number = switch_core_strdup(cp->pool, originator_cp->caller_id_number);
|
cp->destination_number = switch_core_strdup(cp->pool, originator_cp->caller_id_number);
|
||||||
cp->caller_id_number = switch_core_strdup(cp->pool, originator_cp->caller_id_number);
|
cp->caller_id_number = switch_core_strdup(cp->pool, originator_cp->caller_id_number);
|
||||||
cp->caller_id_name = switch_core_strdup(cp->pool, originator_cp->caller_id_name);
|
cp->caller_id_name = switch_core_strdup(cp->pool, originator_cp->caller_id_name);
|
||||||
|
cp->rdnis = switch_core_strdup(cp->pool, originatee_cp->destination_number);
|
||||||
|
if ((p = strchr(cp->rdnis, '@'))) {
|
||||||
|
*p = '\0';
|
||||||
|
}
|
||||||
switch_channel_set_caller_profile(originatee_channel, cp);
|
switch_channel_set_caller_profile(originatee_channel, cp);
|
||||||
switch_channel_set_originator_caller_profile(originatee_channel, switch_caller_profile_clone(originatee_session, originator_cp));
|
switch_channel_set_originator_caller_profile(originatee_channel, switch_caller_profile_clone(originatee_session, originator_cp));
|
||||||
|
|
||||||
|
@ -902,6 +912,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_uuid_bridge(const char *originator_uu
|
||||||
cp->destination_number = switch_core_strdup(cp->pool, originatee_cp->caller_id_number);
|
cp->destination_number = switch_core_strdup(cp->pool, originatee_cp->caller_id_number);
|
||||||
cp->caller_id_number = switch_core_strdup(cp->pool, originatee_cp->caller_id_number);
|
cp->caller_id_number = switch_core_strdup(cp->pool, originatee_cp->caller_id_number);
|
||||||
cp->caller_id_name = switch_core_strdup(cp->pool, originatee_cp->caller_id_name);
|
cp->caller_id_name = switch_core_strdup(cp->pool, originatee_cp->caller_id_name);
|
||||||
|
cp->rdnis = switch_core_strdup(cp->pool, originator_cp->destination_number);
|
||||||
|
if ((p = strchr(cp->rdnis, '@'))) {
|
||||||
|
*p = '\0';
|
||||||
|
}
|
||||||
switch_channel_set_caller_profile(originator_channel, cp);
|
switch_channel_set_caller_profile(originator_channel, cp);
|
||||||
switch_channel_set_originatee_caller_profile(originator_channel, switch_caller_profile_clone(originator_session, originatee_cp));
|
switch_channel_set_originatee_caller_profile(originator_channel, switch_caller_profile_clone(originator_session, originatee_cp));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue