Tuesday, June 24, 2008

Portech MV-372

UPDATE: This is old configuration you can try the new configuration in the post above

The Portech MV-372 gave me a lot of headache configuring it right. The configuration for Asterisk specified in documentations wasn't an option for me, working as extension, two dial stages while it works but come on, dial the extension, wait for signal, dial the number...
On the net i found some non-working configs so i had to spend 4 days trying to make it work as a Trunk and not as an extension.

Ok lets move on with configuration ;)

First we will configure the Portech MV-372 i believe this configuration will also work with Portech MV-370.

Login to your portech

  • Route
    • Mobile To Lan Settings:
      Item | CID | URL
      0 | * | 100
      notes: in URL you put your extension of your asterisk you want call from mobile to go. It can be extension, ringgroup, ...

    • Lan To Mobile Settings:
      Item | URL | Call Num
      0 | * | #
      notes: URL will match the IP address that will allow to dial through portech, since my server is behind NAT i allowed all IP, haven't try to specify IP. Call num # will receive the number dialed from ip(soft)phone.

  • SIP Settings
    • Service Domain
      Mobile 1 (Realm 1)
      Display Name: Sim1
      User Name: 1001
      Register Name: 1001
      Register Password: xxxxxx (choose a password)
      Domain Server: 192.168.x.x (you asterisk IP)
      Proxy Server: 192.168.x.x
      Mobile 2 (Realm 1)
      Display Name: Sim2
      User Name: 1002
      Register Name: 1002
      Register Password: xxxxxx (choose a password)
      Domain Server: 192.168.x.x (you asterisk IP)
      Proxy Server: 192.168.x.x

      notes: Username and registername you can change it to your needs just have a note of them since you will be entering those in asterisk trunks.

    • Port Settings
      Just make sure SIP Port for Mobile 1 is 5060 and
      SIP Port for Mobile 2 is 5062
Other settings are fine you may leave them as they are, only check Network (WAN) settings if you don't have DHCP or you need static ip for portech gsm gateway.

Dont forget to save changes (should reboot after saving)

Now lets move to Asterisk.

Login to your FreePBX/Trixbox and add SIP Trunk

Outbound Called ID: xxxxxxx (put you number here)
Maximum Channels: 1
go to Outgoing settings

Trunk Name: SIM1 (i have called it that way)
PEER Details:
host=192.168.x.x (your Portech IP address)
type=peer

Incoming Settings:
USER Context: 1001 (important must match username/registername at Sip settings of Portech)
USER Details:
type=friend
secret=xxxxxx (match SIP Settings password from Portech)
username=1001 (match SIP Settings from Portech)
qualify=yes
nat=yes
canreinvite=no
context=from-internal
host=192.168.x.x (Portech IP)

And then just click Submit Changes (don't forget the Orange bar on top after you make changes in your server)

Add another SIP Trunk for SIM2

Outbound Called ID: xxxxxxx (put you 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 - this is for Mobile 2, remmber Port Settings on Portech?)

Incoming Settings:
USER Context: 1002 (important must match username/registername at Sip settings of Portech)
USER Details:
type=friend
secret=xxxxxx (match SIP Settings password from Portech)
username=1002 (match SIP Settings from Portech)
qualify=yes
nat=yes
canreinvite=no
context=from-internal
host=192.168.x.x (Portech IP)
port=5062

Again apply changes.

We're almost done. Now to make this work we have to create Outboud Route, so click Outbound Routes
Put Route name as you wish, i have called it Portech_1 (since i will add another and will make it Portech_2)
Dial Patterns: i have put 049XXXXXX because i want only mobile numbers from the same provider to go through this trunk (through Portech) i mean i want to cut the costs right? But because you don't have my gun on your head go ahead and do whatever it suits you.

Trunk Sequence: i added SIP/SIM1 and SIP/SIM2
You can sepparate Trunks from OutRoutes if you have sim cards from two different providers, just create another Outbound Route remove one Trunk from trunk sequence of the first route that we created and add it to this new one.

Only thing you left to do now is click Submit Changes then Apply Configuration Changes and pray for this to work.

Hope it will work for you.

Me, company, voip...

Okay my first blog post, i am starting this Blog to post everything that involves my current job as an IT, so you can imagine that this will be only Tech Blog.

Anyway what i first wanted to post is about VOIP specifically FreePBX/Asterisk/Trixbox

My company is soon to switch to VOIP from traditional PBX and i am assinged to deal with it, make all configuration, preparation, choosing products, etc...

I have decided i will go with Trixbox (asterisk) just that it is Open "source" not that i really have a clue on code that i could intervene but you can very easy find help around the net.

I installed Trixbox on a VMWare ESX 3.5 server and it works prefectly, we have ordered 20 Linksys SPA942 ip phones, 4 SPA 3102 for connecting PSTN lines and 3 x Linksys 24 port gigabit POE switches (just for ip phones) ... (kidding), 2 x GSM gateways Portech MV-372 and cant remmember at the moment what else.

Enough of this, i'll soon start to post my configuration.