Playback Sound if peer down

Hello, I’m trying to create a context that plays back a file to the caller if the peer does not respond. Caller calls through Asterisk, Asterisk invites out, but the upstream peer is dead, no response at all. I want to play a sound file if this happens, I’d like the file to play twice and then hangup. The method below is not working. I’m looking for some guidance, thanks.

[to_failtest]
exten => _+1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@fake_host)
exten => _+1NXXNXXXXXX,2,Playback(network_outage)
exten => _+1NXXNXXXXXX,3,Playback(network_outage)
exten => _+1NXXNXXXXXX,4,Hangup

Figured it out…need a timeout value:

exten => _+1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@fake_host, 2)

What you actually need to do is to use qualify. That way you won’t have to wait for the request to timeout, which it probably would if you had waited long enough.

I’m a bit surprised, though, that a bogus domain name needed an explicit time out.