Best practices for user registrations

Hi, looking for advice how people handle user registrations with Asterisk.

  1. We have a service where users can sign up
  2. We have three Asterisk machines
  3. Upon sign up, we want the users to be able to immediately Register on the Asterisks

Is there any way that the Asterisk can ask the API on every register if the user credentials are valid?

If not, is the way to go Asterisk Realtime?

If so, do we build ourselves some type of sync module that keeps the Asterisk DBs up to date with the service where users sign up?

  • We do not want the Asterisk-DB to be mixed with the service’s DB

How have you solved similar scenarios like this?

Referenced but not set: The API.

What is the API you are referring to?

Yeah, sorry, the API would be an API we create for our service. We could implement it in any way so the question is if Asterisk can ask outbound questions regarding registrations.

The option seem so strange to use realtime… for example if we accumulate 100k users and do a “pjsip show endpoints” that would crash the terminal etc…

There is no built in “call an API” functionality for such things except for the defined interfaces used by modules and the CURL realtime module.

So how do other business solve this type of problem? What type of setup do they use? I suppose it is a very common problem that you sign up lots of users and have many Asterisk-servers and need to keep it all in sync?

It’s not a common usage pattern of Asterisk, but generally speaking people in that scenario use Asterisk as a media server and use other applications - such as Kamailio for other roles such as registrations.

Thanks for the insight!

With what you have provided a proper answer can’t be given. Why are there three Asterisk systems? What purposes do they serve? How are the users going to register? Is there an app or a web page they use once they sign up or are they just given information so they can use their own device/softphone? Will calls be sent over or come from any Asterisk box or a specific Asterisk box? Will there be voicemail for the users and where will that be served from?

Good point.

3+ systems: To handle the load, more specifically we wanted to mention that there is more than one Asterisk since having only one makes things easier, hence it should be assumed that there is more than one, for example X Asterisks.

They register in a mobile-app which has a VoIP-client such as PjSIP or similar.

Calls will come/go to the app/voip-client.

No voicemail.

What load? How many users and calls do you think you will have for this? Because you can’t load balance Asterisk like that. The SIP client will need a host to connect to. If you have three Asterisk systems then you need to have something in-between the SIP client and the Asterisk servers so they can register there and that can route calls as needed.

Yes, on the users side but from your side they will come/go via Asterisk and that would mean it would need to be the Asterisk server the user is registered to (based on just having Asterisk servers) so you would need to know what Asterisk server the user is on so the incoming calls can go to that server. If your users need to call between each other and one is on Asterisk 1 and the other on Asterisk 3, how does Asterisk 1 know that and how does it send the call there?

It’s sounding like there are still some gaps in your design for all of this.

A single login will give you access to all the forums on

However, you do need to learn how to start your own thread and not hijack an unrelated thread.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.