<div dir="ltr"><div><div><div><div><div>To do it without using an external database, you could create a shell script to do it that you would execute with a system call.  You could get a list of everything with: <br><br></div>
asterisk -rx "database show" <br><br></div>From there, you could grep the results for the value you are looking for, use awk or even cut to get the family and key names, then for each match, run:<br><br></div>asterisk -rx "database del <family> <key>"<br>
<br></div>It's a dirty way of doing it, but it would work.  When I used the Asterisk DB for something, I was able to change my dialplan around to make things unique for each call so I could run a "DBDeltree" after the call was complete.  That being said, you definitely get a lot more control with an external database and it's easy to make the calls within your dialplan.  It really depends on how big of a system you're setting up and how often you would need to run these commands to determine if it's worth the added trouble of installing / configuring / maintaining something like MySQL.  For me, I've used MySQL very heavily in the past, and only recently have I created something that uses the Asterisk database (after using Asterisk for 6 years).  Even then it was more of a challenge to myself to see if I could make it work, but for what I'm doing it really is probably the best option (especially since it's on a pre-existing Asterisk install that was not configured with ODBC support).  <br>
<br></div>-Josh<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 21, 2014 at 10:27 AM, Jonathan White <span dir="ltr"><<a href="mailto:jw@uvacity.com" target="_blank">jw@uvacity.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:'Calibri'">
<div>I’m trying to use the asterisk database but I think there is a limitation 
in deleting records I need to make my logic work.</div>
<div> </div>
<div>I understand that I can delete all family members with a specific key</div>
<div>and that I can delete an entire family of keys</div>
<div> </div>
<div>but I would like to be able to delete specific keys which have the same 
value, is this possible?</div>
<div> </div>
<div>I have tried moving things around so making the family the value I am 
interested in but the way the call flow works I don’t get that information at 
the correct point when I need it.</div>
<div> </div>
<div>At present I think there is not an answer to this problem and I will have 
to use an ODBC link to a better featured database I can run more complicated 
queries against.</div>
<div> </div>
<div>What does the community think?</div>
<div> </div>
<div>Thanks</div></div></div>
<br><br>
<hr style="border:none;color:#909090;background-color:#b0b0b0;min-height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
        <tbody><tr>
                <td style="border:none;padding:0px 15px 0px 8px">
                        <a href="http://www.avast.com/" target="_blank">
                                <img src="http://static.avast.com/emails/avast-mail-stamp.png" border="0">
                        </a>
                </td>
                <td>
                        <p style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
                                This email is free from viruses and malware because <a href="http://www.avast.com/" target="_blank">avast! Antivirus</a> protection is active.
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
</div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>