Set time range in Dial Plan
From Brekeke SIP Server v3.x, “$timerange” method can be used in Dial Plan rule to restrict a call session to apply a rule when specified time range requirement is met.
Syntax:
$timerange( timeBegin, timeEnd ) $timerange( timeBegin, timeEnd, timezone )
Returns:
true | false
Examples:
Example – 1:
-------------------------------
[Matching Patterns]
$request = ^INVITE
$timerange("9:00", "17:00") = true
--------------------------------
When the incoming call is between 9:00am and 5:00pm, the call will apply this rule.
Example – 2:
-------------------------------------------
[Matching Patterns]
$request = ^INVITE
$timerange("9:00", "17:00", "PST") = false
-------------------------------------------
When the incoming call is not between 9:00am and 5:00pm at timezone PST, the call will apply this rule.
$timerange method can accept timezone name, such as PST, CST…
With above timezone name, a summer time can be calculated automatically
With time zone setting as “GMT-n”, summer time cannot be calculated.
