[Freeswitch-users] mod_fifo vs mod_callcenter

Eugene Prokopiev enp at altlinux.org
Tue Dec 7 12:40:45 MSK 2010


2010/12/6 Eugene Prokopiev <enp at altlinux.org>:
>> Is it possible to implement the same logic for off-hook members? Can
>> you point me the line/function in mod_fifo.c in which off-hook member
>> is selecting for call?
>
> I tried to debug callflow with help of switch_log_printf. Two off-hook
> agents executes:
>
> <action application="fifo" data="$1 out wait"/>
>
> and waits in:
>
> mod_fifo.c:2588 - moh_status = switch_ivr_play_file(session, NULL, moh, &args);
>
> After executing:
>
> <action application="fifo" data="$1 in"/>
>
> only one off-hook agent leaves switch_ivr_play_file and process
> incoming call. Why can it leaves switch_ivr_play_file function?

I tried to debug switch_ivr_play_file function in
switch_ivr_play_say.c with with help of switch_log_printf. I've found
cycle with for (;;) which is interrupted by this code:

if (args && (args->read_frame_callback)) {
    int ok = 1;
    switch_set_flag(fh, SWITCH_FILE_CALLBACK);
    if ((status = args->read_frame_callback(session, read_frame,
args->user_data)) != SWITCH_STATUS_SUCCESS) {
        ok = 0;
    }
    switch_clear_flag(fh, SWITCH_FILE_CALLBACK);
    if (!ok) {
        break;
    }
}

But I can't find the reason to interruption. I tried to find it in
mod_fifo.c:node_thread_run but it seems cycle in this function works
only for on-hook agents.

--
Thanks,
Eugene Prokopiev



More information about the FreeSWITCH-users mailing list