← Volver al índice de módulos

tmrec

This module provides time recurrence matching functions. The format of recurrence definitions is based on Internet Calendaring and Scheduling Core Object Specification (Calendar COS - RFC 2445).
🛠️ Utilidades y Varios Kamailio 6.1 2 parámetros 6 funciones

Descripción general

This module provides time recurrence matching functions. The format of recurrence definitions is based on Internet Calendaring and Scheduling Core Object Specification (Calendar COS - RFC 2445). It also provides a port of the Perl Time::Period module for generic time period matching.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/tmrec.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/tmrec

Parámetros de configuración

ParámetroTipoDescripción
separator str 3.1. separator (str)
separator str Separator character used to delimit attributes in time recurrence definitions.

Funciones exportadas

tmrec_match(timerec [, timestamp])

4.2. is_leap_year([year]) 4.3. time_period_match(period [, timestamp])

is_leap_year([year])

4.3. time_period_match(period [, timestamp])

time_period_match(period [, timestamp])

4.1. tmrec_match(timerec [, timestamp])

tmrec_match(timerec [, timestamp])

Match a time recurrence rule against the timestamp (UNIX epoch format). If the timestamp parameter is missing, the current UNIX epoch time is used.

is_leap_year([year])

Return true if the value from parameter is a leap year. If the parameter is missing, then the year from the current time is taken.

time_period_match(period [, timestamp])

Matches the point in time specified by the timestamp parameter, or the current time if the parameter is missing, against the given period specification. Returns 1 if it matches, -1 if it doesn't, and a value <= -2 if there was an error.

Autores y contribuidores

Daniel-Constantin Mierla <miconda@gmail.com>Alex Balashov <abalashov@evaristesys.com>Richard Fuchs <rfuchs@sipwise.com>

Copyright © 2012 asipto.com
Copyright © 2012 Sipwise GmbH

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj