]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add min of day to time rules
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 27 Jul 2009 16:59:32 +0000 (16:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 27 Jul 2009 16:59:32 +0000 (16:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14378 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c

index 24e945084a2e989fa9c2f6adb2d9492014fcc2f4..39b454039a21e49871b74d38b50fe91e063c7190 100644 (file)
@@ -74,6 +74,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
                const char *xwday = switch_xml_attr(xcond, "wday");
                const char *xhour = switch_xml_attr(xcond, "hour");
                const char *xminute = switch_xml_attr(xcond, "minute");
+               const char *xminday = switch_xml_attr(xcond, "minute_of_day");
                switch_time_t ts = switch_micro_time_now();
                int time_match = -1;
                switch_time_exp_t tm;
@@ -120,6 +121,10 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
                if (time_match && xminute) {
                        time_match = switch_number_cmp(xminute, tm.tm_min + 1);
                }
+
+               if (time_match && xminday) {
+                       time_match = switch_number_cmp(xminday, (tm.tm_hour * 60) + (tm.tm_min + 1));
+               }
                
                field = (char *) switch_xml_attr(xcond, "field");