January 30, 2005

381 words 2 mins read

Yea for PBX's

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:

[192.168.xx.xx]<br /> type=friend<br /> host=192.168.xx.xx ; IP address of Cisco gateway<br /> dtmfmode=inband<br /> disallow=all<br /> allow=ulaw

Cisco — running-config

voice-port 2/0/0<br /> input gain 10<br /> output attenuation 10<br /> no comfort-noise<br /> connection plar 2900<br /> description test input line1<br /> ring number 2<br /> !<br /> dial-peer voice 400 voip<br /> !400 above doesnt actually mean anything<br /> destination-pattern 2900<br /> !match patter from voice port<br /> session protocol sipv2<br /> session target ipv4:192.168.xx.xx:5060<br /> !IP address of asterisk server<br /> dtmf-relay cisco-rtp<br /> !Some how this DTMF works with 'dtmfmode=inline', in asterisk<br /> codec g711ulaw<br /> no vad<br /> !<br /> sip-ua<br /> sip-server ipv4:192.168.xx.xx<br /> !IP Asterisk server<br /> !

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.