简体   繁体   中英

Realtime-events Asterisk integration

the intention of this post is to get thoughts from experts on the topic. I hope i am not violating any stackoverflow rules. If so, please advice me about the way how to ask properly.

We have our software (web application) that we integrate with one PBX at the moment. We would like to extend that integration to Asterisk also. The way our current setup works is that we get real time http notifications from PBX to our web application about almost everything that happens in PBX (extension ringing, extension answered the call, agent logged into callcenter, etc...). We would love to follow the same pattern with asterisk.

Now, reading about Asterisk left us in a bit of dilemma. We hear different ways of implementing it. Namely:

1. Do it with AGI() - so, at different critical points in dialplan put AGI that would collect info about current call and send http request to our application.

2. Do it with AMI - connect to TCP, listen to everything and then on the receiver application side (our web app) filter what you need

3. do it with ARI - i know no details about this one

Problems/challanges that i understood with each of those are:

1. processing AGI() - for each call (or even DIALSTATUS_CHANGE) might be too much and might become performance issue very soon

2. AMI - does not have any 'native' multitenancy support - no easy way to do any kind of events queuing (if receiver app is down, to resend after some period of time) - TCP connecting to potential behind-the-firewall asterisks might be a hassle

3. ARI - no details i know about

Scope of the solution we need is:

  • multitenant solution with hundreds of tenants each with potentially hundreds of users (up to 300-400, eg). i am aware this requires scaling, but at the moment i just want to see options for one server and best ways for doing it in scope of one
  • reliable real-time events coming to our web app
  • preferably http notifications, least preferably tcp (including websockets)

What i would like to hear is which one would you suggest to go and a piece of explanation/discussion about reasons?

Thank you

Your options above are apples and oranges - hard to compare. As you point out Asterisk is not tenant aware. Event Asterisk wrappers which create 'multi-tenant' simply split the dialplan into nice pieces for you, but Asterisk doesn't care. So, if you want the state/activity of Asterisk you would have to go through the AMI. (ARI isn't far off, but introduces other complexities).

If you need to map activites to tenants then you have a separate issue/question.

There was no multitennt idea when asterisk was created. It was created as SIMPLE replacement for hardware pbx

So there are no any multitenancy features on asterisk,unless you do it yourself using dialplan and config.

Also asterisk not designed to server thousands of users. For such load you need checkout clustering solution based on opensips/kamailio+opensips.

Anyway, if you expect highly scalable solution, best option for you is hire asterisk expert at least for architecture stage. Otherwise solution can take all resources of server on 100 users.

Most scalable variant for asterisk will be FastAGI external program which fire events AND control dialplan + AMI listener which fire transfers/other events which nto availible in AGI. Also it is posible do in pure dialplan+AMI, but in that case need be care with http part(if it respond to long can be issues with asterisk)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM