This is copied verbatim from this blog post at sysadminman.net, except that I have changed the context statement to context=from-trunk, as required by FreePBX. The USER Context and USER Details in the trunk configuration are left blank. Be sure to substitute your user information and password in place of all instances of "1234567" and "XXXXXXXX".
Sipgatge trunk with Asterisk/FreePBX
9th November 2008, 01:00 pm
I’ve used Sipgate for the past few years with my Asterisk box and have been pretty impressed.
For anyone else looking to use Sipgate with Asterisk/FreePBX here is my trunk setup
Trunk Name: Sipgate
PEER Details:
username=1234567 type=peer secret=XXXXXXXX qualify=yes nat=never insecure=very host=sipgate.co.uk fromuser=1234567 fromdomain=mydomain.com dtmfmode=rfc2833 disallow=all context=from-trunk canreinvite=yes authuser=1234567 allow=ulaw
Register String:
1234567:XXXXXXXX@sipgate.co.uk/1234567
If you are using NAT between your Asterisk box and Sipgate you will need “canreinvite=no” and “nat=yes” or you will probably get one way audio only on your calls.