It occured to me that I never wrote up how I managed to get Asterisk working with my Cisco 1760 as an FXO gateway. So, here it is:
I have a Cisco 1760 that began it’s life as a CallManager Express (CME). After a while I transitioned it to an MGCP gateway for CM 4.1 and then just a SIP gateway for the same CM4.1 See, CallerID didn’t work for my VIC with MGCP, but it worked with SIP. Now the router is a SIP gateway for Asterisk, which is my primary system. Verizon comes into the FXO on the router and then is trunked via SIP to Asterisk. So…on to the configs. Here’s the important part of the router config:
voice rtp send-recv
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
timing hookflash-out 50
connection plar 401
dial-peer voice 8 pots
dial-peer voice 400 voip
session protocol sipv2
session target ipv4:192.168.x.x:5060
session transport udp
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
max-conferences 4 gain -6
I’m quite certain all of that is not necessary but it works, so I’ll leave it alone.
Here’s the config in AMP. I got this working through the raw config files but wanted to figure it out in AMP. If you’re going to use A@H and AMP it’s best to get it working through AMP. AMP has a nice habit of writing over certain files because it know’s it correct! Anyway, here’s the config for the SIP trunk:
Outbound caller-id: Set to your PSTN number (although I don’t think it matters)
Max Channels: Set to 2 but I think it should probably be 1
Dial Rules: Whatever’s appropriate for you situation
Outgoing Settings: trunk name should be something meaningful
Replace x.x with the address of the router. Make sure to add the insecure=very! I can’t tell you how important that is. I went round and round before stumbling across that. The partial tutorials on the intarweb don’t specify that. From what I can understand you need this because there’s no means of authenticating the SIP session with the router, aside from the source IP address.
Leave everything else blank. Don’t forget to add your outbound routing dial patterns.
That’s it. If someone has a comment please email me or leave it in the comments here.