First, I am completely new to asterisk, so please bear with me. I managed to install it (version Asterisk 13.1.0~dfsg-1.1ubuntu4) and my interest is at this time in running and eventually modifying ‘Hello it’s Lenny’
I found all files needed including the dialplan and am running it in on my internal network. It starts and does the first voice prompt (‘Hello it’s Lenny’) but it stops at the ‘waitforsilence call’. The relevant section of extensions.conf looks like this:
exten => 53669,n,Background(lenny/${lennyclip})
exten => 53669,n,AMD(2500,1500,800,5000,100,50,3,256)
exten => 53669,n,NoOp(${AMDCAUSE})
exten => 53669,n,GotoIf($["${AMDCAUSE:0:17}"=“INITIALSILENCE-25”]?reststop)
exten => 53669,n(mach),WaitForSilence(700,3)
This is where it stops. The only way I can make it continue by adding a timeout, as in
exten => 53669,n(mach),WaitForSilence(700,3,3)
but of course the defeats the purpose. I tried switching off the microphone to make sure it is really silent, it makes no difference, it still does not recognize the silence.
I even found the source code at http://download.vicidial.com/asterisk-patches/app_waitforsilence.c and found that the function can have a forth argument which I did not see discussed in the asterisk literature. This determines the silence threshold and it is suggested to increase the value from the default of 128 for noisy systems. So I set
exten => 53669,n(mach),WaitForSilence(700,3,256)
but the program still stops at this point, Even if I put in ridiculously high numbers like 10000 for the fourth argument, it always stops at this function.
Here is an example from the CLI (for some ridiculous value for the threshold):
-- Executing [53669@from-internal:37] BackGround("SIP/dellzoiper-00000009", "lenny/Lenny1") in new stack
-- <SIP/dellzoiper-00000009> Playing 'lenny/Lenny1.ulaw' (language 'en')
-- Executing [53669@from-internal:38] AMD("SIP/dellzoiper-00000009", "2500,1500,800,5000,100,50,3,256") in new stack
-- AMD: SIP/dellzoiper-00000009 dellzoiper (N/A) (Fmt: ulaw)
-- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256] maximumWordLength [5000]
-- AMD: Channel [SIP/dellzoiper-00000009]. ANSWERING MACHINE: voiceDuration:1500 greeting:1500
-- Executing [53669@from-internal:39] NoOp("SIP/dellzoiper-00000009", "LONGGREETING-1500-1500") in new stack
-- Executing [53669@from-internal:40] NoOp("SIP/dellzoiper-00000009", "AMD status is MACHINE") in new stack
-- Executing [53669@from-internal:41] GotoIf("SIP/dellzoiper-00000009", "0?reststop") in new stack
-- Executing [53669@from-internal:42] NoOp("SIP/dellzoiper-00000009", "Original WAITSTATUS is ") in new stack
-- Executing [53669@from-internal:43] WaitForSilence("SIP/dellzoiper-00000009", "700,1,,100000000") in new stack
-- Waiting 1 time(s) for 700 ms silence with 0 timeout
It freezes here.
Probably I am doing something stupid. Can anyone help me?
Thank you !