Connect the ethernet port of the router (interface ethernet0) to a live conection to the internet.
The router ethernet port will need a public I.P. address to make it easy.
Setup the router for VOIP. Select the CODEC,Default gateway, I.P. address,H323 gatekeeper and so on.
Test that from the router you could ping the I.P. address of the gatekeeper and or other gateway (remote).
Plug a phone on the FXS port, dial out the remote number and if eveything works you will be doing VOIP.