I am not sure of the exact limit, but I know Asterisk can support well over 20 digits (or alphanumeric characters). It doesn't impost strict limits like other systems. The extensions can vary in length on the same system.
For example, I could have one system with all of the following extensions:
4444
3268
"voicemail"
0
8005551234
"support"
3453589785679950575674
==================================
<INSERT SIGNATURE HERE>