Moving ATA configuration to a trunk

I have setup my Linksys ATA to use the long distance VoIP provider. Everythign works just find. I setup the proxy, username, password, codec, …

Now, I want to move this to FreePBX and be able to use that provider for any long distance call made from any extension. I tried to move this setup to a trunk, as a peer only, but it does not work!

How can I use the ATA setup which is working from an ATA, to FreePBX to be able to use many extension?

Asterisk must be at least as capable as an ATA box!

Thanks,

Pikau