Advice in integrating aseterisk into a SaaS service

Hello all,

I recently got handed a new project to work on that includes integration with Asterisk. Basically, to sum it up real quick; A user can sign up into the service and can then buy whatever amount of DID numbers from us and can make inbound/outbound calls with them.

What I am trying to figure out is which approach I should take regarding the user being able to create outbound calls. For outbound calls to occur, the mobile app is required to have a dialer built-in to it. This means that the app will be directly communicating with the Asterisk server.

I am taking into consideration that for the meantime there will be around <=1000 users and what I want to know now, should I create a SIP account for each individual that signs up? Will asterisk be able to handle that many users? If so, is it a good idea to hook Asterisk with a real-time database (pgsql) to use instead of sip.conf regarding the registration process?

Regards

Each user will need to have some sort of credentials. If you’re doing a decent number of users; you may want to look in to hooking all of this into a real-time database and have your sign-up process write to the database. You will additionally need to script some things so you can send caller ID information, unless you’re handling that downstream.

If you’re doing this in the US; you will have to register as a VoIP provider as well as comply with STIR/SHAKEN. That’s a much larger hurdle.

Hi, thank you for reply.

So using a real-time database for a decent number of users should not be something to worry about regarding performance or anything related to it, right?

I personally would setup more than one server. And load balance it so it goes up to 500 extensions per server.

But AFAIK, if the Asterisk server is designed right, you can run 1k endpoints on it.

I have systems with more than 1K endpoints, in one case over 2500K.

  1. Don’t use chan_sip, it is dead. 2) You will need something more than just Asterisk to do with this. Like a proper SIP proxy.

Nice. Thanks for sharing.

What do you advice in regards for a proper SIP proxy?

Have a look at OpenSips and Kamailio. I would set either one of them up in a HA enviroment. The possibilities are endless. I personally would use as little dial plan as possible and things in a mix of ari, agi and a db system (psql, mysql etc.). This gives you the most flexibility. There are many videos form years past at Astricon and cluecon to give you inspiration on what path to take.