I'm running a custom MoH application for a large number of users under an asterisk 11 box. The configuration is as follows:
[customer-100]
mode=custom
application=/usr/bin/ruby /path/to/script.rb 100
[customer-101]
mode=custom
application=/usr/bin/ruby /path/to/script.rb 101
This is repeated for 400 odd customers. This seemed to be a good solution - now all I have to do is set the MusicOnHold to the applicable class within the dial plan, however upon reloading moh, Asterisk attempts to initialise and run all of these scripts at once, assumedly to have them all running and ready when it's time to play back.
Is there a way to instruct asterisk to construct these channels/call this script on demand, rather than constantly?