Ring an extension via API?

I want to accomplish two things:

  1. Ability to ring an extension automatically, for example when I POST to a URL in FreePBX.

  2. Be able to answer that call with that extension and have a message or announcement played back.

I have a Slack webhook that sends a message whenever someone purchases something from a website. I wanted to have that hook ping my FreePBX server (for example freepbx.internal/dial.php?ext=199) and when I answer, listen to a custom message.

This is just a toy project, but it seems like it should be doable.