So several months ago I moved our small office over from a Windows 2000 box running some Microsoft built-in IP telephony software, to an Asterisk PBX. Now I’ll admit I knew almost nothing about Asterisk, or Cisco hardware. Since then I’ve made major strides. Yesterdays project was to see if I could get a Cisco 3640 router with 4 FXO ports to connect to Asterisk. I did, and I got it to work.
If your trying to do the same thing, I have a few suggestions (that were painful to find out). While making one call in is easy, getting key tones to carry over is a different story. I’m putting in the configs I used below, in case it helps anyone else: (Note: I’m using SIP & ULAW codec since its inside a LAN. I suggest that the connection from the Cisco unit be ULAW, while it takes the most bandwidth, it keeps the best quality, and allows for DTMF to work.
Asterisk – SIP.Conf:
host=192.168.xx.xx ; IP address of Cisco gateway
Cisco – running-config
input gain 10
output attenuation 10
connection plar 2900
description test input line1
ring number 2
dial-peer voice 400 voip
!400 above doesnt actually mean anything
!match patter from voice port
session protocol sipv2
session target ipv4:192.168.xx.xx:5060
!IP address of asterisk server
!Some how this DTMF works with 'dtmfmode=inline', in asterisk
!IP Asterisk server
Quick explanation above. A call comes into slot 2, VIC0, port0 (While VIC’s are labeled and so are the port numbers, if you need to know how the slot numbering works you can google it or I found this on Cisco’s site for 3640′s) and its sent to peer 2900 on the asterisk server. Peer 2900 can be your IVR (which is what I have) or it can be a normal extension. Most of the configs for the Cisco are self explanatory, but if your interested in VoIP on your 3600 series router, take a look at this product guide.