Hi All.

This patch is kinda ugly, but it more than meets my needs. This patch changes 
how Asterisk 1.0.2
stores voicemail files, greetings, etc, etc.

My situation is that I need to store massive numbers of mailboxes. Linux 
**WILL** puke eventually
if you try and place all user folders in the same {context} directory. It 
doesn't matter if you
use ext3, reiserfs, etc, etc, -- they will all eventually be unable to handle 
the job that I plan
to throw at it.

The solution is to use a DID (aka - 10-digit telephone number) as the user's 
Asterisk extension. A
DID is comprised of the following parts:

    407  555  1212
     ^    ^    ^
    NPA  NXX  LINE

This patch will store voicemail files as follows:

AST_SPOOL_DIR/voicemail/{context}/{npa}/{nxx}/{line}

Thereby having a maximum of 10000 users per directory (ie, 0000 to 9999)

NOTE: AST_SPOOL_DIR is defined in /etc/asterisk/asterisk.conf

Beware, I have only tested this patch with the voicemail part of Asterisk. I'm 
using Asterisk with
SIP eXpress Router to provide voicemail only. Therefore I cannot guarantee that 
I didn't break
something else in the system.

Part of this patch is a modification to the contribs/scripts/addmailbox script. 
This script now
creates the proper directory hash noted above. It also only accepts 10-digit 
numeric mailboxes.

If you see a problem or find a bug, then let me know.

Finally -- it would be awesome if someone could verify this patch and commit it 
to CVS for others
to use.

Regards,
Paul Hazlett



                
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 

Attachment: did-hashing.patch.gz
Description: did-hashing.patch.gz

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to