Menu

hangup-message "Office Closed" Script

eikaff
2016-07-08
2016-07-15
  • eikaff

    eikaff - 2016-07-08

    Since a i needed to hangup with a specific message all calls between specific time of the day i thought about this simple script.

    whitelist=/etc/ncid/ncidd.whitelist
    
    if [ "${TIME}" -ge 1330 -a "${TIME}" -le 1530 ]
              then
                if grep -R ${NMBR} $whitelist
                    then
                      echo "OK"
                    else
                      echo "Recording: officeisclosed.rmd"
                      echo "hangup"
                fi
    fi
    

    It states as follows, if call time is between 13:30 and 15:30 then check if number is in the whitelist file, if not, then hangup with offceisclosed.rmd message (announce file is inside /usr/share/ncid/recordings).

    It's quite simple and it works good. Hope should be useful for someone.

     
  • John L. Chmielewski

    What a great little script. It provides a new use for the external hangup.

    I can include a modified version of your script in the next NCID release if you provide the recording in pvf and rmd formats as post attachments. The modification would be mostly comments and adding some defines.

     
  • eikaff

    eikaff - 2016-07-14

    Sorry for late reply, sourceforge was offline.
    Here is Italian Language "Office is Closed"(female voice) recording. If you would like i can provide an English Version of them.

    p.s.: Obviously they have a personalized from "TIME" to "TIME", so you have to record new one if you need to change opening hours.

     

    Last edit: eikaff 2016-07-14
  • eikaff

    eikaff - 2016-07-15

    Updated, just check if it's clear enough.

    Best regards. :)

     

Log in to post a comment.