提交 31891412 authored 作者: Anthony Minessale's avatar Anthony Minessale

add var that can set gmail greeting

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4270 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 41d2d43e
...@@ -1529,7 +1529,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi ...@@ -1529,7 +1529,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
char *dnis = NULL; char *dnis = NULL;
char workspace[1024] = ""; char workspace[1024] = "";
char *p, *u, ubuf[512] = "", *user = NULL; char *p, *u, ubuf[512] = "", *user = NULL;
char *cid_msg = NULL; char *cid_msg = NULL, *f_cid_msg = NULL;
switch_copy_string(workspace, outbound_profile->destination_number, sizeof(workspace)); switch_copy_string(workspace, outbound_profile->destination_number, sizeof(workspace));
profile_name = workspace; profile_name = workspace;
...@@ -1631,10 +1631,22 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi ...@@ -1631,10 +1631,22 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
tech_pvt->us = switch_core_session_strdup(*new_session, user); tech_pvt->us = switch_core_session_strdup(*new_session, user);
tech_pvt->them = switch_core_session_strdup(*new_session, full_id); tech_pvt->them = switch_core_session_strdup(*new_session, full_id);
ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user, LDL_FLAG_OUTBOUND); ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user, LDL_FLAG_OUTBOUND);
if ((cid_msg = switch_mprintf("Incoming Call From %s %s\n", outbound_profile->caller_id_name, outbound_profile->caller_id_number))) {
if (session) {
switch_channel_t *calling_channel = switch_core_session_get_channel(session);
cid_msg = switch_channel_get_variable(calling_channel, "dl_cid_msg");
}
if (!cid_msg) {
f_cid_msg = switch_mprintf("Incoming Call From %s %s\n", outbound_profile->caller_id_name, outbound_profile->caller_id_number);
cid_msg = f_cid_msg;
}
if (cid_msg) {
ldl_handle_send_msg(mdl_profile->handle, tech_pvt->them, tech_pvt->us, "", cid_msg); ldl_handle_send_msg(mdl_profile->handle, tech_pvt->them, tech_pvt->us, "", cid_msg);
free(cid_msg);
} }
switch_safe_free(f_cid_msg);
tech_pvt->profile = mdl_profile; tech_pvt->profile = mdl_profile;
ldl_session_set_private(dlsession, *new_session); ldl_session_set_private(dlsession, *new_session);
ldl_session_set_value(dlsession, "dnis", dnis); ldl_session_set_value(dlsession, "dnis", dnis);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论