Connecting FreePBX & asterisk | nurango academy

Connecting FreePBX & asterisk

FreePBX and asterisk Configuration Example;

Trunk Name: nurango

PEER Details:

[nurango] ; add Trunk name line to asterisk only, Freepbx has its own input box

username={user_xxxxxx}@{your-realm}
secret={your-secret}
fromuser={user_xxxxxx} ;needed for Contact info
outboundproxy={our.sip.proxy}
type=peer
qualify=3400 ;recommended to avoid closure from firewalls "Keep-Alive"
insecure=port,invite
context=from-pstn ;default (try "from-trunk" if doesn't work for you)
srvlookup=yes ;optional if you are using DNS instead of IPs
disallow=all
allow=g722&ulaw
nat=port,invite ;"=no" if asterisk isn't behind NAT (an internal/external IP)
sendrpid=yes ;to send custom caller-ID in header

Register String:

{user_xxxxxx}@{your-realm}:{your-secret}:{user_xxxxxx}@{sip-proxy}/{user_xxxxxx}


The "Incoming" Context is not needed since we have set type=peer

----

This should be sufficient for 99% of customers using asterisk 1.6 and up. It should be noted that when you use a Peer you do not need to separate the Outbound and Inbound Contexts.

Inbound Call Notes

Since we send inbound calls from multiple IP's, you will need to "Allow Anonymous Inbound SIP Calls" under "Asterisk SIP Settings" and "Allow SIP Guests" under "Chan SIP Settings". Create a "Catch All" and send it to "Congestion" so as to terminate unwanted callers not calling to a valid DID.

For more information on securing your box with a catch-all DID, see our blog article here.

You may also need to Whitelist our IP's in your firewall. Please contact support for a list of the IP's if you do not already have them.