Mike,
I did some code for an internal call notification IVR using a Macro call out and seemed to be able to do AMD. Would this work? This code was actually for asterisk 1.4 so the AMD result code are a bit different. The issue I was running into was returning the status of the call to the Web GUI some how so the agent knew what happened with the call.
(Carrier Definition)
exten => _91NXXNXXXXXX,1,AGI(
agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Set(obdc_dialinfo=sip/nycamtlsonus/890011${EXTEN:2})
exten => _91NXXNXXXXXX,n,Set(obdc_uniqueid=${UNIQUEID})
exten => _91NXXNXXXXXX,n,Goto(obdc_private,dial_number,1)
exten => _91NXXNXXXXXX,n,Hangup
(extensions.conf)
[macro-obdc_dial_private]
exten => s,1,UserEvent(${CONTEXT},${ARG1},${UNIQUEID},${CHANNEL},${ARG2},PREAMD )
exten => s,n,Set(MACRO_RESULT=CONTINUE)
exten => s,n,AMD()
exten => s,n,UserEvent(${CONTEXT},${ARG1},${UNIQUEID},${CHANNEL},${ARG2},POSTAMD-${AMDSTATUS},${AMDSTATUS} )
exten => s,n,ExecIf($["${AMDSTATUS}" = "MACHINE"],set,MACRO_RESULT=ABORT) ; Terminate the call
exten => s,n,ExecIf($["${AMDSTATUS}" = "NOTSURE"],set,MACRO_RESULT=ABORT) ; Terminate the call
exten => s,n,ExecIf($["${AMDSTATUS}" = "HANGUP"] ,set,MACRO_RESULT=ABORT) ; Terminate the call
exten => s,n,ExecIf($["${AMDSTATUS}" = "HUMAN"] ,set,MACRO_RESULT=) ; Bridge the call
; Out Bound Dial Context
[obdc_private]
exten => dial_number,1,UserEvent(${CONTEXT},${obdc_uniqueid},${UNIQUEID},${CHANNEL},${obdc_dialinfo},PREDIAL )
exten => dial_number,n,Dial(${obdc_dialinfo},${obdc_dialtimeout},gM(obdc_dial_private^${obdc_uniqueid}^${obdc_dialinfo}))
; DIALSTATUS - CHANUNAVAIL CONGESTION NOANSWER BUSY ANSWER CANCEL DONTCALL TORTURE INVALIDARGS
exten => dial_number,n,Noop(MACRO_RESULTS:(${MACRO_RESULT}) )
exten => dial_number,n,UserEvent(${CONTEXT},${obdc_uniqueid},${UNIQUEID},${CHANNEL},${obdc_dialinfo},POSTDIAL )
exten => dial_number,n,Hangup()
exten => h,1,Noop(Got Handup Event)
exten => h,n,UserEvent(${CONTEXT},${obdc_uniqueid},${UNIQUEID},${CHANNEL},${obdc_dialinfo},HANGUP )
exten => t,1,Noop(Got Timeout Event)