06-07-2006 10:39 AM - edited 03-18-2019 05:59 PM
Is there a way to delete phone voice messages programatically or by deleating rows in the data base
any help? please
06-07-2006 12:01 PM
For Unity or Connection? Makes a big difference...
for Unity the messages are stored in Exchange, not locally in SQL - you have to delete messages going directly through the mailbox using something like CDO libraries. You can check out the CDO example on the code samples page for an idea of how to go about this:
http://www.ciscounitytools.com/CodeSamples.htm
For connection you could do it through SQL stored procs.
Neither method is supported by TAC, of course - you're on your own from that perspective.
06-07-2006 01:06 PM
for exchange based unity voice mail, do the following to delete mass VMs at once:
1) login to the exchange server as an admin.
2) browse and locate the folder/directory called MBX. (short for mailbox)
this is a folder that contains all users and their VM boxes. (inbox is where all VMs are held)(MBX folder is located under the FQDN folder that represents your unity within the active directory; something like "unity.companyName.com" or the likes.
3) open the MBX folder when you find it. it may take awhile to open and display the contents depending on how many subscribers it contains.
4) find the subscriber folder via their 'alias'. (the folders are named after the alias of a subscriber)
5) in the subscribers 'alias' folder, there will be an "INBOX". it is here in the inbox that you will find all Voice Mails in .EML file format.
6) highlight the voicemails (.EML) files you want to delete and delete them. they will no longer be available for listening to by the subscriber.
you can also use this method to listen to voice mails. once in the subscribers 'alias' INBOX folder, open a .EML file with outlook or outlook express. you can then listen to the attachment which is the voice mail in .WAV format.
10-03-2006 09:00 AM
I've seen the MBX directory structure and wondered if it was safe to delete messages from users' mailboxes there. Is this procedure safe? Will it break something like MWI's or other unity related funtions? thanks! -matt
10-03-2006 10:34 AM
it is absolutely safe to delete voice mails from the MBX structure.
i do it quite frequently for maintenance reasons.
ie: a corrupt message found by the backup system. this message must be deleted so i use the MBX structure to delete.
also, i copy & move voice mails to/from the MBX structure when required.
ie: a user wants to make a broadcast. i have them dial their own voice mail and record a message. i then remove the message from the MBX structure and place it into the broadcastManager.
it is OK to move, copy, delete files from the MBX structure.
10-03-2006 01:50 PM
Hi -
Just my two cents - make sure you have good backups of your Exchange environment and a restore configuration to restore a user's mailbox or mail, if needed. And if your Exchange environment is unified messaging, i.e. voice, email, and fax in the same inbox, I would be very careful about deleting messages in this manner and know what you are doing. If you don't have this level of comfort or knowledge, you can use Cisco's provided method - Message Store Manager - http://www.ciscounitytools.com/App_MSM.htm
Ginger
10-03-2006 03:41 PM
Thanks, we solved the issue by deleting messages in user inbox, since it is a hotel application we do not need to storage all the messages from customers that allready check out the hotel.
Best Regards,
Juan Ramon Tejada
From Mexico City
10-05-2006 06:13 AM
If this is for a hotel, why don't you use the Bulk Subscriber Reset tool? http://www.ciscounitytools.com/App_BulkSubscriberReset.htm
You could also use the Message Store Manager to delete older voicemails from a day old and older. http://www.ciscounitytools.com/App_MSM.htm
10-04-2006 12:54 PM
Hi,
I tried to delete saved and new messages for users from the inbox folder, but they still can be checked from phone. It seems to be stored somewhere else. But if I tried to delete it from phone, I can see it disappear from the folder.
So is there some way to purge the voicemail right away? Also how to change the status of the voicemail, say change it to be un-read?
Many thanks,
10-04-2006 02:30 PM
We managed to delete all the messages in the inbox folder using a generic user that can delete messages from any inbox.
All the messages were deleted and could not been checked from the phone.
Here a Java Example
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.*;
import java.util.Iterator;
import java.util.List;
import javax.net.ssl.HttpsURLConnection;
import org.apache.commons.codec.binary.Base64;
/**
*
* @author jxm02697
*/
public class Delete {
/**
* Creates a new instance of Delete
*/
public Delete() {
System.setProperty("java.net.useSystemProxies","true");
System.setProperty("java.protocol.handler.pkgs", "javax.net.ssl");
//System.setProperty("https.proxyHost","161.108.212.17");
//System.setProperty("https.proxyPort","80");
}
public void delete(String path) {
BufferedReader input = null;
String line=null;
String resultado="";
Base64 encoder = new Base64();
String credentials = "jxm02697:Yamcha777";
Proxy proxy = detectProxy(path);
try {
byte[] userpwd = encoder.encode(credentials.getBytes());
StringBuffer sb= new StringBuffer("");
for(int i=0; i < userpwd.length; i++){
sb.append((char)userpwd[i]);
}
URL url = new URL(path);
//HttpURLConnection con = (HttpURLConnection)url.openConnection(proxy);
HttpsURLConnection con = (HttpsURLConnection)url.openConnection(proxy);
con.setRequestMethod("DELETE");
con.setRequestProperty( "Authorization", "Basic " + sb.toString().trim());
input = new BufferedReader( new InputStreamReader(
con.getInputStream() ) );
while ( true ) {
line= input.readLine();
if ( line == null )
break;
resultado += line;
}
System.out.println("Resultado:\n" + resultado);
}
catch (Exception e) {
e.printStackTrace();
}
}
public Proxy detectProxy(String path)
{
Proxy proxy = null;
try {
ProxySelector ps = ProxySelector.getDefault();
URI uri = null;
uri = new URI(path);
List proxyList = ps.select(uri);
if (proxyList != null && proxyList.size() > 0) {
for (Iterator iter = proxyList.iterator(); iter.hasNext(); ) {
proxy = (Proxy)iter.next();
System.out.println("Tipo Proxy : " + proxy.type());
InetSocketAddress addr = (InetSocketAddress)proxy.address();
if (addr == null) {
System.out.println("No se necesita proxy.");
}
else {
System.out.println("proxy hostname : " +
addr.getHostName());
System.out.println("proxy port : " +
addr.getPort());
break;
}
}
}
else {
System.out.println("No se encontraron proxis");
}
}catch (Exception ex) {
ex.printStackTrace();
}
return proxy;
}
public static void main (String[] args) {
Delete test = new Delete();
test.delete("https://owa.us.getronics.com/exchange/Javier.Mora/Inbox/Borrado.EML");
//test.delete("https://www.santander.com.mx/SuperNetII/comunes/main.jsp");
}
}
10-05-2006 05:44 AM
thanks,
My problem is after I deleted the mails under INBOX folder, the user still can check those voicemails. The updated news is that the next day, those voicemails disappear! I believe they were cached somewhere. Still I do not know how to change a read-mail to un-read by modifying the file properties from server.
Thanks again.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide