Human / caller machine detection for incoming calls

Hello,
I would like to write a dialplan to handle human and “robot” incoming calls appropriately within the same number/extension.

The idea is as simple as that:

  • Answer the phone
  • If an automated caller leaves a message/reminder for me, immediately record it (either app_Record, voicemail, etc) until it hangs up. I do agree to loose a few first seconds used for detection
  • If that is a human, go to IVR menu (menu itself is already implemented, no questions here).

OR, which is probably more complicated but better, since first seconds of recording are not lost:

  • Start recording and answer
  • Meanwhile try to detect who is on the other end
  • If machine is detected, keep recording until caller hangs up.
  • If a human is detected, cancel recording (delete a file recorded so far) and go to IVR.

I am not requesting for a ready-to-use dialplan (which would be just fine though), but basic ideas about which modules work best here will help a lot.

The best I can think of to detect machine is that human will say some short words “hello?” or just be silent, on the other hand machine will keep talking continuously.

I do apologize if placed this topic in a wrong place.
Thank you!

Howdy,

There’s a new function in 12 and 13, TALK_DETECT, that might provide some utility to you in this matter:

wiki.asterisk.org/wiki/display/ … ALK_DETECT

Hi Malcolm,
Yes, it might. Thank you!

However, both human and caller machines do nothing more than talking. Anyway, I’ll give it a try. Thanks again.

Correct. As far as the other end’s concerned though, recognizing a machine is typically something you have to guess at anyway, and guessing based on the energy patterns of the other end is about as good as you’re going to get. :smile:

Eureka! Apparently I have found even a better idea how to detect machine. Machine will not type extensions in response to my IVR, and it is extremely easy to determine.
So here is an idea:
[ul]1. Start recording incoming call (I found Monitor application suits my needs the best IMHO)
2. Prompt and wait for extension
3. Once extension typed, stop recording and proceed according to dialplan, otherwise proceed recording until wait timeout occurs.[/ul]
My dialplan looks like this:

exten => start,1,NoOp() same => n,Monitor(WAV,,o) same => n,Answer() same => n,Background(vm-enter-num-to-call) same => n,WaitExten(60) ...
all other extensions in the context start the same way:

[code]exten => 101,1,NoOp()
same => n,StopMonitor()
same => n,…

exten => 102,1,NoOp()
same => n,StopMonitor()
same => n,…
[/code]
etc
Too much copy-n-paste (StopMonitor everywhere), looks ugly, I know… Will improve that next time once I get more experience with asterisk.
Hopefully someone else finds it useful too, and I’m not talking just to myself.
Thank you and Happy Thanksgiving!