AMI Web interaction

I wrote a simple python script that allows someone to interact with the manager interface via the command line. Basically how the script works is:

  1. Connects to AMI.
  2. Gets two phone numbers from the user on the CLI.
  3. Originates the two calls
  4. Brings the originated calls into a common meetme conference.
  5. A ‘while’ loop waits for input from the user. Only characters a-z are allowed.
  6. “a-z” correspond to .WAV files that are played or “injected” into the conference by the use of originating another
    local extension.

To me it is kinda neat but I want to do the same exact thing from a web app but I don’t know where to start. What languages would I need to use? I know basic html and have played with javascript but what techniques do I need to use to pass form input variables to the python script on the server (web server and asterisk server are the same machine)? CGI? What about using PHP? I will probably need to learn that at somepoint… If I use PHP can I still “call” the python script and pass values to it? I was hoping to use javascript eventually to allow the user to play a sound that corresponds to a button (just like a character in the command line version) without hitting submit but plan on just getting to work for now. Any hints or guidance would be greatly appreciated.