Chanspy playback file

Hello,

I am trying to playback a file in the chanspy application to the spyer channel when user is changing the spy mode (listen/whisper/barge). I couldn’t find this option in the configuration file so I’m trying to change the source code of this application. Seems to be a simple task but my C knowledge are not enough unfortunately to get it working.
Those are the changes I’ve done:

change_spy_mode(res, flags);  ------>  change_spy_mode(chan,res, flags);
static void change_spy_mode(const char digit, struct ast_flags *flags)  ------>   static void change_spy_mode(struct ast_channel *chan ,const char digit, struct ast_flags *flags)

and then added the following to the ‘change_spy_mode’ function:

ast_streamfile(chan, "demofile", ast_channel_language(chan));

This way the demofile is played successfully when user is changing the mode. The issue is that after the file is played the spyer cannot hear anymore the spyee channel, I believe that maybe ast_streamfile function is keeping channel and not releasing it after playback. Could you please let me know what I’m doing wrong and what would be the best way to get it working.

Thank you.

This is not a developer forum. There are mailing lists and IRC channels for developers.

I’m not particularly surprised that this is not easy.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.