so I want to achieve 2 things.
1) for a reason the whitelist does not work. the numbers that are local phones are refused if the call is between the 300..700 that is 3 am to 7 am
2) instead of refuse the call. i want that voice mail answer the calls between that range how I can implement that. my voicemail is at 177724xxxxx@in.callcentric.com
thanks so much
# ******************** i n c o m i n g C a l l *************************
def incomingCall
sys.SetFromHeader(formatNum(@cname || @cid,true), nil, Host) # Set FromName & FromHost for sys.Dial
# Forward call to the bindings (ATA / softphone)
# Change FromURI when forwarding to @local, or else Bria won't find contact in its phonebook!
WhiteList = [
'10311702',
'15920766',
'38240083',
'10319999',
'36420040',
'38130134',
'10312255',
]
if !((300..700) === @t.hour*100 + @t.min) or WhiteList.map {|n| to_ENUM(n)}.include?(@cid)
callswitch("#{@user}@local&177724xxxxx@in.callcentric.com[dt=24][fu=#{@cid}]",45)
end
@code, @reason = 480, "#{@user} is asleep" unless @code # if nothing else, must be the night hour
@code = 486 if @trunk =~ /IPCOMM/i ## *** temporary fix for IPCOMMS ***
end