[Asterisk-Users] "night" mode ideas
Chris A. Icide
chris at netgeeks.net
Sun Nov 7 14:25:36 MST 2004
[features]
exten => 001,1,DBPut(FEATURE/STATUS=1)
exten => 001,2,Hangup
exten => 002,1,DBPut(FEATURE/STATUS=2)
exten => 002,2,Hangup
exten => 003,1,DBPut(FEATURE/STATUS=3)
exten => 003,2,Hangup
[inbound]
exten => s,1,DBGet(STATUS=FEATURE/STATUS)
exten => s,2,GotoIf($[${STATUS} = 1]?ringall,s,1)
exten => s,3,GotoIf($[${STATUS} = 2]?ringone,s,1)
exten => s,4,GotoIf($[${STATUS} = 3]?ringvoicemail,s,1)
exten => s,5,NoOp(STATUS is UNSET, please set STATUS immediately by dialing
001,002, or 003)
exten => s,6,Hangup
where ringall is the context that handles ringing X, Y, and Z
ringone is the context hangling ringing Z only
ringvoicemail is the context sending the caller to Voicemail immediately
You can have a cron command like such
* 21 * * 1,2,3,4,5 asterisk -rx "database put FEATURE STATUS 3"
* 8 * * 1,2,3,4,5 asterisk -rx "database put FEATURE STATUS 1"
This should do what you described below
-Chris
On 12:30 PM 11/7/2004, Tom Lahti wrote:
>Hi all. I have a system I'm going to build that I have a pretty good idea
>how I'm going to accomplish this feature, but I was wondering if anyone had
>a better idea/method since mine seems somewhat "hackish" for some reason I
>can't explain :)
>
>The system wants to have different incoming call handling more-or-less
>based on time of day, but we don't want it to be at some precise UNIX time,
>but rather under human control, so if people stay late they can keep it in
>a more appropriate mode.
>
>What we're looking for is a way for someone on the system to pick up an
>extension and dial some code that changes the incoming call context, i.e.
>manually switching incoming call handling. We want incoming calls to ring
>extension X->Y->Z in one mode, ring only Z in a second mode, and only take
>voicemail in a 3rd mode. Th idea I came up with to solve this was to code
>a special extension for each mode that used Authenticate() and then
>System() to copy a different extensions.conf into place and restart
>Asterisk for each mode. Restarting seems a bit harsh since it will drop
>any calls in progress.
>
>There would also be a cron job that would swap modes if they hadn't been
>swapped by some time of day.
>
>Does this sound like a reasonable solution, or do any of the experts (ahem,
>not me) have a more elegant solution idea?
>
>--
>Tom
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041107/791d69eb/attachment.htm
More information about the asterisk-users
mailing list