从源辞典

查阅生活点点滴滴

Starhub Digital Voice Global to work with Asterisk PBX

March 28th, 2013 by congyuan

I have been able to extract the SIP settings for my starhub digital voice global long time ago. Only recently I could make it to work with Asterisk.

Problems that I faced previously:
Asterisk is able to register successfully but were not able to make outgoing calls. Error is 403 Forbidden.

PhoneNumber = 6xxxxxxx (8 digits)
Username = 3xxxxxxx (8 digits)

Correct values when registering:

From: sip:6xxxxxxx@sipproxy1.starhub.com;
Authorization: Digest username=”3xxxxxxx”, realm=”Registered_Subscribers”, algorithm=MD5, uri=”sip: sipproxy1.starhub.com”,

and calling requires proxy-authorization:

From: “asterisk” sip:6xxxxxxx@sipproxy1.starhub.com;
Proxy-Authorization: Digest username=”3xxxxxxx”, realm=”Registered_Subscribers”, algorithm=MD5,

I set Asterisk to have debug on and found out that
1. Asterisk uses username as the phone number when register.
2. Asterisk send the phone number as the username for Proxy-Authorization as a result.

In the users.conf file, I tried to change the username= 6xxxxxxx to username=3xxxxxxx, but the line could not register. Because Asterisk will use the 3xxxxxxx as phone number, which will be rejected by starhub.

The correct way to make both register and call works is to have a separate register => in sip.conf, and disable registersip in users.conf.

The correct settings are as follows.

file: sip.conf

[general]
register => 6xxxxxxx:YOURPASSWORD:3xxxxxxx@sipproxy1.starhub.com~600

file: users.conf

[starhub]
type = friend
host = sipproxy1.starhub.com
username = 3xxxxxxx
secret = YOURPASSWORD
trunkname = starhub
context = DID_starhub
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = no
trunkstyle = voip
insecure = port,invite
fromuser = 6xxxxxxx
authuser = 3xxxxxxx
outboundproxy = sipproxy1.starhub.com
fromdomain = sipproxy1.starhub.com
nat = yes
canreinvite = yes
disallow = all
allow = ulaw,alaw,g729

Now configure the outbound calling rules.

file: extensions.conf

[CallingRule_Local]
exten = _[3689]XXXXXXX,1,Macro(trunkdial-failover-0.3,${starhub}/${EXTEN:0},,starhub,)
[CallingRule_Local1800]
exten = _1800XXXXXXX,1,Macro(trunkdial-failover-0.3,${starhub}/${EXTEN:0},,starhub,)
[CallingRule_LocalFree]
exten = _1XXX,1,Macro(trunkdial-failover-0.3,${starhub}/${EXTEN:0},,starhub,)
[DLPN_DialPlan1]
include = CallingRule_Local
include = CallingRule_Local1800
include = CallingRule_LocalFree
include = default

Now configure the incoming rules.
file: extensions.conf

[DID_starhub]
include = DID_starhub_default
[DID_starhub_default]
exten = s,1,Goto(ringroups-custom-1,s,1)
[ringroups-custom-1]
exten = s,1,NoOp(Home)
exten = s,n,Dial(SIP/6001,20,${DIALOPTIONS}i)
exten = s,n,Hangup

Note 1: Home is my ring group including extension 6001.
Note 2: Trunk, Outbound and Incoming rules, Ring groups can be created from GUI.
Note 3: Modify the registersip to no for [starhub] in users.conf after the section being generated from GUI.
Note 4: Manually add register => to sip.conf.

Posted in All Others, Singnet Fibre | 6 Comments »

Cisco SLM2008T SG200-08 smart switch settings for Singnet Fibre Internet and Mio TV

March 7th, 2012 by congyuan

It has been mentioned in many forum posts that Singnet uses the following VLAN for their services:

VLAN 10: Internet
VLAN 20: Mio TV/IPTV
VLAN 30: Mio Voice
VLAN 40: Management

The main purpose of using a managed switch with VLAN capability is to remove the 2Wire modem from the setup so a more powerful router can be used. In my case, I have a Zywall USG50 dual Wan router for my home internet. It has WAN VLAN function and I have been able to set it up VLAN 10 on the WAN port to surf internet, but not for the Mio TV.

Mio TV requires 802.1p set at 4 for VLAN 20.

This instruction covers the Internet and Moi TV, as I don’t subscribe the digital voice and still use the analogue line.

Port 1: ONT
Port 2: Mio TV STB
Port 3: Your own router

1. VLAN Management -> Create VLAN

VLAN ID VLAN Name Type
1 Default Default
10 internet Static
20 miotv Static
Create vlan
2. Port to VLAN
VLAN 10: 1(Tagged), 3(Untagged)
VLAN 20: 1(Tagged), 2(Untagged)
Port Vlan

3. Interface Settings
Entry No. Interface Mode PVID Frame Type Priority
1 g1 Trunk 1 Admit Tagged Only 0
2 g2 Access 20 Admit Untagged Only 4
3 g3 Access 10 Admit Untagged Only 0
Interface settings
Note: Mode can be set as Trunk instead of Access. It will not affect the internet nor miotv.

4. Quality of Service -> Qos Properties
Entry No. Interface Trust Mode
1 g1 trust all
2 g2 trust dot1p
3 g3 untrusted
Qos settings
Note: If you have other SIP devices (Gigaset A580IP, Linksys PAP2T etc) which has DSCP or 802.1p settings, please set the port g3 to untrusted, so those tags will be removed before sending out. If not, these packets with priority tags will be dropped by Singtel fibre. The other end will never receive the registration packets.

5. Save configuration

By now, you should be able to surf internet and watch miotv already.

Please post your comments if you get it to work or have problems.

Posted in Singnet Fibre | 15 Comments »