The extension will have to communicate to via some sort of HTTP method that includes some sort of authorization information.
You build a listener that authenticates the request coming from your extension and then translates the HTTP request with with who to call to and who to call from into a call request for asterisk, One of the easiest ways to do this is by creating a call file.
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files
You could also use something like AMI to do an Originate action.
https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+ManagerAction_Originate