Setup to accept calls from IP

Hi,

I am new to FreePBX and Asterisk. I am having a issue setting up the SIP trunks to work with my provider for inbound calls outbound works great. They are telling me that the calls are being routed to my FreePBX IP address and that I need to setup to accept calls from my IP. I have looked everywhere on the Internet and cannot find how this is done. This is the info they say I need:

sip.conf

[sip-gw-a]
type=friend
nat=never
host=74...2
disallow=all
canreinvite=yes
allow=ulaw
dtmfmode=auto
context=inbound-did
qualify=yes

[sip-gw-b]
type=friend
nat=never
host=74...18
disallow=all
canreinvite=yes
allow=ulaw
dtmfmode=rfc2833
context=inbound-did
qualify=yes

Extensions.conf:

[paid-outbound]
exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN}@sip-gw-b)
exten => _NXXNXXXXXX,2,Dial(SIP/${EXTEN}@sip-gw-a)
exten => _NXXNXXXXXX,3,Dial(SIP/${EXTEN}@sip-pst-primary)
exten => _NXXNXXXXXX,4,busy()

Any suggestion and Help is much appreciated. Thanks!

You do not need the extensions.conf, FreePBX does this for you.

Other than that, in FreePBX you enter peer details in the trunk setting, these are just passed through to Asterisk.

I think you also need another command so I added it to your settings, try it with and without.

Simply paste these in the inbound setting of a trunk, you will need two trunks for this. Trunkname is not a variable I am just showing to name your FreePBX trunk.

Also note I changed the context to reflect FreePBX conventions.

You did not say what FreePBX version or Asterisk. I assumed Asterisk 1.6 or later.

[code]

trunkname - sip-gw-a

type=friend
nat=never
host=74...2
disallow=all
canreinvite=yes
allow=ulaw
dtmfmode=auto
context=from-pstn
insecure=port,invite
qualify=yes

trunkname - sip-gw-b

type=friend
nat=never
host=74...18
disallow=all
canreinvite=yes
allow=ulaw
dtmfmode=rfc2833
context=from-pstn
insecure=port,invite
qualify=yes

Everything is working now! And yes I am running Asterisk 1.6.2.11