my working dialplan is
Code: Select all
# BLACKLIST
case req.Header.from.FromURI.User.to_s
when /^5255917xxxxx/ then sys.Email(ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery blacklisted from ", " #{req.Header.From.FromURI.User}.")&sys.Respond(403, "Forbidden")
when /^anonymous/ then sys.Email(ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery blacklisted from ", " #{req.Header.From.FromURI.User}.")&sys.Respond(403, "Forbidden")
when /^523339490009/ then sys.Email(ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery blacklisted from ", " #{req.Header.From.FromURI.User}.")sys.Respond(403, "Forbidden")
end)
# VOICEMAIL
case req.Header.from.FromURI.User.to_s
when /^5255917xxxxx/ then sys.Email(ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery Voicemail from ", " #{req.Header.From.FromURI.User}.")&sys.Dial("1777249xxxxx@in.callcentric.com")
when /^anonymous/ then sys.Email(ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery Voicemail from ", " #{req.Header.From.FromURI.User}.")&sys.Dial("1777249xxxxx@in.callcentric.com")
when /^523339490009/ then sys.Email(ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery Voicemail from ", " #{req.Header.From.FromURI.User}.")&sys.Dial("1777249xxxxx@in.callcentric.com")
end)
Code: Select all
NotificationBlacklist = "ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery blacklisted from ", " #{req.Header.From.FromURI.User}."
NotificationVoicemail = "ubj9BBv8PuvLUFV5ydscg@api.pushover.net", "Sipsorcery Voicemail from ", " #{req.Header.From.FromURI.User}."
# BLACKLIST
case req.Header.from.FromURI.User.to_s
when /^5255917xxxxx/ then sys.Email( NotificationBlacklist )&sys.Respond(403, "Forbidden")
when /^anonymous/ then sys.Email( NotificationBlacklist )&sys.Respond(403, "Forbidden")
when /^523339490009/ then sys.Email( NotificationBlacklist )&sys.Respond(403, "Forbidden")
end)
# VOICEMAIL
case req.Header.from.FromURI.User.to_s
when /^5255xxxxxxx/ then sys.Email( NotificationVoicemail )&sys.Dial("1777249xxxx@in.callcentric.com")
when /^anonymous/ then sys.Email( NotificationVoicemail )&sys.Dial("1777249xxxx@in.callcentric.com")
when /^52333xxxxxxx/ then sys.Email( NotificationVoicemail )&sys.Dial("1777249xxxx@in.callcentric.com")
end