<br />[macro-amd-check]<br />include => macro-amd-check-custom;<br />exten => s,1,NoOp(AMDCHECK);<br />same => n,Set(VALUE=${ARG1});<br />same => n,GotoIf($[ "${VALUE}" = "1" ]?amd);<br />same => n,GotoIf($[ "${VALUE}" = "2" ]?amd);<br />same => n,MacroExit();<br /><br />same => n(amd),NoOp(AMD 11.0 AMBOS);<br />same => n,Answer();<br />same => n,Set(ANO=${STRFTIME(${EPOCH},,%Y)});<br />same => n,Set(MES=${STRFTIME(${EPOCH},,%m)});<br />same => n,Set(DIA=${STRFTIME(${EPOCH},,%d)});<br />same => n,Set(DATAHORA=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)});<br />same => n,Set(NOMEAUDIO=/var/www/html/testeamd/${ANO}/${MES}/${DIA}/AMD-${NUMAMD}-${DATAHORA}-UID${UNIQUEID}.wav);<br />;same => n,MixMonitor(${NOMEAUDIO});<br />same => n,Set(VOLUME(TX)=-2);<br />same => n,Set(VOLUME(RX)=-2);<br />same => n,AMD(2090,1500,800,2900,120,60,3,185)<br />same => n,Set(AMD_CAUSE= ${CUT(AMDCAUSE,-,1)})<br />same => n,NoOp(${AMD_CAUSE})<br />same => n,GotoIf($[${AMD_CAUSE}=INITIALSILENCE]?silencio);<br /><br />same => n,GotoIf($[${AMDSTATUS}=HUMAN]?valida);<br />same => n,GotoIf($[${AMDSTATUS}=MACHINE]?maquina);<br />same => n,GotoIf($[${AMDSTATUS}=NOTSURE]?valida);<br /><br />same => n(silencio),NoOp(Silencio no ${NUMAMD});<br />same => n,Background(/var/www/html/wscall/audio/alo_aline_1511178704);<br />same => n,AMD(2090,1500,800,3100,120,60,3,185)<br />same => n,Set(AMD_CAUSE1= ${CUT(AMDCAUSE,-,1)})<br />same => n,NoOp(${AMD_CAUSE1})<br /><br />same => n,GotoIf($[${AMDSTATUS}=HUMAN]?valida);<br />same => n,GotoIf($[${AMDSTATUS}=MACHINE]?maquina);<br />same => n,GotoIf($[${AMDSTATUS}=NOTSURE]?maquina);<br /><br />same => n(valida),NoOp(Validando no ${NUMAMD});<br />same => n,Background(/var/www/html/wscall/audio/esta_me_ouvindo_1511178758);<br />same => n,WaitForSilence(2000,1,3);<br />same => n,NoOp(WAITSTATUS SECUNDARIO: ${WAITSTATUS});<br />same => n,GotoIf($[ "${WAITSTATUS}" = "SILENCE" ]?maquina:humano)<br />same => n,MacroExit();<br /><br />same => n(humano),Verbose(ATENDIMENTO HUMANO DETECTADO no ${NUMAMD});<br />same => n,Background(/var/www/html/wscall/audio/um_minuto_1511178795);<br />same => n,Set(VOLUME(TX)=2);<br />same => n,Set(VOLUME(RX)=2);<br />;same => n,StopMixMonitor();<br />same => n,MacroExit();<br /><br />same => n(maquina),Verbose(ATENDIMENTO MAQUINA DETECTADO no ${NUMAMD});<br />same => n,Set(VAR1=${CUT(IDCALL,|,1)});<br />same => n,Set(VAR2=${CUT(IDCALL,|,2)});<br />same => n,Agi(scripts/finalizaanswermachine.agi,${VAR1},${VAR2});<br />;same => n,StopMixMonitor();<br />same => n,Hangup(300);<br />same => n,MacroExit();<br /><br />#include extensions_inc_rota_custom.conf