[asterisk-users] Answering Machine Detection
dave cantera
david.cantera at iacnet.net
Sun Dec 2 09:30:26 CST 2007
carlos,
you got further than I did... AMD didn't work at all on my release.. I
think I was using 1.4.11 at the time...
I ended up using the below
daveC
;-----------< amdtest (ext 13) starts here >--------------------
;
; restructure this for the following conditions:
; 13 using waitforsilence(variable set) then play message
; only works when there is an answering machine picking up and it doesn't
; cut off (hangup) before SILENCEDURATION ms
exten => 13,1,NoOp( Starting exten 13 AMD stuff)
exten => 13,n,Wait(1)
exten => 13,n,Set(SILENCEDURATION=4300)
exten => 13,n,Set(SILENCEOCCURANCES="")
exten => 13,n,Set(SILENCETIMEOUT=38)
exten => 13,n,NoOp( SILENCEDURATION=${SILENCEDURATION} )
exten => 13,n,NoOp( SILENCEOCCURANCES=${SILENCEOCCURANCES} )
exten => 13,n,NoOp( SILENCETIMEOUT=${SILENCETIMEOUT} )
;exten => 13,n,Answer
exten =>
13,n,WaitForSilence(${SILENCEDURATION},${SILENCEOCCURANCES},${SILENCETIMEOUT})
exten => 13,n,NoOp(Retnd WAITSTATUS=${WAITSTATUS} )
exten => 13,n,Playback(lax/lax-important-msg-from)
exten => 13,n,PlayBack(lax/to-hear-msg-press-1)
exten => 13,n,Read(CALL_ACK,beep,1,,,3)
exten => 13,n,NoOp(CALL_ACK is >${CALL_ACK}<)
exten => 13,n,GotoIf([${CALL_ACK} = ""]?nak13)
exten => 13,n(ack13),NoOp( Ack )
exten => 13,n,NoOp( log the ACK acknowlegement here calling the AGI script)
;exten => 13,n,AGI(lax/track-laxcalls.sh,${EXTEN},${CALL_ACK})
exten => 13,n,GotoIf([${CALL_ACK} = ""]?play13)
exten => 13,n(nak13),NoOp( Nak )
exten => 13,n,NoOp( log the NAK acknowlegement here calling the AGI script)
;exten => 13,n,AGI(lax/track-laxcalls.sh,${EXTEN},${CALL_ACK})
exten => 13,n(play13),Playback(lax/lax-important-msg-from)
exten => 13,n,Playback(tt-weasels)
exten => 13,n,Playback(tt-monkeysintro)
exten => 13,n,Wait(1)
exten => 13,n,Hangup
Carlos Chavez wrote:
> I am having a bit of a problem getting AMD to work on a new server. On
> my regular office server it works like a charm. I am running Asterisk
> 1.4.13, Zaptel 1.4.5.1 on both machines. Both servers run CentOS 5 and
> I am using a SIP trunk to send out calls (the same one on both servers).
>
> Here is the output of a call on my office server:
>
> -- Attempting call on Local/0445540881644 at CC2 for 2001 at CC:1 (Retry
> 1)
> -- Executing [0445540881644 at CC2:1]
> Set("Local/0445540881644 at CC2-c93c,2", "CIDTEMP="1" <5540881644>") in new
> stack
> -- Executing [0445540881644 at CC2:2]
> Dial("Local/0445540881644 at CC2-c93c,2", "SIP/protel-out/0445540881644|
> 25") in new stack
> -- Called protel-out/0445540881644
> -- SIP/protel-out-0934bb28 is making progress passing it to
> Local/0445540881644 at CC2-c93c,2
> -- SIP/protel-out-0934bb28 answered Local/0445540881644 at CC2-c93c,2
> -- Executing [2001 at CC:1] NoOp("Local/0445540881644 at CC2-c93c,1", ""1"
> <5540881644>") in new stack
> -- Executing [2001 at CC:2] AMD("Local/0445540881644 at CC2-c93c,1", "")
> in new stack
> -- AMD: Local/0445540881644 at CC2-c93c,1 5540881644 (null) (Fmt: 64)
> -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence
> [800] totalAnalysisTime [5000] minimumWordLength [100]
> betweenWordsSilence [50] maximumNumberOfWords [5] silenceThreshold
> [256]
> == Spawn extension (CC2, 0445540881644, 2) exited non-zero on
> 'Local/0445540881644 at CC2-c93c,2'
> -- Executing [h at CC2:1] DeadAGI("Local/0445540881644 at CC2-c93c,2",
> "agi://localhost/updateCallStatus.agi?callStatus=hangupcc2") in new
> stack
> -- AGI Script
> agi://localhost/updateCallStatus.agi?callStatus=hangupcc2 completed,
> returning 0
> -- AMD: Word detected. iWordsCount:1
> -- AMD: Changed state to STATE_IN_SILENCE
> -- AMD: HUMAN: silenceDuration:800 afterGreetingSilence:800
> -- Executing [2001 at CC:3] GotoIf("SIP/protel-out-0934bb28", "1?7:4")
> in new stack
> -- Goto (CC,2001,7)
> -- Executing [2001 at CC:7] AGI("SIP/protel-out-0934bb28",
> "agi://localhost/updateCallStatus.agi?callStatus=answered") in new stack
> -- AGI Script
> agi://localhost/updateCallStatus.agi?callStatus=answered completed,
> returning 0
> -- Executing [2001 at CC:8] Set("SIP/protel-out-0934bb28",
> "CALLERID(all)=") in new stack
> -- Executing [2001 at CC:9] MixMonitor("SIP/protel-out-0934bb28",
> "1192468625.7.wav|b") in new stack
> -- Executing [2001 at CC:10] Dial("SIP/protel-out-0934bb28", "SIP/2001|
> 20") in new stack
> -- Called 2001
> == Begin MixMonitor Recording SIP/protel-out-0934bb28
>
>
> And here is the output on the new server:
>
> -- Attempting call on Local/0445540881644 at CC2 for 101 at CC:1 (Retry 1)
> -- Executing [0445540881644 at CC2:1]
> Set("Local/0445540881644 at CC2-1a7e,2", "CIDTEMP="1" <5540881644>") in new
> stack
> -- Executing [0445540881644 at CC2:2]
> Dial("Local/0445540881644 at CC2-1a7e,2", "SIP/protel-out/0445540881644|
> 25") in new stack
> -- Called protel-out/0445540881644
> -- SIP/protel-out-09ce0358 is making progress passing it to
> Local/0445540881644 at CC2-1a7e,2
> -- SIP/protel-out-09ce0358 answered Local/0445540881644 at CC2-1a7e,2
> > Channel Local/0445540881644 at CC2-1a7e,1 was answered.
> -- Executing [101 at CC:1] Answer("Local/0445540881644 at CC2-1a7e,1", "")
> in new stack
> -- Executing [101 at CC:2] AMD("Local/0445540881644 at CC2-1a7e,1", "") in
> new stack
> -- AMD: Local/0445540881644 at CC2-1a7e,1 5540881644 (null) (Fmt: 64)
> -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence
> [800] totalAnalysisTime [5000] minimumWordLength [100]
> betweenWordsSilence [50] maximumNumberOfWords [5] silenceThreshold
> [256]
> == Spawn extension (CC2, 0445540881644, 2) exited non-zero on
> 'Local/0445540881644 at CC2-1a7e,2'
> -- Executing [h at CC2:1] DeadAGI("Local/0445540881644 at CC2-1a7e,2",
> "agi://localhost/updateCallStatus.agi?callStatus=hangupcc2") in new
> stack
> -- AGI Script
> agi://localhost/updateCallStatus.agi?callStatus=hangupcc2 completed,
> returning 0
> -- AMD: HANGUP
> -- Executing [h at CC:1] DeadAGI("Local/0445540881644 at CC2-1a7e,1",
> "agi://localhost/updateCallStatus.agi?callStatus=hangup") in new stack
> -- AGI Script agi://localhost/updateCallStatus.agi?callStatus=hangup
> completed, returning 0
> [Oct 15 12:19:55] NOTICE[5165]: pbx_spool.c:351 attempt_thread: Call
> completed to Local/0445540881644 at CC2
>
>
> When the call gets to AMD it just hangs there until you hangup. I
> copied amd.conf to make sure I have the same parameters on both
> machines. I simply cannot get AMD to do anything. The only way to get
> out of AMD is to hang up the call. I do not understand why it works on
> one server but not on the other.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date: 10/10/2007 05:11 PM
>
--
My wife's sister is in California.
I should buy her a Videophone2008!
Truly, The Next Best Thing to Being There!
--
WorldWideVideoPhones.com
856.380.0894
More information about the asterisk-users
mailing list