Add inbound DID to voicemail email

Hello everyone.

We have a lot of inbound DID’s that after hours go to voicemail which gets sent to an email distribution list for whoever is on call to deal with. The problem is everyone has to listen to the message even though its not for them. Is the inbound DID/Route stored in a variable anywhere when the voicemail sendmail script gets spawned? I’ve looked into it, and found the list of VoiceMail channel vars at https://wiki.asterisk.org/wiki/display/AST/VoiceMail+Channel+Variables, but none of them apply to the inbound route. I’ve even tried stuffing ‘declare -p >> /tmp/vmail.vars’ into sendmail scripts trying to trap it, but it looks like it never gets sent. Has anyone come across this before?

I’m running 13.26.0

No because DIDs have nothing to do with voicemails. If you want people to get specific voicemails only and no one else will get them, then you need to use multiple voicemail accounts. One for each group (or person) that should get that voicemail.

I understand the difference between the modules and how and why they differ. I’m surprised that since they’re both called from the same source, you can’t go back through the stack and find the path the call came from.

I guess I’m writing a post-processor thats going to look up the call based on the called id fields that get passed. I would prefer it based on the ‘uniqueid’ field that gets stored in the cdrdb, or some other way that would be more reliable.

IIRC, there’s a macro/function that dumps all of the variables you have available. Danged if I can remember what it is, but I’m pretty there’s one in here somewhere.

My point in all this was that the incoming DID is irrelevant to the Voicemail App. The voicemail app doesn’t have a channel variable that it can use for the incoming DID in the notifications.

I’m not even sure if executing the cmd options will work as there will be no way to pass variables into it.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.