SIP Trunk Configuration

Hi,

I am really new with FreePBX and Asterisk. You might consider that I am just using it at home, and more of a hobby for the moment.

My question : I need to configure a SIP Trunk to get Incoming calls and do Outbound via VOIP. My friend provided me with a SIP configuration and he says that I need to do it in SIP.conf. Do I do this on the said file name, or do I configure it through the SIP Trunk. Here’s what he provided me with.

sip.conf

[A**********_1]
type=friend
host=..*.*50
canreinvite=no
disallow=all
allow=g729
allow=ulaw
dtmfmode=rfc2833

extensions.conf

[domestic]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@A**********_1)
exten => _1NXXNXXXXXX,3,Congestion
exten => _1NXXNXXXXXX,103,Congestion

[international]
exten => _011.,1,Dial(SIP/${EXTEN}@A**********_1)
exten => _011.,3,Congestion
exten => _011.,103,Congestion

Any suggestion and help is much appreciated. Thanks!

FreePBX configures the files for you.

Simply put the peer information in the trunk.

In order for g729 to work you must purchase licenses from Digium. ulaw is standard so don’t enable g.729 unless you purchase and install the licenses.

I suggest you understand what those variables functions are.

http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf

Any of this information can be used inside FreePBX trunk module, just ignore the filename stuff.

Make sure you use FreePBX context from-trunk

You also don’t need to write any extension code, FreePBX does this for you.

Thanks for the assistance.

I was able to configure my Asterisk to receive the calls from my provider. But now I am having a different problem. (If I need to create a different Topic, I will. But for now I will just be listing it here.)

The next problem is that, when I do calls between extensions within my local network the audio is working fine. However, if I get a call from outside that dialed my number the I cannot hear anything from the caller.

Is it a configuration problem with the firewall(esp. nat configuration)? If so, what do I need to do?

If I am missing some information regarding my configuration please tell me so that I can provide them. Thank You.

With all due respect our purpose here is not to be a substitute for reading documentation and understanding configurations.

Much information is available online about Asterisk, FreePBX and networking.

To answer your questions you need to setup FreePBX properly so it can configure Asterisk, this is done via SIP settings module. You also need to make sure your router/firewall is configured properly.