# Choosing Voice Notification Numbers Based On Time Of Day

**URL:** <https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976>\
**Category:** Ignition\
**Created:** [April 3, 2017, 9:18pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976 "2017-04-03T21:18:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [April 3, 2017, 9:18pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976/1 "2017-04-03T21:18:42Z")

</div>

Hey all,

Is there a way to choose which phone number gets called based on time of day?

For example:  
I have two phone numbers set for a user. One is an internal phone extension (format xxxx), the other is an external cell number (format 9-1-xxx-xxx-xxxx). I would like to call the internal extension when it’s in a specific time range and call the cell number in a different time range.

I can’t see an obvious way of doing this, maybe with some scripting in a pipeline? I use AD so I can’t make fake user accounts to tie to just a cell number of something like that.

---

<div class="post-metadata">

**Author:** ![abishur](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/abishur/32/9096_2.png) [@abishur](https://forum.inductiveautomation.com/u/abishur)\
**Post date:** [April 4, 2017, 1:48pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976/2 "2017-04-04T13:48:14Z")

</div>

My off the cuff way of doing this would be to create unique “On-Call Rosters” in the gateway based on who to call. So let’s say you have Jim, Jane, and John and you have two different time periods. Make two-rosters (let’s say day shift and night shift) and then assign the users to each one. The same person can be assigned to multiple rosters so if, for example, Jane was to get called no matter what, then you wouldn’t have to make a fake account for her, just put her on both of them.

Then in the Ignition designer create a pipeline. Go from start to an expressions. Using something like

```auto
getHour24(now(60000)) >= 8 AND getHour24(now(60000)) <= 5
```

in the expression would let you go to one notification when you’re during normal business hours and a different one during after hours. If you had more time frames than just two, create more rosters and add in either a splitter or use a switch to go to the appropriate notifier.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [April 4, 2017, 3:28pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976/3 "2017-04-04T15:28:01Z")

</div>

Yeah, I see what you’re saying about rosters. I have a little different situation though. I have some users that need to be contacted during different time frames but in one time frame they need to be contacted on an internal extension number and another time frame, when they are not physically at the plant anymore, they need to be contacted on a cell phone. I don’t want to ring the cell phone all day long, just the times when no one is at the plant. I have two phone numbers assigned to each user, I’m interested in finding out if there is a way to distinguish between those numbers in the pipeline or if there is a way to force the voice notification module to use one or the other phone numbers when it dials out.

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [April 4, 2017, 7:14pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976/4 "2017-04-04T19:14:16Z")

</div>

your only option may be to setup 2 different users and use the schedule option.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [April 5, 2017, 7:11pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976/5 "2017-04-05T19:11:45Z")

</div>

It’s possible to add users from different user sources into the same roster, correct? I can make a different user source just for adding in other contact information.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 5, 2017, 10:46pm UTC](https://forum.inductiveautomation.com/t/choosing-voice-notification-numbers-based-on-time-of-day/13976/6 "2017-04-05T22:46:37Z")

</div>

Yes, a roster can contain users from any user source.
