Asterisk + FreePBX (Trixbox, Elastix, etc)To connect your existing Asterisk with FreePBX solution to Soho66 for making & receiving calls, please follow the steps below. I've assumed that this is a clean installation of Asterisk / FreePBX so, you may need to change some details to suit your own particular installation.
Throughout this guide, replace [VoIP Username] with the VoIP Username of your Soho66 number [VOIP Password] with your VOIP Password, and [Domain] with your domain / registrar server. These can all be found in the "Voice over IP settings" section of your VoIP number configuration in "My Numbers" on our site.
SIP TrunkFirst of all, a SIP Trunk is needed.
Create a new trunk, and fill in the following details:
Code:Outbound Caller ID: [VoIP Username]
Trunk Name: Soho66
PEER Details:
type=friend
insecure=very
nat=yes
qualify=no ; this is important!!
canreinvite=no
authuser=[VoIP Username]
username=[VoIP Username]
fromuser=[VoIP Username]
fromdomain=[Domain]
secret=[VoIP Password]
host=[Domain]
dtmfmode=rfc2833
context=from-trunk
disallow=all
allow=alaw&ulaw&gsm
port=8060
USER Context: from-trunk
USER Details:
fromdomain=[Domain]
Register String: [VoIP Username]:[VoIP Password]@[Domain]/[VoIP Username]
Other fields not mentioned are to be left blank / with default values from FreePBX.
Submit the changes to the trunk. Don't worry about reloading the configuration just yet. There's more changes that we need to do first.
ExtensionSecondly, an extension is needed for receiving / making calls. This is fairly standard within FreePBX and nothing special is needed for Soho66 so, I'll assume that you know what you're doing with this step.
Outbound RouteNext, an outbound route is needed for making calls through Soho66. Either create a new route, or modify the default 9_outside route if desired (for calls to be prefixed with 9 for external through soho66).
If you're creating a new route, ensure that it has a sensible name for internal management. In Dial Patterns, if you want to have the system use a prefix for dialling calls through Soho66, then enter the prefix, followed by a pipe symbol (|) followed by a full stop (.). The default 9_outside rule has a dial pattern of 9|. meaning that anything starting with a 9 will go through this route but, the pipe symbol will stop anything before the pipe (the 9 in this case) from being submitted to the trunk (Soho66).
For the Trunk Sequence, ensure that SIP/Soho66 is the only trunk that's in use (if you're editing the default rule, change ZAP/g0 to SIP/Soho66).
Submit the changes to the outbound route. Once again, don't worry about reloading the configuration at the moment.
Inbound RouteLastly, you'll need an inbound route. Create a new route and fill in the following fields.
Code:Description: Soho66 Inbound
DID Number: [VoIP Username]
In "Set Destination", choose where you want the inbound call to be routed to.
Once again, any other fields should be left as blank / the default which FreePBX supplies.
Submit the changes, then reload the configuration.
You should find now that, any calls received will be presented to your FreePBX extension.