Author Topic: channel wait_for_silence / wait_for_noise functionality?  (Read 1632 times)

blehxor

  • Newbie
  • *
  • Posts: 1
    • View Profile
channel wait_for_silence / wait_for_noise functionality?
« on: August 29, 2013, 12:49:23 PM »
I'm evaluating yate along with freeswitch and asterisk for a project dealing with IVR testing - as in it will need to drive an IVR with dtmf tones and record output. Yate and its API is looking attractive with its philosphy of powerful/flexible extension, but I want to make sure I can accomplish what I need to. Does yate have hooks/messages which would allow a script to analyze channel input and block while it waits for levels above some silence threshold and record the channel input while doing so?   I realize this might not be implemented in yate core, but wondering if there is an existing module that provides this functionality or if I would even be able to write my own module to accomplish such, or if I shouldn't be considering yate for this kind of use case. Wasn't able to find a definitive answer in the docs or any listing of existing 3rd party modules that might provide this, however I may have just missed it. Thanks in advance
« Last Edit: August 29, 2013, 12:53:11 PM by blehxor »

marian

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: channel wait_for_silence / wait_for_noise functionality?
« Reply #1 on: August 30, 2013, 01:58:16 AM »
Hi,

You'll have to write you own module to stay in the audio path.
Look at DataEndpoint class, addSniffer(), setCallRecord(), setPeerRecord() methods.
Your module will have to catch call signalling and attach its DataConsumer(s) to a call when appropriate.

If you want to stay in the data path and block it look at the conference module (modules/conference.cpp).