Add number called to my emails from voicemail

I am using FreePBX 13 with Asterisk 11.

I am trying to make a generic answering mailbox for different clients in case their internet connection goes down at their site. This would force the numbers to fail over to my generic system, and take calls from any number. I would like to add the number called to my e-mails with the voicemail attachments, so I can properly forward the voicemail to the correct client.

I do not want to set-up a separate voicemail box for each client, as this is something that should only be used as a back-up, and there are a lot of different clients.

Is there a variable to add this to the Email Subject or Email Body?

Annoyingly, Comedian Mail does not give you access to the Asterisk Channel variables, only certain special voicemail variables:

; Change the from, body and/or subject, variables:
;     VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM,
;     VM_CIDNAME, VM_DATE
; Additionally, on forwarded messages, you have the variables:
;     ORIG_VM_CALLERID, ORIG_VM_CIDNUM, ORIG_VM_CIDNAME, ORIG_VM_DATE
; You can select between two variables by using dialplan functions, e.g.
;     ${IF(${ISNULL(${ORIG_VM_DATE})}?${VM_DATE}:${ORIG_VM_DATE})}

source:

Is there possibly an easy way of identifying a call would come in from then in the voicemail email?

A workaround might be that if you were not using the caller ID name, before the call goes to voicemail, you could change CID name to the desired number.

I haven’t tried this, but it might work.

The issue with this is we need to be able to send the callers ID as well to the clients so they can call them back. Could I change one of the other variables to do this, such as the CIDNAME maybe?

How much programming experience and control over the system do you have?

If you are processing this “post call”, you could get most of the information from the CDR/CEL database. It might take a little dredging around in the table to find your information, but it should be possible to cross-link the voicemail to the CDR record to get the information from the original call.

That is what I just asked you. Why not use the CIDName to store the other phone number if that is not critical to your workflow?

Apologies. I did not see the name part when reading the first time. This would potentially work.

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