-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFailureHandler
24 lines (24 loc) · 879 Bytes
/
FailureHandler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
response = Map();
/*if(failed_response.get("action").equalsIgnoreCase("forward"))
{
code = cause.get("code").toNumber();
if(code == 1001)
{
// Outside business hours
response.put("action","reply");
response.put("replies",{"It seems that this is off working hours for us","Leave us a message and we will get back to you"});
}
else if(code == 1002)
{
// operators_not_available
response.put("action","reply");
response.put("replies",{"All our agents are busy at the moment","Leave us a message and we will get back to you"});
}
else if(code == 1003)
{
// invalid_operators - Operators may be disabled or invalid
response.put("action","reply");
response.put("replies",{"All our agents are busy at the moment","Leave us a message and we will get back to you"});
}
}*/
return response;