Hey guys, I’ve got an interesting request and I quite frankly don’t know if it’s even possible. I just recently changed our Cisco phones to run on Skinny firmware with the chan-sccp-b module and it changed the way our reject button works. It used to be that if I pushed reject (or iDivert as Cisco calls it), the phone would simply send a busy signal back to Asterisk and the call would handle as normal. With the new firmware, the phone actually transfers the call to an extension that I can define in its configuration.
What I’d like to do is make a custom feature code of sorts that sends the call to one of two destinations based on where it came from. Right now we have a ring group for our main inbound number which rings all the phones in our office, and I also have my own inbound number that goes directly to my phone. I’d like to make it so that if I press reject on my phone on the main line then it goes to the main voicemail, and if it’s to my direct line I’d like it to go to my personal voicemail. Is there any way to do this? Thanks in advance!
Actually, it should be about as simple as your describe it. The DID is available to you, so setting up a custom context that sorts out the “ring-group” DID versus the “direct” DID should be trivial.
Do you have any idea how something like this might be done? I know almost nothing about custom dialplans.
Yeah. I don’t have the code handy, but this is a reasonably easy context to create, so this would be a good starter project.
Start by looking in /etc/asterisk/extensions.conf. Look for the phrase “DID”. That will give you a reference to the data you are looking for.
It will probably go in the “extensions_custom.conf” file and probably start with something like “[context_name_custom]” (I don’t know which context it needs to go into) and go something like “9876,1,NoOp(“This is a special context”)”. The format for context lines is “Extension,step,action” where extension is either a “dialed number” or one of the special contexts (‘s’,‘h’,etc.) . This way, when you send your iDivert to 9876, the system will know this is the code you want to execute.
There’s a document on the system (@tm1000 or @jfinstrom might be able to help with a link) that talks about creating your first custom context.
Got it figured out, actually! Did lots of playing around and experimenting. It’s hackish, but it works. Thanks for at least giving me a kick in the right direction!