January 31, 2005

348 words 2 mins read

FXS's are a go!

Well its amazingly difficult to find documentation about how to make FXS’s work with Asterisk. I happen to have 4 FXS ports on the Cisco 3640, the same one that has four FXO ports. Below I’m including my configuration for use by others. The FXS port is configured as extension 600 (the Asterisk side configuration is also include).

Cisco 3640 Config

voice-port 0/0/0<br /> station-id name test<br /> station-id number 600<br /> !<br /> dial-peer voice 600 pots<br /> !600 above doesnt "mean" anything<br /> destination-pattern 600<br /> port 0/0/0<br /> !Any call matching 600 goes to port 0/0/0 (my FXS port)<br /> !<br /> ! the 2 groups below are calling plans for outgoing calls,<br /> ! be it from the FXS or FXO ports<br /> dial-peer voice 402 voip<br /> destination-pattern 2...<br /> !Matches '2' then 3 digits<br /> session protocol sipv2<br /> session target ipv4:192.168.xx.xx:5060<br /> !asterisk server IP<br /> codec g711ulaw<br /> no vad<br /> !<br /> dial-peer voice 401 voip<br /> destination-pattern 7..<br /> !matches 3 digits starting with a 7<br /> session protocol sipv2<br /> session target ipv4:192.168.xx.xx:5060<br /> !Asterisk server IP<br /> codec g711ulaw<br /> no vad<br /> !

Asterisk — Sip.Conf

[600]<br /> type=friend<br /> username=600<br /> host=192.168.xx.xx<br /> ; Cisco Router IP<br /> canreinvite=yes<br /> dtmfmode=inband<br /> qualify=1000

Asterisk — Extentions.conf

exten => 600,1,Dial(SIP/600,15,t)

I plugged in a wireless phone and was able to wander around the office calling other IP phones (including my “service” numbers, voicemail and the like, which I have at 2500). I was also able to receive calls. I was rather amused as it worked very very easily. I don’t know if DTMF would work in IVR systems (which I should have checked, but I didn’t). The only caveat I have is that all the Dial-plans I have for the 7960’s would have to be setup on the 3640 (1+10digits, 7+2, 2+3, etc). Note: If you have the router set to match a pattern of 2…. — It wont call through unless you dial 4 digits, it will just hang, much like your normal phones.