How to delete voicemail message thru sql

Answered Question
May 4th, 2010

Hi,


We have managed to delete the voicemail message by query the "MailboxObjectId=<>" from table "tbl_Folderitem" .



Though the message is cleared but the mwi status is still on .



Any input would be appreciated.



We are using unity connection v1.2



Regards,sp

Correct Answer by David Hailey about 6 years 9 months ago

I gotcha. So, it's not a one-off situation - it's something you want to implement for a purpose. I'll have to think on this one. It may work but I think there may be issues with the sync between CUCM and Unity in either case primarily because your plan is to access SQL directly and delete the message and/or also set the MWI flag. In theory, it may sound like a plan but in function - there are a few steps that occur and set off different processes that handle all of this stuff when a user deletes a message themselves. In other words, some of the service accounts that work in the background MAY not (not 100% positive, just thinking out loud for you) do their "job" because SQL is being accessed directly - bypassing the normal process flow. I'll give some thought and re-post if I can think of something that may be of assistance.


Hailey


Please rate helpful posts!

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
David Hailey Tue, 05/04/2010 - 06:57

Go the user's phone and dial the MWI OFF DN as defined in the Voicemail settings on CUCM.  This will quickly remove the MWI.  Or you can resync directly from that Subscriber page in Unity (MWI settings).


Hailey


Please rate helpful posts!

shingphing_2 Tue, 05/04/2010 - 07:34

Thks Hailey . I mean thru sql. we are testing for a hotel . when guest check out,we need a sql script that can remove the message and at the same time trigger off the mwi. rightfully when message is cleared uc should trigger a mwi off . we can turn off the mwi by dialling the mwi off extn this only clear the message on the phone but on uc the mwi status is still on. when we do a mwi resyn, it trigger mwi to phone which infact there is no msg in the mailbox .

Correct Answer
David Hailey Tue, 05/04/2010 - 07:42

I gotcha. So, it's not a one-off situation - it's something you want to implement for a purpose. I'll have to think on this one. It may work but I think there may be issues with the sync between CUCM and Unity in either case primarily because your plan is to access SQL directly and delete the message and/or also set the MWI flag. In theory, it may sound like a plan but in function - there are a few steps that occur and set off different processes that handle all of this stuff when a user deletes a message themselves. In other words, some of the service accounts that work in the background MAY not (not 100% positive, just thinking out loud for you) do their "job" because SQL is being accessed directly - bypassing the normal process flow. I'll give some thought and re-post if I can think of something that may be of assistance.


Hailey


Please rate helpful posts!

Actions

This Discussion