You have come to this page this means you already have create extensions and now want to configure sip trunk in your asterisk pbx.
How to get SIP configurations from VoIP Providers
Most of the voip providers provide you control panel where you can generate sip configurations. For example Telnyx will provide you sip configuration something like this
IP Auth sip configuration
type=friend
qualify=yes
insecure=port,invite
host=sip.telnyx.com
fromdomain=sip.telnyx.com
disallow=all
allow=ulaw
User/Pass auth SIP trunk settings
username=your_credentials_based_telnyx_username
secret=your_credentials_based_telnyx_password
type=friend
qualify=yes
insecure=port,invite
host=sip.telnyx.com
fromdomain=sip.telnyx.com
disallow=all
allow=ulaw
Those who are not aware of Telnyx, This is New York based VoIP providers and provide voip services including DID Numbers at very competetive rate.
Now login to PBX web interface and click on connectivity then Trunks, select chan_sip trunk.
Give it a name, In Dial Number Manipulation Rules, select Dial pattern wizard.
Then go to Sip settings and paste it like this images

Outbound Route
We can have multiple trunk in a pbx, using outbound route we tell PBX which trunk should be used to dial outbound calls.
Go to connectivity then select Outbound routes, Give it a name, and set callerid.
Go to Dial pattern and use dial pattern wizard. Sumit it.
Now your PBX is ready to make outbound calls.
In the next article we will learn how to configure DID Number for inbound