I am trying to setup Asterisk so it can accept internal user registrations from 22210000000 - 22299999999. As you notice 222 is prefix, following with some random number from 10000000 - 99999999. Multi-hour googling doesn’t give me answer on where and how can I configure this.
I tried to specify wildcard in sip.conf but it doesn’t register users.
The username goes in the square brackets. You must enumerate every one, although you can use templates to avoid repeating most of the lines (you should still use a different secret for each one and you may want to use regexten.
Do you mean I have to add millions of sections? If not, could you please give some example, hint of configuration?
Update:
I don’t think I have to use different secret, because I have an example of Asterisk setup, that accepts range of usernames and single password. Unfortunately I don’t have configuration for that setup.
save it in sipgen.php and run it ( chmod 755 gensip.php and ./sipgen.php )
then you will have generated_sip.conf . you need to include it in your sip.conf .
I dont know why you need these bunch of sip accounts . maybe It is better to use ARA and generate sip account per user request in database .
I mean a section for each device. If you have millions of devices, I suspect you will have other problems.
There is no technical requirement to have different passwords, but common sense requires that you do have different passwords, which should not be algorithmically related (although they could be encrypted versions of the other data using a secret key, stored offline).
The fact that you are asking how to do something completely unreasonable makes me think you need to describe the goal, rather than your proposed partial solution. I suspect you are actually trying to solve a problem the wrong way.
save it in sipgen.php and run it ( chmod 755 gensip.php and ./sipgen.php )
then you will have generated_sip.conf . you need to include it in your sip.conf .
I dont know why you need these bunch of sip accounts . maybe It is better to use ARA and generate sip account per user request in database .[/quote]
[quote=“david55”]I mean a section for each device. If you have millions of devices, I suspect you will have other problems.
There is no technical requirement to have different passwords, but common sense requires that you do have different passwords, which should not be algorithmically related (although they could be encrypted versions of the other data using a secret key, stored offline).
The fact that you are asking how to do something completely unreasonable makes me think you need to describe the goal, rather than your proposed partial solution. I suspect you are actually trying to solve a problem the wrong way.
What is the significance of the 105?[/quote]
David,
The goal was following. I have web based support call button, which is registering on asterisk with every new call. So I randomly set username from web. Actually I made some 1000 extensions, instead of millions and it looks reasonable in order not to repeat usernames.