Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.
Get Timeframe lets your AI agent read which NetSapiens answering-rule timeframe is active for the PBX user behind the agent (for example Office Hours, Holidays, or AfterHours). Use it when instructions should change based on the current timeframe—for example greet differently after hours, or refuse bookings on holidays.In the Add Functions picker, Get Timeframe is described as: “Get the current PBX user’s timezone/timeframe. Use to determine the active timeframe (e.g., AfterHours) for prompt logic.”This function is available in the Connect App only.
Prerequisites
Voip UCAAS connected on the AI agent (steps below).
Timeframes defined on the agent user’s answering rules in NetSapiens (for example Office Hours and Holidays).
NS Get Timeframe unlocked for the organization in Feature Administration.
Connect Voip UCAAS
NetSapiens functions only appear after Voip UCAAS is connected on the AI agent.
In the Connect App (AI Agents tile in the NetSapiens portal), open the agent list.
In the agent’s row, click the Integrations icon (gear).
Click Voip UCAAS (“Connect to your UCaaS platform for subscriber management.”).
In Configure Voip UCAAS Integration, fill in:
API Version — v1 or v2. Start with v1 unless you know your platform supports v2. Chat Notification needs v2.
Voip UCAAS URL — your platform API host (for example https://core1.example.com). /ns-api/ is added automatically if it’s missing.
Username — a user with Domain Manager or higher access in the agent’s domain.
Password — leave blank to inherit saved reseller credentials when the form offers that.
Domain — the domain the AI agent lives in (usually pre-filled).
Click Connect. The Voip UCAAS tile then shows Connected.
If your reseller already saved credentials, you can leave Password (and Advanced secrets) blank to inherit them.
Add the function
In the agent list, click the agent’s pencil (Edit).
Under Functions, click Add.
Expand the Voip UCAAS group (“Functions powered by your UCaaS platform.”). The group shows how many of the 8 functions are already added (for example 1 / 8 added).
Click Add next to Get Timeframe.
On the function card, fill in the instruction textbox: “Describe when and how your agent should use this function to get the current PBX user’s timezone/timeframe.”
Click Save Changes. You should see Agent updated successfully!
Example instructions
When a caller asks whether you are open, use Get Timeframe. If the active timeframe is Office Hours, say you are open. If it is AfterHours or Holidays, say you are closed and offer to take a message.
Before offering to book an appointment, check Get Timeframe. Only offer booking during Office Hours.
Tips
The function reads timeframes on the agent user’s answering rules in NetSapiens, not a separate calendar in Telzino.
Name the timeframes your instructions care about (for example Office Hours, Holidays) so the AI agent can match them.
If the function fails with a phone-system permission error, re-check the Voip UCAAS username (Domain Manager or higher) and ask your partner or reseller to confirm API access to timeframes.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AI Phone Agent Docs","colors":{"primary":"#0075FF","light":"#0075FF","dark":"#0075FF"},"logo":{"light":"https://mintcdn.com/telimatic/yiNgz-d0a-JfVRwO/logo/mainlogo.png?fit=max\u0026auto=format\u0026n=yiNgz-d0a-JfVRwO\u0026q=85\u0026s=a231ffe7491e72d2aa1f0b2e60ba2bfe","dark":"https://mintcdn.com/telimatic/yiNgz-d0a-JfVRwO/logo/mainlogo.png?fit=max\u0026auto=format\u0026n=yiNgz-d0a-JfVRwO\u0026q=85\u0026s=a231ffe7491e72d2aa1f0b2e60ba2bfe","href":"https://telzino.com"},"favicon":"https://mintcdn.com/telimatic/Pjr_MfdVwCp3s3aG/favicon.ico?fit=max\u0026auto=format\u0026n=Pjr_MfdVwCp3s3aG\u0026q=85\u0026s=a7ec57eb85142c4fa0a7496227c435a8","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://telzino.com/examples","label":"Examples"},{"href":"https://telzino.com/pricing","label":"Pricing"}],"primary":{"type":"button","label":"Login","href":"https://dashboard.telzino.com/auth/login"}},"seo":{"metatags":{"description":"The AI phone agent for small business. Answer calls and texts with an AI phone agent that always works and is never busy.","og:title":"Docs - AI phone agents for SMB","og:description":"The AI phone agent for small business. Answer calls and texts with an AI phone agent that always works and is never busy.","og:image":"https://telzino.com/images/openGraphImage-noBrand.png","og:image:width":"3600","og:image:height":"1881","og:site_name":"Docs - AI phone agents for SMB"},"indexing":"navigable"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"telimatic","hasAudioNarration":false,"actualSubdomain":"telimatic","customDomains":["docs.telzino.com"],"gitSource":{"type":"github","owner":"telimatic","repo":"telzino-mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af613d1701afd0a5b2ef42c","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Documentation","count":117},{"language":"default","tag":"API Reference","count":110},{"language":"default","tag":"Agent Functions","count":29},{"language":"default","tag":"Event Webhooks","count":20},{"language":"default","tag":"Agents","count":16},{"language":"default","tag":"Telzino Dashboard","count":13},{"language":"default","tag":"Connect App","count":12},{"language":"default","tag":"Integrations","count":10},{"language":"default","tag":"Agent Examples","count":10},{"language":"default","tag":"NetSapiens Functions","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html[data-domain] img[alt=\"light logo\"],html[data-domain] img[alt=\"dark logo\"]{visibility:hidden}#sidebar a,#navigation-items a,.sidebar-title{text-decoration:none}"}],"page":{"pagePath":"netsapiens-functions/get-timeframe","slug":"/netsapiens-functions/get-timeframe","pageMetadata":{"title":"Get Timeframe","description":"Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.","href":"/netsapiens-functions/get-timeframe"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Get Timeframe`}),` lets your AI agent read which NetSapiens answering-rule timeframe is active for the PBX user behind the agent (for example `,_jsx(_components.strong,{children:`Office Hours`}),`, `,_jsx(_components.strong,{children:`Holidays`}),`, or `,_jsx(_components.strong,{children:`AfterHours`}),`). Use it when instructions should change based on the current timeframe—for example greet differently after hours, or refuse bookings on holidays.`]}),`\n`,_jsxs(_components.p,{children:[`In the Add Functions picker, `,_jsx(_components.strong,{children:`Get Timeframe`}),` is described as: “Get the current PBX user’s timezone/timeframe. Use to determine the active timeframe (e.g., AfterHours) for prompt logic.”`]}),`\n`,_jsxs(_components.p,{children:[`This function is available in the `,_jsx(_components.strong,{children:`Connect App`}),` only.`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Voip UCAAS connected on the AI agent (steps below).`}),`\n`,_jsx(_components.li,{children:`Timeframes defined on the agent user’s answering rules in NetSapiens (for example Office Hours and Holidays).`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`NS Get Timeframe`}),` unlocked for the organization in Feature Administration.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`connect-voip-ucaas`,children:`Connect Voip UCAAS`}),`\n`,_jsx(_components.p,{children:`NetSapiens functions only appear after Voip UCAAS is connected on the AI agent.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the Connect App (`,_jsx(_components.strong,{children:`AI Agents`}),` tile in the NetSapiens portal), open the agent list.`]}),`\n`,_jsxs(_components.li,{children:[`In the agent’s row, click the `,_jsx(_components.strong,{children:`Integrations`}),` icon (gear).`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Voip UCAAS`}),` (“Connect to your UCaaS platform for subscriber management.”).`]}),`\n`,_jsxs(_components.li,{children:[`In `,_jsx(_components.strong,{children:`Configure Voip UCAAS Integration`}),`, fill in:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API Version`}),` — `,_jsx(_components.strong,{children:`v1`}),` or `,_jsx(_components.strong,{children:`v2`}),`. Start with `,_jsx(_components.strong,{children:`v1`}),` unless you know your platform supports v2. Chat Notification needs `,_jsx(_components.strong,{children:`v2`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Voip UCAAS URL`}),` — your platform API host (for example `,_jsx(_components.code,{children:`https://core1.example.com`}),`). `,_jsx(_components.code,{children:`/ns-api/`}),` is added automatically if it’s missing.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Username`}),` — a user with `,_jsx(_components.strong,{children:`Domain Manager`}),` or higher access in the agent’s domain.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Password`}),` — leave blank to inherit saved reseller credentials when the form offers that.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Domain`}),` — the domain the AI agent lives in (usually pre-filled).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Advanced`}),` (optional) — `,_jsx(_components.strong,{children:`Client ID`}),` / `,_jsx(_components.strong,{children:`Client Secret`}),`. Leave blank unless your platform needs manually issued OAuth credentials; they’re normally auto-detected.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Connect`}),`. The Voip UCAAS tile then shows `,_jsx(_components.strong,{children:`Connected`}),`.`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If your reseller already saved credentials, you can leave `,_jsx(_components.strong,{children:`Password`}),` (and Advanced secrets) blank to inherit them.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`add-the-function`,children:`Add the function`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the agent list, click the agent’s pencil (`,_jsx(_components.strong,{children:`Edit`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Functions`}),`, click `,_jsx(_components.strong,{children:`Add`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Expand the `,_jsx(_components.strong,{children:`Voip UCAAS`}),` group (“Functions powered by your UCaaS platform.”). The group shows how many of the 8 functions are already added (for example `,_jsx(_components.code,{children:`1 / 8 added`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Add`}),` next to `,_jsx(_components.strong,{children:`Get Timeframe`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`On the function card, fill in the instruction textbox: `,_jsx(_components.em,{children:`“Describe when and how your agent should use this function to get the current PBX user’s timezone/timeframe.”`})]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save Changes`}),`. You should see `,_jsx(_components.strong,{children:`Agent updated successfully!`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-instructions`,children:`Example instructions`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`When a caller asks whether you are open, use Get Timeframe. If the active timeframe is Office Hours, say you are open. If it is AfterHours or Holidays, say you are closed and offer to take a message.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Before offering to book an appointment, check Get Timeframe. Only offer booking during Office Hours.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`tips`,children:`Tips`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The function reads timeframes on the `,_jsx(_components.strong,{children:`agent user’s`}),` answering rules in NetSapiens, not a separate calendar in Telzino.`]}),`\n`,_jsx(_components.li,{children:`Name the timeframes your instructions care about (for example Office Hours, Holidays) so the AI agent can match them.`}),`\n`,_jsx(_components.li,{children:`If the function fails with a phone-system permission error, re-check the Voip UCAAS username (Domain Manager or higher) and ask your partner or reseller to confirm API access to timeframes.`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Timeframe","description":"Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.","href":"/netsapiens-functions/get-timeframe"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Connect Voip UCAAS","slug":"connect-voip-ucaas","depth":2,"children":[]},{"title":"Add the function","slug":"add-the-function","depth":2,"children":[]},{"title":"Example instructions","slug":"example-instructions","depth":2,"children":[]},{"title":"Tips","slug":"tips","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/telimatic/792bea19b1ef8860/updateMintlifyDocs.js"],"subdomain":"telimatic","siteName":"AI Phone Agent Docs","title":"Docs - AI phone agents for SMB","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-09T20:05:49.963Z","originalFileLocation":"netsapiens-functions/get-timeframe.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AI Phone Agent Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Docs - AI phone agents for SMB\">\u003cmeta data-mint-head property=\"og:description\" content=\"The AI phone agent for small business. Answer calls and texts with an AI phone agent that always works and is never busy.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Docs - AI phone agents for SMB\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.telzino.com/netsapiens-functions/get-timeframe\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://telzino.com/images/openGraphImage-noBrand.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Docs - AI phone agents for SMB\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The AI phone agent for small business. Answer calls and texts with an AI phone agent that always works and is never busy.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://telzino.com/images/openGraphImage-noBrand.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/telimatic/NnaTq6owhepGnYbT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AI Phone Agent Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0075FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.telzino.com/netsapiens-functions/get-timeframe\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/netsapiens-functions/get-timeframe.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.telzino.com/#organization\",\"name\":\"AI Phone Agent Docs\",\"url\":\"https://docs.telzino.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/telimatic/yiNgz-d0a-JfVRwO/logo/mainlogo.png?fit=max\u0026auto=format\u0026n=yiNgz-d0a-JfVRwO\u0026q=85\u0026s=a231ffe7491e72d2aa1f0b2e60ba2bfe\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.telzino.com#website\",\"name\":\"AI Phone Agent Docs\",\"url\":\"https://docs.telzino.com\",\"publisher\":{\"@id\":\"https://docs.telzino.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe#webpage\",\"url\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe\",\"name\":\"Get Timeframe\",\"description\":\"Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.\",\"dateModified\":\"2026-11-09T20:05:49.963Z\",\"isPartOf\":{\"@id\":\"https://docs.telzino.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"NetSapiens Functions\",\"item\":\"https://docs.telzino.com/netsapiens-functions/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Timeframe\",\"item\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe#article\",\"headline\":\"Get Timeframe\",\"name\":\"Get Timeframe\",\"description\":\"Let your AI agent read the active PBX timeframe (for example Office Hours or AfterHours) for prompt logic.\",\"url\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe\",\"mainEntityOfPage\":{\"@id\":\"https://docs.telzino.com/netsapiens-functions/get-timeframe#webpage\"},\"image\":\"https://telzino.com/images/openGraphImage-noBrand.png\",\"dateModified\":\"2026-11-09T20:05:49.963Z\",\"publisher\":{\"@id\":\"https://docs.telzino.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.telzino.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AI Phone Agent Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AI Phone Agent Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/netsapiens-functions/get-timeframe.md","siteName":"AI Phone Agent Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Setup Guides","pages":[{"title":"Start Here","href":"/setup-guides/start-here"},{"group":"Any SIP PBX","pages":[{"title":"Prepare Your Telzino Account (Any SIP PBX)","href":"/setup-guides/prepare-account"},{"title":"Set Up Your First AI Agent on Any SIP PBX","sidebarTitle":"Set up your first agent","href":"/setup-guides/general-pbx"},{"title":"SIP Registration","href":"/setup-guides/sip-registration"}]},{"group":"NetSapiens","pages":[{"title":"Claim NetSapiens Base to Telzino","href":"/setup-guides/connect-netsapiens-base"},{"title":"Set Up Your First AI Agent on NetSapiens","sidebarTitle":"Set Up Your First AI Agent on NetSapiens","href":"/setup-guides/netsapiens-first-agent"},{"title":"NetSapiens CSP Configuration","href":"/setup-guides/netsapiens-csp"}]},{"title":"Context in SIP Headers","href":"/setup-guides/inject-context"}]},{"group":"Managing AI agents","pages":[{"title":"Managing AI Agents","href":"/admin-guide/overview"}]},{"group":"Telzino Dashboard","pages":[{"title":"Overview","href":"/admin-guide/dashboard/overview"},{"title":"Accessing the Dashboard","href":"/admin-guide/dashboard/accessing"},{"title":"Customer Management","href":"/admin-guide/dashboard/customer-management"},{"title":"Reports","href":"/admin-guide/dashboard/reports"},{"title":"Billing","href":"/admin-guide/dashboard/billing"},{"title":"Agent Billing: Live, Demo, Off","href":"/admin-guide/dashboard/agent-billing"},{"title":"Agent configuration","href":"/admin-guide/dashboard/agent-configuration"},{"title":"Account Settings","href":"/admin-guide/dashboard/account-settings"},{"title":"Custom Domains","href":"/admin-guide/dashboard/custom-domains"},{"title":"Feature Administration","href":"/admin-guide/dashboard/feature-administration"},{"title":"Screenshare","href":"/admin-guide/dashboard/screenshare"},{"title":"Support","href":"/admin-guide/dashboard/support"},{"title":"Support Tickets","href":"/admin-guide/dashboard/support-tickets"}]},{"group":"Connect App","pages":[{"title":"Connect App Overview","href":"/admin-guide/connect/overview"},{"title":"Agents List","href":"/admin-guide/connect/agents-list"},{"title":"Edit an Agent","href":"/admin-guide/connect/edit-agent"},{"title":"Agent Inbox","href":"/admin-guide/connect/inbox"},{"title":"Logs","href":"/admin-guide/connect/logs"},{"title":"Usage","href":"/admin-guide/connect/usage"},{"title":"Knowledgebase","href":"/admin-guide/connect/knowledgebase"},{"title":"Templates","href":"/admin-guide/connect/templates"},{"title":"Guardrails","href":"/admin-guide/connect/guardrails"},{"title":"Suppression List","href":"/admin-guide/connect/suppression-list"},{"title":"Twilio SMS","href":"/admin-guide/connect/twilio-sms"},{"title":"Voice Preview","href":"/admin-guide/connect/voice-preview"}]},{"group":"Agent Settings","pages":[{"title":"Instructions","href":"/agents/instructions"},{"title":"Greeting","href":"/agents/greeting"},{"title":"Language","href":"/agents/language"},{"title":"Voice","href":"/agents/voice"},{"title":"Links","href":"/agents/links"}]},{"group":"Agent Functions","pages":[{"group":"Calls \u0026 transfers","pages":[{"title":"Call Transfer","href":"/functions/call-transfer"},{"title":"Warm Transfer","href":"/functions/warm-transfer"},{"title":"Transferred-Call Context","href":"/functions/transferred-call-context"},{"title":"IVR Menu Navigation","href":"/functions/ivr-navigation"}]},{"group":"Outbound calling","pages":[{"title":"Outbound Calls","href":"/functions/outbound-calls"},{"title":"Answering Machine Detection","href":"/functions/answering-machine-detection"},{"title":"Retry Policies","href":"/functions/retry-policies"},{"title":"Outbound Compliance","href":"/functions/outbound-compliance"},{"title":"Outbound Best Practices","href":"/functions/outbound-best-practices"}]},{"group":"Messaging","pages":[{"title":"Send SMS","href":"/functions/send-sms"},{"title":"SMS Templates","href":"/functions/sms-templates"},{"title":"Send Email","href":"/functions/send-email"},{"title":"Notify","href":"/functions/notify"},{"title":"Slack Notification","href":"/functions/slack-notification"},{"title":"Enhanced Email Capture","href":"/functions/email-capture"}]},{"group":"Scheduling \u0026 bookings","pages":[{"title":"Schedule","href":"/functions/schedule"},{"title":"OpenTable Reservations","href":"/functions/opentable-reservations"}]},{"group":"Payments","pages":[{"title":"Card Payments (Stripe)","href":"/functions/card-payments"}]},{"group":"Knowledge \u0026 lookups","pages":[{"title":"Knowledge Base (RAG)","href":"/functions/knowledge-base"},{"title":"Google Business","href":"/functions/google-business"},{"title":"Listings Search","href":"/functions/listings-search"},{"title":"Webhooks","href":"/functions/webhooks"}]},{"group":"Specialized agents","pages":[{"title":"Translator Agent","href":"/functions/translator-agent"},{"title":"Notetaker Agent","href":"/functions/notetaker-agent"},{"title":"Survey Agent","href":"/functions/survey-agent"}]},{"group":"Call lifecycle","pages":[{"title":"Pre-Answer","href":"/functions/pre-answer"},{"title":"Audio Recording","href":"/functions/start-stop-recording"},{"title":"End of Call Action","href":"/functions/end-of-call-action"},{"title":"Reporting","href":"/functions/reporting"}]}]},{"group":"NetSapiens Functions","pages":[{"title":"NetSapiens Functions","description":"Connect Voip UCAAS in the Connect App and add NetSapiens-powered functions to your AI agent.","href":"/netsapiens-functions/overview"},{"title":"Get Timeframe","href":"/netsapiens-functions/get-timeframe"},{"title":"Verify User","description":"Have your AI agent verify a caller by extension number and voicemail PIN before sharing sensitive information.","href":"/netsapiens-functions/verify-user"},{"title":"Reset Password","href":"/netsapiens-functions/reset-password"},{"title":"Lookup Directory","href":"/netsapiens-functions/lookup-directory"},{"title":"Set Call Forwarding","href":"/netsapiens-functions/set-call-forwarding"},{"title":"Send SMS","href":"/netsapiens-functions/send-sms"},{"title":"Check SMS Replies","href":"/netsapiens-functions/check-sms-replies"},{"title":"Chat Notification","href":"/netsapiens-functions/chat-notification"}]},{"group":"Event Webhooks","pages":[{"title":"Event Webhooks","href":"/event-webhooks/overview"},{"title":"Payloads","href":"/event-webhooks/payloads"},{"title":"Events","href":"/event-webhooks/events"},{"title":"Verifying requests","href":"/event-webhooks/verifying"},{"title":"Delivery, retries and health","href":"/event-webhooks/delivery"},{"title":"Testing and replay","href":"/event-webhooks/testing-and-replay"}]},{"group":"Agent Examples","pages":[{"title":"Take a Message","href":"/examples/message-taker"},{"title":"Restaurant","href":"/examples/restaurants"},{"title":"Retail","href":"/examples/retail"},{"title":"Home Services","href":"/examples/home-services"},{"title":"Professional Services","href":"/examples/professional-services"},{"title":"Salon","href":"/examples/salon"},{"title":"Logistics","href":"/examples/logistics"},{"title":"Best Practices","href":"/examples/best-practices"},{"title":"Appointment Confirmation","href":"/examples/appointment-confirmation"},{"title":"Receptionist Agent Using Google Sheets as Simple CRM","sidebarTitle":"Google Sheets CRM Receptionist","href":"/examples/google-sheets-crm-receptionist"}]},{"group":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"},{"title":"Google Calendar","href":"/integrations/google-calendar"},{"title":"Outlook Calendar","href":"/integrations/outlook-calendar"},{"title":"ModMed","href":"/integrations/modmed"},{"title":"Sage 100","href":"/integrations/sage100"},{"title":"Twilio","href":"/integrations/twilio"},{"title":"Web Embed","href":"/integrations/web-embed"},{"title":"Embedding Tools for AI Enablement","href":"/enablement/embed"},{"title":"Model Context Protocol (MCP)","href":"/integrations/mcp"},{"title":"SendGrid SMTP","href":"/integrations/sendgrid"}]},{"group":"SDK","pages":[{"title":"Voice SDK Quickstart","href":"/sdk/quickstart"},{"title":"SDK Authentication","href":"/sdk/authentication"},{"title":"Core API","href":"/sdk/core-api"},{"title":"React","href":"/sdk/react"},{"title":"Chat","href":"/sdk/chat"},{"title":"Server SDK","href":"/sdk/server"},{"title":"Events and errors","href":"/sdk/events"},{"title":"Security","href":"/sdk/security"}]},{"group":"White Label","pages":[{"title":"White-Label Capabilities","href":"/enablement/whitelabel"}]},{"group":"Configure agents with AI","pages":[{"title":"Configure AI Agents with an AI Assistant","sidebarTitle":"Overview","href":"/configure-with-ai/overview"},{"title":"Runbook for AI Assistants","sidebarTitle":"Runbook for AI assistants","href":"/configure-with-ai/runbook"},{"title":"Connecting AI Tools","sidebarTitle":"Connecting tools","href":"/configure-with-ai/connecting-tools"},{"title":"Example Prompts","sidebarTitle":"Example prompts","href":"/configure-with-ai/example-prompts"}]},{"group":"Developers","pages":[{"title":"Agent Runbook","href":"/agent-runbook"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Docs - AI phone agents for SMB","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}