This article describes how I successfully configured the Sipura SPA-3000 (fw 2.0.13) for use as a single line inbound/outbound trunk within Asterisk at Home (asterisk 1.2.1). Unlike the other examples I found, this configuration is fairly simple and does NOT require configuration of special extensions, etc. This configuration should be fairly secure, but any suggestions and/or feedback are very welcome!

When incoming calls are received by the SPA-3000, they are forwarded to the Asterisk PBX with CALLER ID information and can be routed like any other POTS trunk (ie: as per Incoming Calls config and/or Inbound Routing config by CID). When outgoing calls are placed through the SPA-3000, this device dials the number and connects the call. The person making the call WILL hear the DTMF tones (aka touch tones) that are dialed by the SPA-3000 just before the call is connected. I have not been able to find a way of preventing this (yet).

Configuring Trunk within Asterisk PBX using AMP

Login to AMP (Asterisk Management Portal). Navigate to Setup, Trunks, and choose “Add SIP Trunk”.

General Settings

1.Outbound Caller ID:    (leave blank - cannot be used by POTS line)
2.Maximum Channels:  1   (required - see note below)

NOTE: Each SPA-3000 supports a single channel. You need to setup multiple trunks for multiple SPA-3000 devices.

Outgoing Dial Rules

1.Dial Rules:
2.1+NXXNXXXXXX        ; prefix 10 digit dialing with "1"
3.1NXXNXXXXXX     ; allow all 11 digit dialing as-is
4.NXXXXXX         ; allow all 7 digit dialing as-is

Outgoing Settings

01.Trunk Name: pstn_spa01
02. 
03.Peer Details:
04.auth=md5
05.context=from-pstn
06.dtmfmode=inband
07.fromuser=asterisk
08.host=10.10.10.21    ; IP address of SPA device
09.insecure=very
10.nat=yes         ; omit if no NAT exists between PBX and SPA
11.port=5061
12.secret=012345678901
13.type=peer
14.username=asterisk

Incoming Settings

01.User Context: spa01
02. 
03.User Details:
04.allow=ulaw
05.context=from-pstn
06.disallow=all
07.dtmfmode=inband
08.host=10.10.10.21    ; IP address of SPA device
09.insecure=very
10.nat=yes         ; omit if no NAT exists between PBX and SPA
11.secret=KzBTALezmG1a
12.type=friend

Registration

1.Register String:    ; omit - not necessary to register w/ SPA device?

Configuring Outbound Routing within Asterisk PBX using AMP

Login to AMP (Asterisk Management Portal). Navigate to Setup, Outbound Routing, and choose “Add Route”.

Add Route

01.Route Name:     ; user preference, avoid special characters here?
02.pstnspa1
03. 
04.Dial Patterns:      ; dial 5 plus 11 digit, 10 digit, and 7 digit numbers
05.; omit each "5|" to use trunk without dialing prefix
06.5|1NXXNXXXXXX       ; accept 5 + 11 digit dialing
07.5|NXXNXXXXXX        ; accept 5 + 10 digit dialing
08.5|NXXXXXX       ; accept 5 + 7 digit dialing
09. 
10.Trunk Sequence:     ; add each available SPA-3000 trunk
11.SIP/pstn_spa01
12.SIP/pstn_spa02
13.SIP/pstn_spa03

Configuring the Sipura SPA-3000

The following example only illustrates changes to default settings. Start by performing a factory reset of your SPA-3000. Connect a handset to the PHONE jack on the SPA-3000 and dial “****” to access the configuration menu, then dial “73738#” (aka “RESET#”) to perform a factory reset.

Login to the web interface of your SPA-3000, click “Admin”, then click “Advanced”. Configuration changes for each tab/page are shown below.

SYSTEM

01.USER PASSWORD:      secretpwd       ; secures the SPA web interface
02.; username 'user' or 'admin'?
03. 
04.DHCP:           no          ; recommend static ip address
05.STATIC IP:      10.10.10.21
06.NETMASK:        255.255.255.240
07.GATEWAY:        10.10.10.30
08. 
09.HOSTNAME:       voip-spa1       ; optional
10.DOMAIN:         example.net     ; optional
11.PRIMARY DNS:        10.10.10.2      ; optional
12.SECONDARY DNS:      10.10.10.3      ; optional
13.PRI NTP:        ntp1.example.net    ; optional
14.SEC NTP:        ntp2.example.net    ; optional

SIP

1.RTP Packet Size:    0.020       ; improves sound quality (was 0.030)?

REGIONAL

1.TIME ZONE:      GMT-05:00   ; Central Time Zone

PSTN LINE

01.NAT Mapping Enable: yes ; only change if NAT exists between PBX and SPA
02.NAT Keep Alive Enable:  yes ; only change if NAT exists between PBX and SPA
03. 
04.PROXY:          10.10.10.24 ; IP address of Asterisk PBX
05.USE OUTBOUND PROXY: yes
06.REGISTER:       no
07.REGISTER EXPIRES:   3600
08.MAKE CALL W/O REG:  yes
09.ANSW CALL W/O REG:  yes
10. 
11.DISPLAY NAME:               ; leave blank
12.USER ID:        3501        ; optional?
13.PASSWORD:               ; leave blank
14. 
15.DTMF Process INFO:  Yes     ; default value
16.DTMF Process AVT:   No      ; resolve issues with DTMF
17.DTMF Tx Method:     Auto        ; default value
18. 
19.DIAL PLAN 8:        (S0<:s@10.10.10.24:5060>)
20.; forwards incoming PSTN calls to PBX
21.; resolve issues with DTMF
22. 
23.VOIP-TO-PSTN GW ENABLE: yes
24.VOIP CALL AUTH METHOD:  http digest
25.ONE STAGE DIALING:  yes
26.LINE1 VOIP CALLER DP:   none
27.VOIP CALLER DEFAULT DP: none
28.LINE1 FALLBACK DP:  none
29. 
30.VOIP USER 1 AUTH ID:    asterisk
31.VOIP USER 1 DP:     none
32.VOIP USER 1 PASSWORD:   012345678901
33. 
34.PSTN-TO-VOIP GW ENABLE: yes
35.PSTN CALL AUTH METHOD:  none
36.PSTN RING THRU LINE 1:  no      ; incoming calls do not ring LINE1
37.PSTN CID FOR VOIP CID:  yes
38.PSTN CALLER DEFAULT DP: 8
39. 
40.PSTN ANSWER DELAY:  5       ; answer incoming PSTN call in X sec
41.; need to allow time for CALLER ID
42.if no CID, you can safely set to 0
43.; was set to 16

Note regarding FAX transmissions


http://jrklein.com/2006/10/15/configuring-sipura-spa-3000-as-trunk-within-asterisk-voip-pbx-server/

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 安德森 的頭像
    安德森

    安德森技術備忘板

    安德森 發表在 痞客邦 留言(0) 人氣()