3 # You may not want this.
5 # If and only if your telephony A/T templates ...
7 # 1. generate callfiles that include the token 'DAHDI' for notifications that
8 # the system should actually dial
9 # 2. generate callfiles that include the token 'noop' when notifications
10 # should NOT be attempted
12 # ... would you want this. If you meet these conditions, read on.
16 # This heuristic finds call files that don't containt 'DAHDI' but do contain
17 # 'noop', and appends a line to those files for the benefit of the
18 # get_failures() method of eg-pbx-mediator.pl, and moves these files to the
19 # directory where they would land if they were call files which Asterisk
20 # had attempted and failed.
22 # The purpose of this is to support a special case of the "rollover failed
23 # phone notices to print notices" functionality. Notices that never reach
24 # Asterisk because of a lack of patron phone number are still expected to
25 # rollover to print notices.
27 # XXX todo: get rid of this script, and incorporate into eg-pbx-allocator.pl,
28 # or at least don't have hardcoded paths here
30 grep -L DAHDI EG*.call 2>/dev/null |
32 xargs -I X sh -c 'echo "Status: Untried" >> X ; mv X /var/spool/asterisk/outgoing_done' 2>&1 > /dev/null
34 # If you know your deployment doesn't use the "rollover failed phone notices
35 # to print notices" functionality, you could comment out the chain of commands
36 # above, and uncomment the simpler one below. This assumes you still meet
37 # the two initial requirements in the top comments in this script.
39 # grep -L DAHDI EG*.call 2>/dev/null |
40 # xargs grep -l noop | xargs rm -f 2>&1 > /dev/null