Business app bridge
Connect FreeSWITCH Website
Website widgets for phone schedules.
Working schedules already decide how FreeSWITCH routes an inbound call — weekly hours from a resource.calendar, public holidays with an optional spoken prompt, and special working days that override both. This module takes that same computed schedule and publishes it, so the hours printed on the website and the hours the phone system actually enforces cannot drift apart.
It ships two website-builder blocks. Phone Status is a footer-sized element: the number, a green or red dot, and a line telling the visitor when it will next be reachable. Phone Opening Hours is a table for a contact page, listing the effective windows for a chosen number of days ahead, with public holidays and special working days named where they apply. Both are configured entirely from the editor panel — pick a number, set a couple of options — and both are localized into the visitor’s language from the schedule calendar’s timezone.
Unlike the Connect app bridges, this one is tied to a specific backend by nature: the schedule lives on a FreeSWITCH DID, so it is connect_freeswitch that it extends. The public surface is deliberately thin — two read-only JSON endpoints that answer for scheduled numbers and 404 for everything else.
What it offers
-
Phone Status block for footers
A drag-in snippet that renders the number with a green or red indicator and, optionally, the reason: available until 16:00, opens tomorrow 08:00, or opens Thursday 08:00. The state is read live from the working schedule attached to the DID, so it is never a hand-edited claim that goes stale.
-
Phone Opening Hours table
A second snippet for contact pages listing the effective opening hours day by day for the next N days, with each day's windows joined into one line and closed days marked Closed.
-
Configured in the website editor
Both blocks are configured from the builder panel, not in code: a phone-number picker limited to numbers with a schedule, Show Time, a
tel:Phone Link toggle and a Status Link URL for Phone Status; Days Ahead (1–60), Show Labels and a long/short Date Format for Opening Hours. -
Holiday and special-day names surfaced
The opening-hours rows carry the label behind each day, so a public holiday or a special working day is named on the page instead of appearing as an unexplained closure. Turn it off with Show Labels when the names are internal.
-
Localized in the visitor's language
Times are computed in the timezone of the schedule's
resource.calendarand then rendered through Odoo'sformat_date/format_time, so a visitor reading the site in another language gets their own weekday names and time format. -
Two narrow public endpoints
The blocks are backed by
/freeswitch/schedule/status/<id>and/freeswitch/schedule/opening_hours/<id>, which return availability, the phone number and the day rows and nothing else. A number without an enabled schedule is a 404, so the routing configuration is never exposed. -
Read access scoped to designers
Website designers get read-only access to
connect.freeswitch.numberandconnect.schedulepurely so the snippet's record picker works; visitors never touch those models, since the public controllers read through sudo.
Scope of the current version
- FreeSWITCH only — this is the website face of
connect_freeswitchworking schedules, not a general Connect widget pack. Numbers on other providers cannot be published. - Requires the Odoo
websiteapp, plusconnect≥ 19.0.4.1.0 andconnect_freeswitch≥ 19.0.2.1.0, which is where working schedules were introduced. - Only DIDs with Use Working Schedule enabled and a schedule set can be selected in the snippet options; everything else is invisible to the picker and to the endpoints.
- Opening hours are capped at 60 days ahead, matching the rolling slot horizon set by the
connect.schedule_slot_horizon_dayssystem parameter. - The blocks display only. The number can be a
tel:link and the status indicator can point at a page, but there is no callback request form and no click-to-call.
Installs with full features free for 30 days; buy the license inside the module.