From d84bf06bb1ded82b242d57baba2cca32c67f7569 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 22 May 2020 00:37:09 +0000 Subject: [PATCH] [mod_verto] send last known display info on re-attach --- src/mod/endpoints/mod_verto/mod_verto.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index dfcdde25f3..a91c484f1b 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -3553,6 +3553,19 @@ static switch_bool_t verto__attach_func(const char *method, cJSON *params, jsock } if (!err) { + const char *cid_name, *cid_num; + switch_core_session_message_t msg = { 0 }; + + cid_name = switch_channel_get_variable(tech_pvt->channel, "last_sent_display_name"); + cid_num = switch_channel_get_variable(tech_pvt->channel, "last_sent_display_number"); + + msg.from = __FILE__; + msg.string_array_arg[0] = cid_name; + msg.string_array_arg[1] = cid_num; + + msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY; + switch_core_session_receive_message(session, &msg); + return SWITCH_TRUE; }