Asterisk Integration with Altigen via SIP Trunks

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

  1. Install SIP licenses, if they are not yet installed. Refer to Altigen or your support provider.
  2. Setup your SIP Trunks
    1. Double-click one of the SIP trunks, then click "Trunk Properties"
    2. Click "SIP Trunk Configuration
    3. Edit first channel.
      1. Enter your Asterisk IP Address
      2. Enter your username
      3. Enter your password (defined in sip.conf by "secret=...")
  3. Setup Asterisk Codec Profile
    1. Launch VoIP Editor. ("VoIP" -> "Enterprise Network Management")
    2. Click "Codec".
    3. Click "Add" and create a new codec profile called "asterisk".
    4. Select "asterisk" codec profile and set the codec to "G.711 Mu-Law"
    5. Set "SIP Early Media" to "Enabled".
    6. Leave DTMF on "Default" (I did...but on the Asterisk side, it is set to "Inband".
    7. Click "Servers".
    8. Switch to "IP Codec" tab.
    9. 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)
    10. 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

  1. Setup
  2. Setup virtual extension that direct call to special

Altigen setup - Option 2 - DNIS Routing

  1. Go to "PBX"->"In Call Routing..."
  2. Click "Add". In "DNIS Number", enter the number Asterisk will dial.
  3. Select the the destination for the call.

Altigen setup - Option 3 - DID routing

  1. Go into an extension.
  2. In the DID field, enter the number Asterisk will dial.



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

  1. Install SIP licenses, if they are not yet installed. Refer to Altigen or your support provider.
  2. Setup your SIP Trunks
    1. Double-click one of the SIP trunks, then click "Trunk Properties"
    2. Click "SIP Trunk Configuration
    3. Edit first channel.
      1. Enter your Asterisk IP Address
      2. Enter your username
      3. Enter your password (defined in sip.conf by "secret=...")
  3. Setup Asterisk Codec Profile
    1. Launch VoIP Editor. ("VoIP" -> "Enterprise Network Management")
    2. Click "Codec".
    3. Click "Add" and create a new codec profile called "asterisk".
    4. Select "asterisk" codec profile and set the codec to "G.711 Mu-Law"
    5. Set "SIP Early Media" to "Enabled".
    6. Leave DTMF on "Default" (I did...but on the Asterisk side, it is set to "Inband".
    7. Click "Servers".
    8. Switch to "IP Codec" tab.
    9. 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)
    10. 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

  1. Setup
  2. Setup virtual extension that direct call to special

Altigen setup - Option 2 - DNIS Routing

  1. Go to "PBX"->"In Call Routing..."
  2. Click "Add". In "DNIS Number", enter the number Asterisk will dial.
  3. Select the the destination for the call.

Altigen setup - Option 3 - DID routing

  1. Go into an extension.
  2. In the DID field, enter the number Asterisk will dial.



Created by: bllewellyn, Last modification: Wed 21 of Jul, 2010 (21:13 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+