1. Setup the Trunk.
Your Trunk or Peer should have the following trunk settings, which you should adjust based on your configuration. This is for a FreePBX Trunk.
Outgoing Settings
Trunk Name: MagnaVoIP
Peer Details
username=$ACCOUNTNUMBER
type=friend
secret=$PASSWORD
qualify=yes
insecure=very
host=sip1.magnavoip.com
fromuser=$ACCOUNTNUMBER
dtmfmode=rfc2833
trustrpid=yes
sendrpid=yes
canreinvite=yes
disallow=all
allow=ulaw&g729
context=from-trunk
[should be blank]
Register String :
$ACCOUNTNUMBER:$PASSWORD@sip1.magnavoip.com/$ACCOUNTNUMBER
In all examples, your $ACCOUNTNUMBER should be in the format "00NN*NNN".2. Outbound Route with Dial Rules
Data102's MagnaVoIP SIP Service uses e.164-compliant dialing, which means that we transmit all phone calls with the syntax of +1-NPA-NXX-XXXX, for example +17193870000. The "+1" indicates the domestic USA, where +44 indicates England (for example).
You probably can't dial a "+" so it's important that your PBX, endpoint, or other device modify the dialed number before transmitting it to us. To accomplish this in FreePBX, make an outbound route with the following configuration - the one indicated is for Colorado Springs, CO, with area code 719 (you should modify this as appropriate for your locale):

3. Inbound Routes
MagnaVoIP sends calls to your endpoint in e.164 format as well -- if your number is 719-555-1234, we will send your PBX a call aimed at "+17195551234". This means that your inbound routes also need to have a +1 in front of them, as below:
