asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
1.97k stars 924 forks source link

app_voicemail_odbc: Allow audio to be kept on disk #712

Open gtjoseph opened 4 weeks ago

gtjoseph commented 4 weeks ago

This commit adds a new voicemail.conf option 'odbc_audio_on_disk' which when set causes the ODBC variant of app_voicemail to leave the message and greeting audio files on disk and only store the message metadata in the database. This option came from a concern that the database could grow to large and cause remote access and/or replication to become slow. In a clustering situation with this option, all asterisk instances would share the same database for the metadata and either use a shared filesystem or other filesystem replication service much more suitable for synchronizing files.

The changes to app_voicemail to implement this feature were actually quite small but due to the complexity of the module, the actual source code changes were greater. They fall into the following categories:

UserNote: This commit adds a new voicemail.conf option 'odbc_audio_on_disk' which when set causes the ODBC variant of app_voicemail_odbc to leave the message and greeting audio files on disk and only store the message metadata in the database. Much more information can be found in the voicemail.conf.sample file.

gtjoseph commented 4 weeks ago

cherry-pick-to: 21

gtjoseph commented 4 weeks ago

Branches 18 and 20 need a slightly tweaked version of this patch because they still have the macrocontext field. When this PR is approved, I'll submit the PR for 18 and 20.

gtjoseph commented 4 weeks ago

Oh, one thing to note... the PR mentions app_voicemail_odbc but you'll see the diff is for app_voicemail.c. Remember, app_voicemail_odbc.c is just a symlink to app_voicemail.c.