I know this potion can be done with an outbound route and a loop back Trunk. But it’s hard to have the techs remember to keep on adding DIDs to the outbound route as well every time they add an inbound route, so I was thinking of the following:
Is there a way to make this work, or I need to specify the context for each DID?
Another question:
When using a predial hook with something like
exten => s,n,System(/tmp/script.sh)
And lets say the script tries to reach a server, or sends an email. Is there a possibility for the call to continue in case the script gets stuck? I don’t want calls to get stuck because of that script…
(Running System() asynchronous ?)
The provider said client is using sends the DIDs as 10 digits, but requires outgoing calls as 11 digits.
For now I did the following:
[macro-dialout-trunk-predial-hook]
exten => s,1,Noop(Entering user defined context macro-dialout-trunk-predial-hook in extensions_custom.conf)
exten => s,n,agi(lgaetz-didloopback.php,${DIAL_NUMBER:-10},verbose)
exten => s,n,GotoIf($["${didloop}" != ""]?redirect)
exten => s,n,MacroExit
exten => s,n(redirect),goto(from-trunk,${DIAL_NUMBER:-10},1)
It works… But is there a better way to get this done?
Another question: this PBX has around 150 users and a ton of DIDs, they are constantly placing outgoing calls. Is there any risk? should I implement it as a FastAGI?
Final question: what happens if that script get’s stuck, what will happen to the call?
There is support in the script for doing this as well, but it’s no better than what you’re doing in dialplan.
As for you question about how it scales, I can’t answer. It may be in use on larger systems, but if so, I have no knowledge of it. I would not expect major issues, but you’ll have to keep an eye on things in the near term to be sure. FastAGI is generally recommended now for all systems, and particularly so for very busy ones.