Page 1 of 1

AMD Does not seem to work

PostPosted: Thu Mar 01, 2007 4:43 pm
by ckwall
I am confused as to how to make AMD work. I installed the amd files as described in the SCRATCH_INSTALL file to asterisk. How do I actually enable it? When dialing, I still get connected to voicemail.

PostPosted: Fri Mar 02, 2007 6:47 am
by aster1
Set the Campaign VDAD exten: in ur campaign to 8369 .. default is 8365 and it doesnt do amd .. 8369 does if you have properly followed scratch_install and set dialplan .

PostPosted: Fri Mar 02, 2007 3:29 pm
by ckwall
awesome... I will try it. thank you.

PostPosted: Fri Mar 02, 2007 3:44 pm
by ckwall
did not work :-(

PostPosted: Fri Mar 02, 2007 10:32 pm
by Op3r
please be reminded that 100% answering machine detection is impossible. Even Avaya cant do it (saw it in action).

what do you see in your asterisk cli when you dial?

for the full amd instruction. I suggest you get the managers manual. it got a comprehensive howto on AMD

PostPosted: Sat Mar 03, 2007 7:47 am
by aster1
have u put amd.conf in /etc/asterisk

here's mine


[AnsweringMachineDetector]
initial_silence = 2500
greeting = 1500
after_greeting_silence = 300
total_analysis_time = 5000
min_word_length = 120
between_words_silence = 50
maximum_number_of_words = 5
silence_threshold = 256



and dialplan for 8569 as per scratch install

exten => 8369,1,AGI(agi://127.0.0.1:4577/call_log)
exten => 8369,2,AMD(3500|1500|300|5000|120|50|5|256)
exten => 8369,3,AGI(VD_amd.agi,${EXTEN})
exten => 8369,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8369,5,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8369,6,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8369,7,Hangup



i think it detects answering machines around 80 - 85 % ..

PostPosted: Mon Mar 05, 2007 9:06 am
by ckwall
yes, it is in there... here is what I have.


; initial_silence: Maximum silence duration before the greeting. If exceeded then MACHINE.
; greeting: Maximum length of a greeting. If exceeded then MACHINE.
; after_greeting_silence: Silence after detecting a greeting. If exceeded then HUMAN
; total_analysis_time: Maximum time allowed for the algorithm to decide on a HUMAN or PERSON
; min_word_length: Minimum duration of Voice to considered as a word
; between_words_silence: Minimum duration of silence after a word to considere the audio what follows as a $
; maximum_number_of_words: Maximum number of words in the greeting. If exceeded then MACHINE


[AnsweringMachineDetector]
initial_silence = 3500
greeting = 1500
after_greeting_silence = 300
total_analysis_time = 5000
min_word_length = 120
between_words_silence = 50
maximum_number_of_words = 5
silence_threshold = 256

PostPosted: Mon Mar 05, 2007 9:08 am
by ckwall
here is the extension:
; VICIDIAL_auto_dialer transfer script AMD with Load Balanced:
exten => 8369,1,AGI(call_log.agi,${EXTEN})
exten => 8369,2,AMD(3500|1500|300|5000|120|50|5|256)
exten => 8369,3,AGI(VD_amd.agi,${EXTEN})
exten => 8369,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8369,5,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8369,6,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8369,7,Hangup

PostPosted: Mon Mar 05, 2007 2:08 pm
by aster1
put vdad extension as 8369 in campaign it will work for sure . It wont detect all ur answering machines .. also see asterisk -vvvvr output for AMD messages like below

-- Executing AMD("IAX2/xxxxx-2", "2500|1500|300|5000|120|50|5|256") in new stack
-- AMD: IAX2/xxxxxxx (null) (Fmt: 64)
-- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [300] totalAnalysisTime [5000] minimumWordLength [120] betweenWordsSilence [50] maximumNumberOfWords [5] silenceThreshold [256]
-- AGI Script agi://127.0.0.1:4577/VD_hangup--HVcause ... --10-----0) completed, returning 0
-- AMD: Word detected. iWordsCount:1
-- AMD: Changed state to STATE_IN_SILENCE
-- AMD: Word detected. iWordsCount:2
-- AMD: Changed state to STATE_IN_SILENCE
-- AMD: HUMAN: silenceDuration:300 afterGreetingSilence:300


and when it detects answering machine it shows answering machine in place of HUMAN

PostPosted: Mon Mar 05, 2007 5:51 pm
by ckwall
so will amd cause a delay when puting a live body to an agent? I mean, if it hears someone answer the phone, does it have to listen to it for a second before giving the call to a logged in agent? will the agent hear the person answer the phone and say hello?

PostPosted: Fri Mar 16, 2007 4:50 pm
by jsmith
I'm also having problems with getting AMD to work. I'm *assuming* I've done all the correct steps:

    Compile app_amd.so
    Make sure I have an amd.conf config file
    Make sure I have an extension 8369
    Change the campaign to use 8369 as the VDAD exten


When the dialer dials the phone number, it's always connected to the agent, with silence or long talking or any other conditions I throw at it.

So, in continuing to debug, I figured I'd throw a couple of extra calls to Verbose() in extension 8369. I found that extension 8369 must not be getting called, as my Verbose() messages aren't being printed to the CLI.

Next, I tried adding a Verbose() message to extension 8365. It's not printing to the CLI either...

I'm stuck. And I'm out of ideas. Does anyone know what I'm doing wrong?

-Jared "still trying to find his way through all this" Smith

PostPosted: Fri Mar 16, 2007 8:38 pm
by mflorell
turn on agi logging to FILE or BOTH as well as server logging and post output of your agiout log file and Asterisk CLI when this happens.

PostPosted: Mon Mar 19, 2007 2:32 pm
by jsmith
mflorell wrote:turn on agi logging to FILE or BOTH...


Are you referring to some type of agi logging in Vicidial, or just "agi debug" from the Asterisk CLI?

mflorell wrote: ... as well as server logging ...


Sorry, I'm still clueless. Where do I turn this on?

mflorell wrote: ... and post output of your agiout log file and Asterisk CLI when this happens.


For some reason, an agiout log file hasn't been created on this box in 6 days. I've pasted the dialplan output below, but it's not very helpful:

mushroom*CLI> ^M^M == Parsing '/etc/asterisk/manager.conf': Found
mushroom*CLI> ^M == Manager 'sendcron' logged on from 127.0.0.1
mushroom*CLI> ^M -- Executing MeetMe("Local/8600051@internal-71fe,2"
, "8600051") in new stack
mushroom*CLI> ^M > Channel Local/8600051@internal-71fe,1 was answ
ered.
mushroom*CLI> ^M -- Executing Verbose("Local/8600051@internal-71fe,1
", "2|Dialing LD number 15402862227") in new stack
mushroom*CLI> ^M == Dialing LD number 15402862227
mushroom*CLI> ^M -- Executing AGI("Local/8600051@internal-71fe,1", "
agi://127.0.0.1:4577/call_log") in new stack
mushroom*CLI> ^M -- AGI Script agi://127.0.0.1:4577/call_log complet
ed, returning 0
mushroom*CLI> ^M -- Executing Dial("Local/8600051@internal-71fe,1",
"Zap/g3/15402862227||oT") in new stack
mushroom*CLI> ^M -- Called g3/15402862227
mushroom*CLI> ^M -- Zap/2-1 answered Local/8600051@internal-71fe,1
mushroom*CLI> ^M -- Hungup 'Zap/2-1'
mushroom*CLI> ^M == Spawn extension (internal, 815402862227, 3) exited non-zero on 'Local/8600051@internal-71fe,1'
mushroom*CLI> ^M == Spawn extension (internal, 8600051, 1) exited non-zero on 'Local/8600051@internal-71fe,2'

PostPosted: Mon Mar 19, 2007 4:25 pm
by mflorell
in admin.php, go to Phones(or admin->servers in 2.0.3) and check your server's settings.

PostPosted: Tue Mar 20, 2007 4:12 pm
by jsmith
mflorell wrote:in admin.php, go to Phones(or admin->servers in 2.0.3) and check your server's settings.


I've done that. I set AGI debugging to BOTH, and turned on all the debugging I could see in there. I even tried setting the Vicidial AD extension from 8365 to 8369 on that page, but it still didn't change anything.

I still didn't get an "agiout" log file, and I didn't see anything useful in the FASTagiout file. The Asterisk console still doesn't show either extension 8365 or 8369 being called.

Any other ideas?

-Jared

PostPosted: Tue Mar 20, 2007 4:19 pm
by mflorell
In your /etc/astguiclient.conf file what is the PATHlogs set to?

the agiout file should be name something like "agiout.2007-03-20":
/var/log/astguiclient/agiout.2007-03-20

Changing the AGI output type to BOTH should have started logging to that file instantly.