[Freeswitch-users] Prevent mod_callcenter from auto answering channel

Rovshan Baghirov rovshanb at yandex.ru
Tue Oct 31 10:11:59 UTC 2017


Hello,

While caller waits in a queue using mod_callcenter and listens to hold music I do not want caller to be charged by operator. And only start charging when an agent picks up a call. I tried to play some announcement to caller without sending to queue and a caller is able to listen to announcement without being charged. But when I redirect user to mod_callcenter it automatically answers the session.
It is coded in mod_callcenter.c line line 2795: 

/* Make sure we answer the channel before getting the switch_channel_time_table_t answer time */
switch_channel_answer(member_channel);

My FreeSWITCH version is: 1.6.19-36-7a77e0b~64bit (-36-7a77e0b 64bit)

Now I want to remove this line and add it on line 3051 just before:

switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Member %s <%s> is answered by an agent in queue %s\n", switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_name")), switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_number")), queue_name);

I wanted to ask am I doing it right and will it have any side effects except dtmf not working during wait?

Here is link to file version I'm talking about: https://freeswitch.org/stash/projects/FS/repos/freeswitch/raw/src/mod/applications/mod_callcenter/mod_callcenter.c?at=refs%2Ftags%2Fv1.6.19

Best Regards,
Rovshan



More information about the FreeSWITCH-users mailing list