Trying to divert an incoming call with dial plan
Posted: Tue Feb 05, 2013 4:24 pm
I have a couple of incoming numbers that I need to divert to null, or hangup on without ringing the ATA or even better diverting to on-hold music so that they get charged for the initial connection even if they then hang up.
I've taken a look at the Ruby dialplan that I have that works well for me and certainly don't want to break anything.
The incoming calls bit is currently very simple...
What I want to do is allow all calls to be handled as at present except for those which have CallerID displayed with a specific format 008000nnnnnnn
Ideally I'd like to generate an Email alert that a call has been handled in this way so that I can monitor what is going on.
Sadly I'm finding the various bits of DialPlan documentation rather dense.
Anyone offer a pointer to the way forward?
Thanks in advance.
Andrew
I've taken a look at the Ruby dialplan that I have that works well for me and certainly don't want to break anything.
The incoming calls bit is currently very simple...
Code: Select all
# Incoming Calls
sys.Log("Incoming call to #{req.URI.User}.")
# Call forwards.
end
Ideally I'd like to generate an Email alert that a call has been handled in this way so that I can monitor what is going on.
Sadly I'm finding the various bits of DialPlan documentation rather dense.
Anyone offer a pointer to the way forward?
Thanks in advance.
Andrew