This is actually better than limiting the number of messages since you can control actual disk space. (One REALLY long message will take more disk space than five really short ones.)<div><br></div><div>However, in the interests of actually answering the question, and demonstrating that with FreeSWITCH anything is possible, here is a simple dialplan trick that will allow you to limit the number messages:</div>
<div><br></div><div>&lt;extension name=&quot;check vm box limit&quot; continue=&quot;true&quot;&gt;</div><div>  &lt;condition field=&quot;destination_number&quot; expression=&quot;^(10[01][0-9])$&quot; break=&quot;never&quot;&gt;</div>
<div>    &lt;action application=&quot;set&quot; data=&quot;dialed_extension=$1&quot;/&gt;</div><div>    &lt;action application=&quot;set&quot; data=&quot;dest_user=$1@${domain}&quot; inline=&quot;true&quot;/&gt;</div><div>
    &lt;action application=&quot;set&quot; data=&quot;box_count=${vm_boxcount ${dest_user}}&quot; inline=&quot;true&quot;&gt;</div><div>    &lt;action application=&quot;log&quot; data=&quot;INFO User ${dest_user} has ${box_count} message(s)&quot;/&gt;</div>
<div>  &lt;/condition&gt;</div><div><br></div><div>  &lt;condition field=&quot;${expr below(${boxcount},{$max_count})&quot; expression=&quot;^1$&quot;&gt;</div><div>    &lt;action application=&quot;voicemail&quot; data=&quot;${domain} ${dialed_extension}&quot;/&gt;</div>
<div>    &lt;anti-action application=&quot;playback&quot; data=&quot;voicemail/vm-mailbox_full.wav&quot;/&gt;</div><div>  &lt;/condition&gt;</div><div>&lt;/extension&gt;<br><br></div><div>The key is to use the vm_boxcount API to get the current message count for that user, then use the expr API and the &quot;below&quot; function to make sure that the box_count is less than whatever the max number of messages (max_count in this example). The action and anti-action tags then handle the rest.</div>
<div><br></div><div>I just threw this together off the top of my head so please actually test it out and make sure it works. Once you confirm that, please add it to the voicemail wiki page.</div><div><br></div><div>-MC<br>
<br><div class="gmail_quote">On Tue, Aug 2, 2011 at 6:45 AM, Robert Huddleston <span dir="ltr">&lt;<a href="mailto:rhuddleston@gmail.com">rhuddleston@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Actually <a href="http://wiki.freeswitch.org/wiki/Mod_voicemail#vm-disk-quota" target="_blank">http://wiki.freeswitch.org/wiki/Mod_voicemail#vm-disk-quota</a><br>
<br>
In the manual...<br>
<div class="im"><br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Sascha<br>
Daniels<br>
Sent: Tuesday, August 02, 2011 6:00 AM<br>
To: FreeSWITCH Users Help<br>
Subject: [Freeswitch-users] Limit number of voicemails<br>
<br>
</div><div><div></div><div class="h5">Hi together.<br>
<br>
For a small appliance I need to limit the number of voicemails for each<br>
user.<br>
<br>
I know that I can limit the length. That is the first step.<br>
<br>
Is there a way to disable the message recording, when the maximum number<br>
of voicemails is reached?<br>
<br>
Unfortunately I didn&#39;t find anything in the documentation.<br>
<br>
Kind regards<br>
<br>
                        Sascha<br>
<br>
--<br>
AMOOMA GmbH - Bachstr. 124 - 56566 Neuwied  --&gt;  <a href="http://www.amooma.de" target="_blank">http://www.amooma.de</a><br>
Geschäftsführer: Stefan Wintermeyer, Handelsregister Montabaur B14998<br>
<br>
Bücher: <a href="http://das-asterisk-buch.de" target="_blank">http://das-asterisk-buch.de</a> - <a href="http://ruby-auf-schienen.de" target="_blank">http://ruby-auf-schienen.de</a><br>
<br>
<br>
_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>