I have a set of extensions all configured at the moment as follows:
[from-did-direct]
exten => 200X,1,NoOp()
same => n,Stasis(myAppX)
same => n,Hangup()
where X is a number in {1, …10}. For example, when one calls 2005, the app ‘myApp5’ will take care of that call. That app interacts with the caller in an automated way (no human interaction).
On the other hand, I have successfully configured a SIP trunk and an inbound route so that I can have a call from that phone number being routed to one of these extensions, but only one.
My goal would be to implement the following scheme when someone calls that phone number:
- call routed to 2001 -> myApp1 starts. If 2001 is busy then:
- call routed to 2002 -> myApp2 starts. If 2002 is busy then:
...
- call routed to 2010 -> myApp1 starts. If 2010 is busy then return busy tone.
I was wondering what is the best way to achieve this? Eventually I want to be able to scale this to hundreds of extensions. I’ve been reading a bit and I have sketched this solution:
- I set the inbound route from that phone call to 2001. In the configuration of 2001 (Advanced → Optional Destinations → Busy) set 2002 when 2001 is busy. Repeat: set 2003 when 2002 is busy, …, set 2010 when 2009 is busy.
I have read some solutions based on ring groups, but I think it would not work for me, because of the Stasis nature (since all extensions can automatically start).
However, I am not entirely convinced of my solution, since it is hard to scale to more extensions.
I appreciate any hints or ideas.
Thank you.