mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-07 10:48:06 +00:00
Skinny: set BOND variable early to have call info during ring
This is hackish
This commit is contained in:
parent
23766e36e0
commit
14fee6c798
src/mod/endpoints/mod_skinny
@ -1047,6 +1047,10 @@ switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, swi
|
|||||||
switch_safe_free(sql);
|
switch_safe_free(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: ring_lines need BOND before switch_core_session_outgoing_channel() set it */
|
||||||
|
switch_channel_set_variable(switch_core_session_get_channel(session), SWITCH_SIGNAL_BOND_VARIABLE, switch_core_session_get_uuid(nsession));
|
||||||
|
switch_channel_set_variable(switch_core_session_get_channel(nsession), SWITCH_SIGNAL_BOND_VARIABLE, switch_core_session_get_uuid(session));
|
||||||
|
|
||||||
cause = skinny_ring_lines(tech_pvt, session);
|
cause = skinny_ring_lines(tech_pvt, session);
|
||||||
|
|
||||||
if(cause != SWITCH_CAUSE_SUCCESS) {
|
if(cause != SWITCH_CAUSE_SUCCESS) {
|
||||||
|
@ -527,14 +527,13 @@ int skinny_ring_lines_callback(void *pArg, int argc, char **argv, char **columnN
|
|||||||
switch_channel_set_variable(channel, "effective_callee_id_number", value);
|
switch_channel_set_variable(channel, "effective_callee_id_number", value);
|
||||||
switch_channel_set_variable(channel, "effective_callee_id_name", caller_name);
|
switch_channel_set_variable(channel, "effective_callee_id_name", caller_name);
|
||||||
if (helper->remote_session) {
|
if (helper->remote_session) {
|
||||||
switch_core_session_message_t *msg;
|
switch_core_session_message_t msg = { 0 };
|
||||||
msg = switch_core_session_alloc(helper->remote_session, sizeof(*msg));
|
msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
|
||||||
MESSAGE_STAMP_FFL(msg);
|
msg.string_array_arg[0] = switch_core_session_strdup(helper->remote_session, caller_name);
|
||||||
msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
|
msg.string_array_arg[1] = switch_core_session_strdup(helper->remote_session, value);
|
||||||
msg->string_array_arg[0] = switch_core_session_strdup(helper->remote_session, caller_name);
|
msg.from = __FILE__;
|
||||||
msg->string_array_arg[1] = switch_core_session_strdup(helper->remote_session, value);
|
|
||||||
msg->from = __FILE__;
|
if (switch_core_session_receive_message(helper->remote_session, &msg) != SWITCH_STATUS_SUCCESS) {
|
||||||
if (switch_core_session_queue_message(helper->remote_session, msg) != SWITCH_STATUS_SUCCESS) {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(helper->tech_pvt->session), SWITCH_LOG_WARNING,
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(helper->tech_pvt->session), SWITCH_LOG_WARNING,
|
||||||
"Unable to send SWITCH_MESSAGE_INDICATE_DISPLAY message to channel %s\n",
|
"Unable to send SWITCH_MESSAGE_INDICATE_DISPLAY message to channel %s\n",
|
||||||
switch_core_session_get_uuid(helper->remote_session));
|
switch_core_session_get_uuid(helper->remote_session));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user