Integration with Cisco Call Manager 4.2

I’m attempting to get Asterisk working and integrated with Cisco CallManager (CCM) 4.2 so that I can set up an asterisk system and access the resources of our main building at an off-site sale through a VPN.

My plan is to set up the system on our local LAN with no firewall on it and get it working there before first building the firewall and finally directing traffic through the VPN. By gradually doing it this way, I’ll know what any problems are due to; whether it be the Asterisk/CCM setup, the firewall, or due to the fact that it’s running through the VPN.

To that end, I’ve set up a FreeBSD 7.1 box on an Athlon 2100+ with a gig of RAM and installed Asterisk from the ports system. At first Asterisk would do nothing but seg fault on startup, but I found a bug in the FreeBSD port of Asterisk and a workaround, basically disable h323.

After some fighting, I was able to get x-lite (a SIP softphone) to register with the Asterisk system. Using a guide that I found on integrating Asterisk and CCM to create a SIP trunk in CCM, I had things semi-working. I could call from a Cisco phone to x-lite, but not the reverse. I was getting the following error in the Asterisk console when trying to dial from Asterisk to a Cisco phone:

pbx.c: No application 'Cut' for extension (macro-dialout-callmanager, s, 2)

By using google, I was able to determine that the cut function had been dropped from Asterisk and had been replaced by the set function. I fiddled with the configs a bit and got things working by replacing the Cut line with the following:

exten => s,2,Set(AVAILCHAN=${CUT(AVAILCHAN,,1)})

VOILA! :smiley: I was able to place calls to my Asterisk extensions from my Cisco phones and to my Cisco extensions from my Asterisk softphone! Perfect! Since outgoing calls should be routed to CCM and be handled from there, they should automatically by routed out our PRI by CCM, just as if the number were dialed from a Cisco phone, right? After all, the routes for outgoing calls as set up in CCM should handle it, right???

WRONG! :frowning:

I added some very basic call patterns to extensions.conf to simply pass whatever I dial to CCM and have tried every combination of settings I can think of on the CCM, but all I get is an error on the phone saying that the person is unavailable. There’s absolutely nothing of help in the Asterisk logs, nor anything spit out in the Asterisk console. The MySql database exists (I had to create it manually) and I added appropriate settings in the res_mysql.conf file for the database name, user name, and password, but there are no tables in the asterisk database, so I probably missed something in the initial set up in that regard. (I don’t see where that would affect the problem I’m having, but may provide more troubleshooting info if I can get it fixed.) I checked the CCM and there are CDRs for the failed calls, though not being an expert in IPT, I don’t know how to further analyze them.

My extensions.conf looks like:

exten => 3401,1,Dial(SIP/3401,,120)
exten => 3401,n,Hangup

include => outgoing

exten => s,1,ChanIsAvail(SIP/callmgr)
exten => s,2,Set(AVAILCHAN=${CUT(AVAILCHAN,,1)})
exten => s,3,Dial(${AVAILCHAN}/${ARG1})
exten => s,4,Hangup

exten => s,102,Congestion

exten => _35XX,1,Macro(dialout-callmanager,${EXTEN})
exten => _9XXXXXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _XXXXXXX,1,Macro(dialout-callmanager,${EXTEN})

exten => i,1,Congestion

sip.conf has the following information for the Cisco CallManager:


Note that I purposely put a lot of background detail into this post to aid those who might find it in the future when trying to accomplish something similar to save them the work and headaches I’ve had trying to get it working to this point. :smile:

Given that there’s a CDR in CCM, I’m thinking that the problem has to reside there, but don’t know what else to try; I’m by no means an expert in IPT and Cisco’s design seems overly complex anyways. (Not just in CallManager either… all the Cisco gear I’ve worked on seems to have about 4 levels of needless complexity built in.) I’m hopeful that somebody else has done something like this and will have an idea as to what I’m missing.

Thanks in advance for any pointers.

bump Anyone?

Nobody has any ideas? :frowning: Been fiddling with this all week trying different stuff and have the same status as Friday mid-afternoon. :cry:

Your problem is almost certainly on the Cisco side. You need to authorise calls from the Asterisk trunk. Unfortunately, I only did the Asterisk side of the connection, but the Asterisk side works with trivial dial plans (e.g. Dial(SIP/1234@192.168.x.x). I.e. it will work without any sip.conf configuration.

I got it figured out!!! :smiley: :smiley: :smiley:

Got it just before you posted that reply David, but you were exactly right. I was thinking that since there’s a CDR in the Cisco CM for the failed outbound calls, it’s gotta be something in there. Poked around in the settings for the trunk and it turns out that there are more options available after a trunk exists than it gives when you create one. The Calling Search Spaces (CSS) were both set to local extensions. I changed the AAR CSS to be unrestricted and BAM - started working immediately. I don’t know why, but changing the regular CSS did not work - it only works when the CSS is set to be our local pool and the AAR CSS is set to be unrestricted dialing.

Thank you very much for your response David. :smile:

OK, I posted too soon. The Calling Search Space box under the trunk controls in CCM controls where I can dial from Asterisk. If it’s set to local extensions, then I can’t dial out. If it’s set so that I can dial out, I’m unable to dial local extensions. The AAR CSS doesn’t seem to have any effect on it. Hmmmmm…

Found a solution. I had to create a new calling search space that contained both our local extension pool and the different ‘pools’ of outbound numbers. I set this to be the Calling Search Space of the trunk, set the AAR CSS (still dunno what it’s for) to none, and am now able to dial both local extensions and outbound calls from Asterisk. :smiley: