Distinguishing between human and VM pickups

I have a situation in my dialplan where I wish to broadcast emergency alerts to customers (snow day alerts, schedule changes, etc). Because these are potentially critical alerts, I would like to not only play the alert sound file to person picking the phone up, but I’d also like to play it to their VM as well.

So the current test piece to do this looks like:

  exten => s, n, Originate(${call_target},app,Playback,${DIR_SOUNDS}/alerts/${filename})

This works fine if the person picks up the phone, however if their voicemail “picks up” the Playback application is never launched. I’ve been told by others that both a person picking up manually and their VM handling it are “pick ups” but clearly Originate begs to differ.

How can Originate playback to a VM handler on the remote end?

You have been told correctly. There is nothing that would tell Originate that this was VM.

The most likely possibility is that you are not allowing time for the greeting message to play out. You probably need some silence detection.

What method of silence detection would you recommend? Is there some way I could embed it into the Playback argument of the Originate call I do:

exten => s, n, Originate(${call_target},app,Playback,${DIR_SOUNDS}/alerts/${filename})


There is a silence detection application; I have no idea how good it is.

You will need to use the context/extension/priority format for Originate.

David thanks, this is the route I am going. My problem now is that variable inheritiability fails (Originate spawns a new channel instead of bridging), so I need to use Set(SHARED… . But how can I share with the newly spawned channel when the Originate command does not set a variable to expose what channel it is to me?

Previously I was invoking the Playback application in the Originate call (filename was set as __filename with complete inheritability):

  exten => s, n, Originate(${target_resolved},app,Playback,${DIR_SOUNDS}/alerts/${filename}

This worked fine because ${filename} was a channel variable of the channel calling Originate. As per your recommendation, I’ve switched to the context/exten/priority format of Originate:

  exten => s, n, Originate(${target_resolved},exten,call-playback,s)

And here’s a test snipped in the call-playback context:

  exten => s, n, NoOp(filename *${filename}*)

As mentioned, filename is blank. I’d need to use SHARED:

  exten => s, n, Originate(${target_resolved},exten,call-playback,s)
  exten => s, n, Set(SHARED(file,${WHAT_CHANNEL_IS_THIS})=${filename})

But HOW do I get the channel resulting from the Originate?? Thanks.

Use the file name as the extension “number”.