Table of Contents
API : PBX : Voicemail to e-mail Update
Introduction
A voicemail to e-mail item is a shared answering machine in the dialplan. The caller hears the item's startAudio (if set) followed by a beep, and leaves a message of up to 5 minutes - # or 10 seconds of silence ends it. When the message has been left, the call ends. The message is e-mailed to the item's emails with the message attached as MP3. A message of 1 second or less is not sent.
Nothing is kept: no voicemail is stored, and the message is deleted as soon as the e-mail has been sent. So the e-mail is the only copy of the message. Use it where messages shall go to a shared mailbox, without creating an employee and an extension to own a voicemail box.
With transcribe the message can also be transcribed (TRANSCRIBE), or transcribed and summarized by AI (TRANSCRIBE_AND_SUMMARIZE). The e-mail then holds the transcription and the AI summary with calendar events (also attached as .ics files) and a warning when the content is confidential or sensitive. This is paid from the customer's AI allowance. When the allowance is used up, or the transcription fails, the e-mail is sent anyway - without the transcription or summary, and saying why. The e-mail and the summary are written in English when the PBX default language is English, otherwise in Danish. The e-mail is the message template voicemailToEmail, see Message templates.
An item without e-mail addresses - e.g. one just created in the visual dialplan editor - rejects calls until an address is set.
Request
This request will update a voicemail to e-mail item. Only the properties that need to be updated shall be included. emails replaces the whole list of addresses.
| URL | https://api.telecomx.dk/pbx/voicemailtoemail/VOICEMAIL_TO_EMAIL_ID | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. RESELLER_ADMIN. ADMIN. |
||
| Params | VOICEMAIL_TO_EMAIL_ID | Id | Id of item to update. |
| Body | name | String | Name/description of the voicemail to e-mail item. Used as the sender name and in the subject of the e-mail. |
| number | String | The phone number to dial to reach this voicemail to e-mail item locally, null if it is not dial-able. | |
| startAudio | Id | A PBX audio item to playback before the beep. Null for just the beep. | |
| redirect | String | Number to redirect to when execution starts. Used to quickly circumvent the voicemail to e-mail item. | |
| notes | String | Notes about the voicemail to e-mail item. | |
| emails | Array | E-mail addresses (strings) the messages are sent to, at most 10. Trimmed, lower-cased and without duplicates when saved. | |
| transcribe | String | What the e-mail holds besides the message: DISABLED - only the message (default). TRANSCRIBE - also a transcription. TRANSCRIBE_AND_SUMMARIZE - also a transcription and an AI summary. Paid from the customer's AI allowance. | |
| x | Number | X position in visual dialplan. | |
| y | Number | Y position in visual dialplan. | |
Request body example
{ emails: [ 'kundeservice@firma.dk' ], transcribe: 'TRANSCRIBE' }
Response
| JSON object | ||
|---|---|---|
| Property | Type | Description |
| _id | Id | Unique id of the voicemail to e-mail item. |
| type | String | Always 'VOICEMAIL_TO_EMAIL'. |
| customer | Id | Id of the customer the voicemail to e-mail item belongs to. |
| name | String | Name/description of the voicemail to e-mail item. Used as the sender name and in the subject of the e-mail. |
| number | String | The phone number to dial to reach this voicemail to e-mail item locally, null if it is not dial-able. |
| startAudio | Id | A PBX audio item to playback before the beep. Null for just the beep. |
| startAudioUrl | String | Signed download URL of the audio (MP3), when the user may download it - see Signed file URLs. |
| redirect | String | Number to redirect to when execution starts. Used to quickly circumvent the voicemail to e-mail item. |
| notes | String | Notes about the voicemail to e-mail item. |
| emails | Array | E-mail addresses (strings) the messages are sent to, at most 10. Trimmed, lower-cased and without duplicates when saved. Empty until configured. |
| transcribe | String | What the e-mail holds besides the message: DISABLED - only the message (default). TRANSCRIBE - also a transcription. TRANSCRIBE_AND_SUMMARIZE - also a transcription and an AI summary. Paid from the customer's AI allowance. |
| x | Number | X position in visual dialplan. |
| y | Number | Y position in visual dialplan. |
Example
{ _id: '12345678901234567890FEED', type: 'VOICEMAIL_TO_EMAIL', customer: '12345678901234567890ABCD', name: 'Kundeservice', number: '8890', startAudio: '12345678901234567890AAAA', redirect: '', notes: '', emails: [ 'kundeservice@firma.dk' ], transcribe: 'TRANSCRIBE', x: 123, y: 456 }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | not_found | Voicemail to e-mail item not found |
| 404 | customer | Customer not found or not active |
| 422 | name | Name must be 1-64 characters |
| 409 | number | Number is in use by another dialplan item |
| 422 | number | Number is invalid, only 0-9 is allowed and no public service numbers |
| 422 | redirect | Redirect number is invalid, only + 0-9, # and * is allowed |
| 404 | redirect | Redirect number is local but does not point to an existing dialplan item |
| 404 | startAudio | Audio file not found |
| 422 | emails[N] | E-mail address is invalid (N is the index of the address, from 0) |
| 422 | emails | At most 10 e-mail addresses |
| 422 | transcribe | Must be DISABLED, TRANSCRIBE or TRANSCRIBE_AND_SUMMARIZE |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
