Jump to content

Moving Voicemails on the system


Recommended Posts

Posted

Hello,

 

I have a script that runs every 15 minutes, checks the /pbx/messages dir, and if it sees a new file, updates my sql database with info on it. It then moves the file from /pbx/messages/[id].xml to my own dir, and moves the corresponding recording from the /pbx/recordings dir.

 

As far as I know this is all I need to do, but the voicemail box still thinks there are 100 messages (I have max set to 100).

 

How can I clear the voicemail box or make it show 0/100 after I move the voicemails?

 

Ryan

Posted

For that you would have to use SOAP to talk to the internal database. This will be some "investment" (work) to get this working. We used to have some PHP scripts on the old wiki (now kiwi), not sure if you want to go this avenue.

 

The alternative is to have the PBX send the voicemail out by email and then process them automatically. That might be easier to set up.

Posted

How about this.

 

Inside /pbx/extensions/[ext id].xml, there is a field:

 

<vm_indicator>1/0 (0/0)</vm_indicator>

 

I notice on my full mailbox, it said "100/0 (0/7)". Now, after recreating the account, I have 1 voicemail, it shows "1/0 (0,0)".

 

Could I simply change the "<vm_indicator>1/0 (0/0)</vm_indicator>" to "<vm_indicator>0/0 (0/0)</vm_indicator>" each time my script runs? Is this the only instance that needs to change?

Posted

The problem is that the PBX reads the XML files only during bootup and then after that does not care if someone changes these files. Notifications cannot be done through the file system in the PBX (it would be crazy expensive if the PBX has to always check if the file has changed). Notifications can be sent in general through SOAP, and the PBX has a interface that makes it possible to perform changes in the internal database. Those changes BTW would then be comitted to the file system right away. There is a documentation available on this subject at http://kiwi.pbxnsip.com/index.php/Access_to_the_Database if you consider going this avenue.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...