NOTE: This is a work in progress – the project is not yet completed but all information here is functional
Challenge:
Begin a lightweight integration of Asterisk into an existing Altigen system, to initiate a piecemeal replacement of Altigen with Asterisk.
Goals:
- Immediate – Connect Altigen to an Asterisk VM using SIP Trunks, for secondary purposes.
- Intermediate – Integrate the two systems using T1 crossovers (see Asterisk Integration with Altigen) with Asterisk playing a more prominent role.
- Ultimate – Relegate Altigen to a secondary role, and no longer pay for support or proprietary technology.
Our Equipment
- (1) Altigen phone system, (v6.0) with support for SIP.
- (4) Altigen SIP Trunk Licenses
- (1) Working Asterisk VM
- Softphones (SJPhone)
Asterisk setup – Common
1. Edit /etc/asterisk/sip.conf to add Altigen as a SIP endpoint.
[alti_trunks_sip] ;”User Name” your will put in Altigen SIP trunk
type = friend
context = default
secret = password ;password you will put in Altigen SIP trunk
host = dynamic
disallow = all
allow = ulaw ;This is the only common codec between Asterisk & Altigen if you do not want to pay for G.723 and G.729
dtmfmode=inband ;When asterisk needs to transmit DTMFs to altigen, this is important.
Asterisk setup – Option 1 – AutoAttendent Routing
1. Edit your dialplan in /etc/asterisk/extensions.conf (I put this in my [default] context. We use 3-digit dialing)
exten => _XXX,1,Answer()
exten => _XXX,n,Set(_NUMBER=${EXTEN}) ;[macro-alti_AA_route] will uses this variable
exten => _XXX,n,Dial(SIP/alti_trunks_sip/0000,30,M(alti_AA_route)) ;Call altigen using the AA DNIS (0000 for us)
[macro-alti_AA_route]
exten => s,1,Wait(1) ; wait 1 second
exten => s,n,SendDTMF(${NUMBER}) ; send the 3-digits extension to AA
Altigen setup – Common
- Install SIP licenses, if they are not yet installed. Refer to Altigen or your support provider.
- Setup your SIP Trunks
- Double-click one of the SIP trunks, then click “Trunk Properties”
- Click “SIP Trunk Configuration
- Edit first channel.
- Enter your Asterisk IP Address
- Enter your username
- Enter your password (defined in sip.conf by “secret=…”)
- Setup Asterisk Codec Profile
- Launch VoIP Editor. (“VoIP” -> “Enterprise Network Management”)
- Click “Codec”.
- Click “Add” and create a new codec profile called “asterisk”.
- Select “asterisk” codec profile and set the codec to “G.711 Mu-Law”
- Set “SIP Early Media” to “Enabled”.
- Leave DTMF on “Default” (I did…but on the Asterisk side, it is set to “Inband”.
- Click “Servers”.
- Switch to “IP Codec” tab.
- Modify your IP ranges to add a gap for your asterisk server. Use the current “Codec Profile” (ex. 192.168.1.0, 192.168.1.209, Default)
- Create IP Range for your Asterisk, and use the “Asterisk” profile. (ex. 192.168.1.210, 192.168.1.210, Asterisk)
Altigen setup – Option 1 – AutoAttendent Routing
- Setup
- Setup virtual extension that direct call to special
Altigen setup – Option 2 – DNIS Routing
- Go to “PBX”->”In Call Routing…”
- Click “Add”. In “DNIS Number”, enter the number Asterisk will dial.
- Select the the destination for the call.
Altigen setup – Option 3 – DID routing
- Go into an extension.
- In the DID field, enter the number Asterisk will dial.