[Freeswitch-users] Moving Voicemails

Michael Jerris mike at jerris.com
Mon Nov 17 21:56:35 MSK 2014


This does seem kind of clumsy... I'd be happy to accept a patch for mod_voicemail change domain that moves files and updates db correctly if anyone wants to give it a try.

> On Nov 17, 2014, at 1:44 PM, John <freeswitch at earthspike.net> wrote:
> 
> I've done this and for exactly the same reason. I moved the files to the domain-named path and updated the database using sqlite3. I found this in my command history, but you should test first on a copy of the db. It's for upgrading from 1.2.quite_old to 1.4.quite_recent.
> 
> $ sqlite3 voicemail_default.db 
> sqlite> update voicemail_msgs set file_path='/var/lib' || substr(replace(file_path,'172.16.12.34','pbx.somewhere.net <http://pbx.somewhere.net/>'),11);
> sqlite> update voicemail_msgs set file_path=replace(file_path,'172.16.12.34','pbx.somewhere.net <http://pbx.somewhere.net/>');
> sqlite> update voicemail_prefs set greeting_path='/var/lib' || substr(replace(greeting_path,'172.16.12.34','pbx.somewhere.net <http://pbx.somewhere.net/>'),11);
> 
> I cannot remember what the '11' was for; I've changed the IP address and FQDN so you might need to tune this value; check with SELECTs in place of the UPDATEs.
> 
> John
> 
> On 17/11/14 18:08, Ken Rice wrote:
>> You got it sqlite3 is the way to go... I doubt doing what you are trying is heavily documented tho as its not something normally done.
>> 
>> But all metadata for voicemail is in the sqlite db and that includes file paths etc
>> 
>> 
>> On 11/17/14 10:07 AM, "Joel White" <joelewhite at gmail.com <x-msg://54/joelewhite@gmail.com>> wrote:
>> 
>> What is the easiest way to make this change?
>> 
>> SQLite3 via command line?  Or is there another way to manipulate the database?
>> 
>> On Mon, Nov 17, 2014 at 7:22 AM, Avi Marcus <avi at avimarcus.net <x-msg://54/avi@avimarcus.net>> wrote:
>> The path isn't dynamically generated based on the domain, it's stored per-file in the database.
>> You can update the db or symlink the folders so they are available in the old structure too.
>> -Avi
>> 
>> On Mon, Nov 17, 2014 at 10:35 AM, Joel White <joelewhite at gmail.com <x-msg://54/joelewhite@gmail.com>> wrote:
>> I initially configured my FreeSWITCH with an IP address, but now for scalability and high availability I am changing to a domain name.  I successfully changed the system over, but was wondering how do I move the voicemails to the new domain folder under voicemail?
>> 
>> The obvious answer is to move the files, I already did that and restarted the system.  The existing voicemails and greetings are not visible to FreeSWITCH when I call voicemail.
>> 
>> How do I transfer them over?  
>> 
>> Thank you in advance for any light you may shed on this predicament   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141117/a9d22007/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list