mod_vmd--can it do more than simply find VoiceMail Beeping?
I'm doing some outbound dialing, and want to use mod_vmd to detect if a live person picks up or a voicemail picks up. I've read the wiki, and have been playing around with the dialplan implementation and the lua implementation, along with capturing the mod_vmdvmd::beep event. Using the examples on the wiki, I am able to call a number, sleep for 25 seconds, and mod_vmd usually detects a Beep (the answering machine beep right before you are to speak your message). My question is, is there a way to use mod_vmd to detect if an answering machine or human has picked up within the first 1-2 seconds after being answered? If so, can I get an example of how to set this up? my dialplan to test my lua implementation looks like <!-- mod_vmd test extension (new mod)--> <extension name="vmdtest"> <condition field="destination_number" expression="^1986$"> <action application="answer"/> <action application="lua" data="matt_vmd.lua"/> <action application="hangup"/> </condition> </extension> and matt_vmd.lua looks like print ("--matt_vmd.lua START--") local human_detected = false; local voicemail_detected = false; function onInput(session, type, obj) if type == "dtmf" and obj['digit'] == '1' and human_detected == false then print('MATT--I detected a HUMAN'); human_detected = true; return "break"; end if type == "event" and voicemail_detected == false then print('MATT--I detected a VOICEMAIL'); voicemail_detected = true; return "break"; end end session:setInputCallback("onInput"); session:execute("vmd"); session:sleep(25000); print ("--matt_vmd.lua FINISHED--") Thanks. --matt
Matthew Fong <mattdfong@gmail.com> wrote:
My question is, is there a way to use mod_vmd to detect if an answering machine or human has picked up within the first 1-2 seconds after being answered?
Probably not. If you have an algorithm in mind that would achieve this with a high degree of reliability, I'm sure the FreeSWITCH developers would be interested in it. However, as far as I know, there is no reliable way to distinguish, for example, my voice as recorded in a voicemail greeting from my voice giving a live greeting after answering a phone call. Think about it.
On Tue, 2009-04-07 at 17:17 +1000, Jason White wrote:
Matthew Fong <mattdfong@gmail.com> wrote:
My question is, is there a way to use mod_vmd to detect if an answering machine or human has picked up within the first 1-2 seconds after being answered?
Probably not. If you have an algorithm in mind that would achieve this with a high degree of reliability, I'm sure the FreeSWITCH developers would be interested in it. However, as far as I know, there is no reliable way to distinguish, for example, my voice as recorded in a voicemail greeting from my voice giving a live greeting after answering a phone call. Think about it.
The usual way is to measure how long the person who answers the phone speaks for. A person might say "Hello?", "Hello, this is Alice", "Thank you for calling XYZ. How may I direct your call?" Voicemail will usually be longer - "Hi, this is Bob. I'm sorry I can't take your call right now, so please leave me a message after the tone and I'll get back to you as soon as I can." In the first couple of cases above, this would give you an answer - "human" - within the first few seconds of the call. FreeSWITCH will give you TALK (start of speech (or noise)) and NOTALK (end of) events if you enable VAD. --Dave
Or my personal favorite... Congestion tone! /b On Apr 7, 2009, at 9:25 AM, David Knell wrote:
The usual way is to measure how long the person who answers the phone speaks for. A person might say "Hello?", "Hello, this is Alice", "Thank you for calling XYZ. How may I direct your call?" Voicemail will usually be longer - "Hi, this is Bob. I'm sorry I can't take your call right now, so please leave me a message after the tone and I'll get back to you as soon as I can."
Brian West brian@freeswitch.org -- Meet us a ClueCon! http://www.cluecon.com
Matt, No that¹s all mod_vmd does... If you want to do a more advanced analysis of media stream coming from the client mod_amd is available under a commercial license. This does media analysis to determine machine vs humans based on a hand full of metrics that are tunable. Contact me off list for licensing details Ken Rice krice@freeswitch.org From: Matthew Fong <mattdfong@gmail.com> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Tue, 7 Apr 2009 13:52:54 +0700 To: <freeswitch-users@lists.freeswitch.org> Subject: [Freeswitch-users] mod_vmd--can it do more than simply find VoiceMail Beeping? I'm doing some outbound dialing, and want to use mod_vmd to detect if a live person picks up or a voicemail picks up. I've read the wiki, and have been playing around with the dialplan implementation and the lua implementation, along with capturing the mod_vmd vmd::beep event. Using the examples on the wiki, I am able to call a number, sleep for 25 seconds, and mod_vmd usually detects a Beep (the answering machine beep right before you are to speak your message). My question is, is there a way to use mod_vmd to detect if an answering machine or human has picked up within the first 1-2 seconds after being answered? If so, can I get an example of how to set this up? my dialplan to test my lua implementation looks like <!-- mod_vmd test extension (new mod)--> <extension name="vmdtest"> <condition field="destination_number" expression="^1986$"> <action application="answer"/> <action application="lua" data="matt_vmd.lua"/> <action application="hangup"/> </condition> </extension> and matt_vmd.lua looks like print ("--matt_vmd.lua START--") local human_detected = false; local voicemail_detected = false; function onInput(session, type, obj) if type == "dtmf" and obj['digit'] == '1' and human_detected == false then print('MATT--I detected a HUMAN'); human_detected = true; return "break"; end if type == "event" and voicemail_detected == false then print('MATT--I detected a VOICEMAIL'); voicemail_detected = true; return "break"; end end session:setInputCallback("onInput"); session:execute("vmd"); session:sleep(25000); print ("--matt_vmd.lua FINISHED--") Thanks. --matt _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
Brian West
-
David Knell
-
Jason White
-
Ken Rice
-
Matthew Fong