Bernard, welcome to FreeSWITCH!
Can you fix my Uverse? Lol
Brian Foster
Endigo Computer LLC
Sent from a mobile device.
Michael - I'll select syntax highlighting in my next pastebin. I replaced PlayAndGetDigits with session:streamFile and handler now kicks off for both DTMF and beep detection cases. Regarding chapter 7, the PlayAndGetDigits warning you're talking about is at page #139 of the book…Thanks for your help.BernardOn Jul 23, 2012, at 7:37 PM, Michael Collins wrote:Well posted - nicely done for a self-proclaimed n00b. For better readability you might want to try selecting syntax highlighting, kinda like http://pastebin.freeswitch.org/19580.
If I had to wager a guess as to what's going on I'd say <shameless_plug>you didn't get the FreeSWITCH 'bridge book' and read chapter 7<shameless_plug>. At first blush I'd say that your DTMFs are getting eaten by play_and_get_digits. Maybe try playback instead? And read chapter 7 - there's an example in there about reading digits w/ the input callback function.
As far as the avmd stuff goes I'm not sure at this point. If I get a sec I'll tinker with it and see if I can replicate.
-MCOn Mon, Jul 23, 2012 at 4:03 PM, BF <bfmtl@hotmail.com> wrote:
It's my very first pastebin. I hope this is what you're expecting: http://pastebin.freeswitch.org/19579On Jul 23, 2012, at 6:40 PM, Michael Collins wrote:Can you pastebin the entire script?
-MCOn Mon, Jul 23, 2012 at 3:38 PM, Bernard Fluixa <fluixab@bellsouth.net> wrote:
Hello,I can start mod_avmd and it detects voicemail beep when calling my cellphone. However, when I pickup the phone and press a key to use IVR, I would like to stop mod_avmd. I copied the input callback example from FreeSWITCH Wiki. My issue is that my input handler is never triggered, neither when I key a DTMF nor when beep is detected.1) My handler is:function onInput(s, type, obj)if (type == "dtmf") thenavmd_result = 1;if ( debug_mode > 0 ) thenprint("onInput - Human detected");endreturn "break";endif (type == "event" ) thenavmd_result = 2;if ( debug_mode > 0 ) thenprint("onInput - Voicemail detected");endavmd_result = 2;return "break";endend2) To start mod_avmd, play file and collect digits:session:setInputCallback("onInput");session:execute("avmd","start");digits = session:playAndGetDigits(…….);3) To stop mod_avmd:session:execute("avmd","stop");4) Output when keying DTMF (*3 in this case). Input handler does not kick off upon DTMF:EXECUTE sofia/external/+19543307528 avmd(start)012-07-23 18:13:28.025981 [INFO] mod_avmd.c:538 <<< AVMD v=0.073060 f=0.900987 1147.172790Hz sma=0.090099 sqa=0.081178 >>>...012-07-23 18:13:30.492866 [INFO] mod_avmd.c:538 <<< AVMD v=0.052551 f=0.764130 972.920758Hz sma=0.076413 sqa=0.058389 >>>2012-07-23 18:13:30.586854 [DEBUG] switch_rtp.c:3795 RTP RECV DTMF *:8002012-07-23 18:13:30.605660 [INFO] mod_avmd.c:538 <<< AVMD v=0.067196 f=0.864073 1100.171521Hz sma=0.086407 sqa=0.074662 >>>…2012-07-23 18:13:30.998715 [INFO] mod_avmd.c:538 <<< AVMD v=0.030803 f=0.585023 744.874518Hz sma=0.058502 sqa=0.034225 >>>2012-07-23 18:13:31.085676 [DEBUG] switch_rtp.c:3795 RTP RECV DTMF 3:640...012-07-23 18:13:36.645609 [INFO] mod_avmd.c:538 <<< AVMD v=0.030380 f=0.580996 739.747695Hz sma=0.058100 sqa=0.033756 >>>5) Output when beep is detected - Mod_avmd stops output after beep detection but input handler does not kick off2012-07-23 18:04:04.992856 [INFO] mod_avmd.c:538 <<< AVMD v=0.000048 f=0.812668 1034.721179Hz sma=0.811125 sqa=0.657971 >>>2012-07-23 18:04:04.992856 [INFO] mod_avmd.c:561 <<< AVMD - Beep Detected >>>What am I missing?Thank youBernardOn Jul 23, 2012, at 2:16 PM, Bernard Fluixa wrote:OK. I'm clear now. Thanks again._________________________________________________________________________On Jul 23, 2012, at 1:17 PM, Michael Collins wrote:Precisely.
-MC
On Mon, Jul 23, 2012 at 9:59 AM, Bernard Fluixa <fluixab@bellsouth.net> wrote:Michael,Thank you or your response. So it is my responsibility to do whatever needs to be done while mod_avmd attempts to detect a beep and to manually stop it after a beep as been detected or after a certain timeout. Correct?BernardOn Jul 23, 2012, at 11:59 AM, Michael Collins wrote:Bernard,
Keep in mind that avmd is non-blocking, that is, it won't cause your dialplan or script to pause while it is attempting to detect the beep. Your dialplan will keep doing what it normally does, and if avmd detects a beep then it will throw an event which you catch and handle in your onInput function.
-MCOn Mon, Jul 23, 2012 at 6:47 AM, BF <bfmtl@hotmail.com> wrote:Hello,
I'm trying to use it from a Lua script. My understanding is that mod_avmd detects beep from voicemail systems and is CPU intensive, please correct me if I'm wrong.
The Lua example at FreeSWITCH Wiki is
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
human_detected = true;
return "break";
end
if type == "event" and voicemail_detected == false then
voicemail_detected = true;
return "break";
end
end
session:setInputCallback("onInput");
session:execute("avmd","start");
In order to implement this example, the script must wait for the beep to be detected or not to process the case accordingly. What is no beep is detected? How can I prevent called party to hear only silence while potential beep detection is being executed?
Thank you
Bernard
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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