Failed to get callee number during the call
Hello Friends, i would like to get the callee number during the call, i used the function 'switch_channel_get_variable', however, when i display it to the console, it shows 'null', i tried call this func before and after answering the call, both failed, could anyone help advise if i used the correct function or how to realzize it, thanks. source code as below, const char* in_calledstation; in_calledstation = switch_channel_get_variable(channel, "sip_callee_id_number"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "in_username: %s, in_calledstation: %s, in_uniqueid: %s, sessiontime: %d \n", in_username, in_calledstation, in_uniqueid, sessiontime); -- Regards, Charles
Hello Friends, i have resolved this issue by using varialbe 'destination_number' to replacing 'sip_callee_id_number', thanks. BR, Charles 2011/10/9, fieldpeak <fieldpeak@gmail.com>:
Hello Friends,
i would like to get the callee number during the call, i used the function 'switch_channel_get_variable', however, when i display it to the console, it shows 'null', i tried call this func before and after answering the call, both failed, could anyone help advise if i used the correct function or how to realzize it, thanks.
source code as below,
const char* in_calledstation;
in_calledstation = switch_channel_get_variable(channel, "sip_callee_id_number");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "in_username: %s, in_calledstation: %s, in_uniqueid: %s, sessiontime: %d \n", in_username, in_calledstation, in_uniqueid, sessiontime);
-- Regards, Charles
-- Regards, Charles
participants (1)
-
fieldpeak