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
User/Pass auth SIP trunk settings
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
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