mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 02:22:56 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3227 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
082a5a03c0
commit
718ace8b83
src/mod/endpoints
@ -1497,6 +1497,12 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((mdl_profile = switch_core_hash_find(globals.profile_hash, profile_name))) {
|
if ((mdl_profile = switch_core_hash_find(globals.profile_hash, profile_name))) {
|
||||||
|
|
||||||
|
if ((mdl_profile->user_flags & LDL_FLAG_COMPONENT) && strchr(outbound_profile->caller_id_number, '@')) {
|
||||||
|
snprintf(ubuf, sizeof(ubuf), "%s/talk", outbound_profile->caller_id_number);
|
||||||
|
user = ubuf;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ldl_handle_ready(mdl_profile->handle)) {
|
if (!ldl_handle_ready(mdl_profile->handle)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! we are not logged in yet!\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! we are not logged in yet!\n");
|
||||||
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||||
|
@ -3693,7 +3693,7 @@ static void sip_i_invite(nua_t *nua,
|
|||||||
char *username, *to_username = NULL;
|
char *username, *to_username = NULL;
|
||||||
char *url_user = (char *) from->a_url->url_user;
|
char *url_user = (char *) from->a_url->url_user;
|
||||||
char *to_user, *to_host;
|
char *to_user, *to_host;
|
||||||
char *a,*b;
|
|
||||||
if (!(tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t)))) {
|
if (!(tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t)))) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
|
||||||
terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
|
terminate_session(&session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
|
||||||
@ -3754,18 +3754,19 @@ static void sip_i_invite(nua_t *nua,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((a = strchr(to_user, '+')) && (b = strrchr(to_user, '+')) && a != b) {
|
|
||||||
*b = '@';
|
|
||||||
}
|
|
||||||
|
|
||||||
attach_private(session, profile, tech_pvt, username);
|
attach_private(session, profile, tech_pvt, username);
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
switch_channel_set_variable(channel, "endpoint_disposition", "INBOUND CALL");
|
switch_channel_set_variable(channel, "endpoint_disposition", "INBOUND CALL");
|
||||||
set_chat_hash(tech_pvt, sip);
|
set_chat_hash(tech_pvt, sip);
|
||||||
|
|
||||||
switch_channel_set_variable(channel, "sip_fromuser", (char *) from->a_url->url_user);
|
switch_channel_set_variable(channel, "sip_from_user", (char *) from->a_url->url_user);
|
||||||
switch_channel_set_variable(channel, "sip_fromhost", (char *) from->a_url->url_host);
|
if (from->a_url->url_user && *from->a_url->url_user == '+') {
|
||||||
|
switch_channel_set_variable(channel, "sip_from_user_stripped", (char *)(from->a_url->url_user+1));
|
||||||
|
} else {
|
||||||
|
switch_channel_set_variable(channel, "sip_from_user_stripped", (char *)from->a_url->url_user);
|
||||||
|
}
|
||||||
|
switch_channel_set_variable(channel, "sip_from_host", (char *) from->a_url->url_host);
|
||||||
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
|
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
|
||||||
(char *) from->a_url->url_user,
|
(char *) from->a_url->url_user,
|
||||||
profile->dialplan,
|
profile->dialplan,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user