Timed Feature Code

I have a feature code that when used will route all calls to a recording and hang up. I would like this feature to self reverse / disable itself after 20 min. It is for a phone order service that has to many orders and will tell customers alternatives and or to call back later.
Any ideas

Dear David … I think i accidently deleted you post :frowning: :face_with_open_eyes_and_hand_over_mouth:

I deleted it. I answered in an Asterisk context, then realised I was on the FreePBX forum.

You could create a call file /tmp/call.file, and touch it 20 minutes in the future

.
.
touch  -d  @$(( $(date +%s) + (20 * 60) )) /tmp/call.file
mv -f /tmp/call.file /var/spool/asterisk/outgoing/call.file
1 Like

Edit: @dicko beat me to it, with better instruction too :slight_smile:

There are likely many ways to do this. One idea I have is custom dialplan when the feature code is dialed.

Make a custom feature code:

  • At the time of dial, a callfile is moved to the outgoing folder with a touch command with a 20 minute timer.
  • After the callfile is created and touched, route to the orignal feature code, turning it on.
  • After 20 minutes the call file moves automatically and dials the original feature code, turning it off.

thank you for the guidance… i am not that provisioned with command line. However i think i understand.

I currently use a CallFlowToggle *2899 where the
“Normal Flow” goes to the regular routing
and the
“Override Flow” points to an announcement and hangs up after playback … it works by using the feature code.

How would i implement the suggestes call file. I use MobaXTerm to SSH in to somtime follw the suggestions for fixes … many of yours in the past that i cut and pasted … they saved me more than once … could you elaborate a litle mor please.

http://the-asterisk-book.com/1.6/call-file.html
@dicko linked you an example of the call file and also the shell/system command you would need to incorporate.

https://wiki.freepbx.org/display/FPG/Custom+Destinations+User+Guide

https://wiki.freepbx.org/display/FDT/FreePBX+Dialplan+Customization

Here you go. Reading these should give you a great base.

Thank you … I will read and report back …

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.