Open ysbaddaden opened 1 year ago
I removed the "bug" label, because even though we don't respect scheduled hours for SMS messages, we didn't have the mean to fix the the problem before. We now have the ability to finally implement the feature.
Related #2288
Nuntium doesn't have time schedules like Verboice has, so Surveda previously didn't have any mean to prevent messages from being sent after hours, that is after the scheduled time window ended for the day.
The channel-broker didn't fix this issue. It acts as a dam to avoid spamming and overflowing the Nuntium servers, but when the time window ends for the day, knowing nothing about the scheduled time for contacts, all messages queued during the time window will be sent, until the queue is emptied. This will happen at some point because the survey-broker noticed that the time window has ended and won't poll the survey anymore.
Surveda now as a way to fix the issue.
Ask.Runtime.Channel
can compute and pass thenot_before
andnot_after
attributes for the SMS modes, as it does for IVR mode, and pass them toAsk.Runtime.ChannelBroker.ask
, allowing the channel-broker to respect the scheduled time: keep messages in queue untilnot_before
and skip messages whennot_after
is reached.Of course, this has no impact on currently active contacts (responses are sent immediately, regarless of the scheduled time, only on new contacts and retries).