This guide will help you set up a Trunk in Asterisk (FreePBX, Trixbox, PBIF, etc.) for the Portech GSM Gateway.
This configuration will pass Caller ID.
First we will configure the Portech MV-370. This configuration will also work with Portech MV-372 and other Portech MV-3xx like MV-374.
Login to your Portech
Route
- Mobile To Lan Settings:
Item CID URL 0 * 192.168.x.x (your asterisk ip) - Lan To Mobile Settings:
Item URL Call num 0 * # - Mobile
- Settings:
Mobile 1:
Sip From: Tel/Tel (Not reg)
CLID Presentation: On
LAN Answer Mode: Income
- Settings:
- Service Domain
You only fill Domain Server and Proxy Server with your Asterisk IP address:
Domain Server: 192.168.x.x
Proxy Server: 192.168.x.x
Again do the same for Mobile 2 if you are using the MV-372
- Port Settings
Make sure SIP Port for Mobile 1 is 5060 (and port 5062 for Mobile 2)
Don’t forget to save changes (should reboot after saving)
Asterisk/FreePBX
Login to your FreePBX and add SIP Trunk
Outbound Called ID: 0711111111 (put your GSM number here)
Maximum Channels: 1
Outgoing settings
Trunk Name: SIM1 (you may put anything you like)
PEER Details:
host=192.168.x.x (your Portech IP address)
type=peer
port=5060
Incoming Settings:
USER Context: 07111111111 (Your GSM mobile number)
Leave Incoming Settings blank.
Click submit (don’t forget the Orange bar on top after you make changes)
If you have the dual-sim MV-372, add another SIP Trunk for SIM2.
Outbound Called ID: 0722222222 (put your second GSM phone number here)
Maximum Channels: 1
go to Outgoing settings
Trunk Name: SIM2
PEER Details:
host=192.168.x.x (your Portech IP address)
type=peer
port=5062 (important)
Incoming Settings:
USER Context: 0722222222 (put your second GSM phone number)
Again apply changes.
In General Settings, enable Allow Anonymous Inbound SIP Calls
Now to make this work we have to create Outbound Route, so click Outbound Routes
Put Route name as you wish, I have called it GSM_1 (then you can add another and make it GSM_2)
Dial Patterns: I have put 07xxxxxxxxx because I want only mobile numbers to go through this trunk (Portech). It’s all about good cost managment.
Also don’t forget in order to receive calls you need to have Inbound Route setup on Asterisk/FreePBX. Create a new Inbound Route. Set you destination to an extension or ring group or any other destionation you would like to transfer calls to.
I have set the CID Lookup source to ‘Phonebook’ so that I can see who is calling. This is a feature that would not work when I had the Portech coming straight in on a Ring Group.
Only thing you left to do now is click Submit Changes then Apply Configuration Changes and pray for this to work!