If you want something more ready-to-go, you can use https://www.wombatdialer.com/ - works with Asterisk clusters and requires no explicit programming - you just declare what you want done, and it takes care of the rest. You just feed it through an API.