BackgroundDetect config for people and machines

I am trying to leave an automated message either when a person picks up or the anwering machine beeps to record the message. I don’t need to know precisely if human or machine picked up, just play full message.

Background detect seems to work fine for person answering but difficult with answering machine. If I set backgrounddetect for ( 1000|50|2500), works fine for person, but seems the answering machine detects silence and hangs up prematurely. Setting backgrounddetect to ( 500|502500) seems to detect pause between rings and starts leaving message during the ringing.

[broadcast]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,BackgroundDetect(custom/silencefor30sec|500|50|2500)
exten => s,4,NoOp(Background detect failed, play message anyway)
exten => s,5,Goto(talk,1)

exten => talk,1,Playback(custom/broadcast)

Any thoughts on background detect settings with this in mind? I don’t think I need machinedetect or amd as I only want a completed message.

Thanks,
David