<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.7kas.com/index.php?action=history&amp;feed=atom&amp;title=TuCloudAPI_checkextnum</id>
	<title>TuCloudAPI checkextnum - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.7kas.com/index.php?action=history&amp;feed=atom&amp;title=TuCloudAPI_checkextnum"/>
	<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=TuCloudAPI_checkextnum&amp;action=history"/>
	<updated>2026-11-07T04:04:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.7kas.com/index.php?title=TuCloudAPI_checkextnum&amp;diff=1271&amp;oldid=prev</id>
		<title>Maintenance script: TuCloudAPI reference (generated from func=help): field+reason, 700-703 reserved</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=TuCloudAPI_checkextnum&amp;diff=1271&amp;oldid=prev"/>
		<updated>2026-11-02T10:18:15Z</updated>

		<summary type="html">&lt;p&gt;TuCloudAPI reference (generated from func=help): field+reason, 700-703 reserved&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:18, 2 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Description ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Description ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Is this number free for a NEW extension of this PBX? The same check addextension runs under its lock, so the two never disagree. Rules: a registered extension takes 3-4 digits (^[1-9][0-9]{2,3}$); a send-to extension (toext_id set) 3-8 digits (^[1-9][0-9]{2,7}$) and the number is required; never a leading 0; 112 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is &lt;/del&gt;reserved; not an extension or a queue of this PBX; the SIP name pbxname+num must be free in the root. &quot;Taken&quot; is an ANSWER, not an error: ok:true, available:false, field:&quot;num&quot;, reason (required | format | reserved | extension | queue | unavailable) and a Spanish message to show as is, plus next_free (registered mode; null for send-to or when nothing is free). An absent, empty or over-long num is reason format (required in send-to mode). Errors keep the envelope: missing_pbx, forbidden, invalid_param (toext_id not a number), server_busy, db_error.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Is this number free for a NEW extension of this PBX? The same check addextension runs under its lock, so the two never disagree. Rules: a registered extension takes 3-4 digits (^[1-9][0-9]{2,3}$); a send-to extension (toext_id set) 3-8 digits (^[1-9][0-9]{2,7}$) and the number is required; never a leading 0; 112 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and 700-703 are &lt;/ins&gt;reserved; not an extension or a queue of this PBX; the SIP name pbxname+num must be free in the root. &quot;Taken&quot; is an ANSWER, not an error: ok:true, available:false, field:&quot;num&quot;, reason (required | format | reserved | extension | queue | unavailable) and a Spanish message to show as is, plus next_free (registered mode; null for send-to or when nothing is free). An absent, empty or over-long num is reason format (required in send-to mode). Errors keep the envelope: missing_pbx, forbidden, invalid_param (toext_id not a number), server_busy, db_error.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Call ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Call ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://wiki.7kas.com/index.php?title=TuCloudAPI_checkextnum&amp;diff=1265&amp;oldid=prev</id>
		<title>Maintenance script: TuCloudAPI reference (generated from func=help): checkextnum, extension numbers</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=TuCloudAPI_checkextnum&amp;diff=1265&amp;oldid=prev"/>
		<updated>2026-11-02T09:45:10Z</updated>

		<summary type="html">&lt;p&gt;TuCloudAPI reference (generated from func=help): checkextnum, extension numbers&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: &amp;#039;&amp;#039;&amp;#039;SuperRoot, Operator, Client&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|1=Requires the &amp;lt;code&amp;gt;pbx&amp;lt;/code&amp;gt; parameter (the PBX &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039;, e.g. &amp;lt;code&amp;gt;tucall&amp;lt;/code&amp;gt;). The server verifies that your &amp;lt;code&amp;gt;ukey&amp;lt;/code&amp;gt;&amp;#039;s own account owns that PBX, whatever its role; otherwise, and also for a PBX that does not exist, it returns &amp;lt;code&amp;gt;{&amp;quot;ok&amp;quot;:false,&amp;quot;code&amp;quot;:&amp;quot;forbidden&amp;quot;}&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Is this number free for a NEW extension of this PBX? The same check addextension runs under its lock, so the two never disagree. Rules: a registered extension takes 3-4 digits (^[1-9][0-9]{2,3}$); a send-to extension (toext_id set) 3-8 digits (^[1-9][0-9]{2,7}$) and the number is required; never a leading 0; 112 is reserved; not an extension or a queue of this PBX; the SIP name pbxname+num must be free in the root. &amp;quot;Taken&amp;quot; is an ANSWER, not an error: ok:true, available:false, field:&amp;quot;num&amp;quot;, reason (required | format | reserved | extension | queue | unavailable) and a Spanish message to show as is, plus next_free (registered mode; null for send-to or when nothing is free). An absent, empty or over-long num is reason format (required in send-to mode). Errors keep the envelope: missing_pbx, forbidden, invalid_param (toext_id not a number), server_busy, db_error.&lt;br /&gt;
&lt;br /&gt;
== Call ==&lt;br /&gt;
 https://tucloudapi.7kas.com:9087/tucloud?func=checkextnum&amp;amp;ukey=YOUR_KEY&amp;amp;pbx=PBX_NAME&lt;br /&gt;
GET, or POST with the parameters form-urlencoded in the body. Requires the &amp;lt;code&amp;gt;ukey&amp;lt;/code&amp;gt; parameter. Always HTTP 200; the response is a JSON envelope.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Parameter !! Type !! Required !! Default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pbx&amp;lt;/code&amp;gt; || string || Yes || — || FuturePBX NAME (e.g. tucall). The (ukey, pbx) pair is the tenant boundary; the server verifies the ukey owns this PBX.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;num&amp;lt;/code&amp;gt; || string || Yes || — || The number to check (digits).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;toext_id&amp;lt;/code&amp;gt; || integer || No || &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; || The form&amp;#039;s mode: 0 or absent = registered extension; any extension id = send-to (3-8 digits, required, no next_free).&lt;br /&gt;
|}&lt;br /&gt;
== Example ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://tucloudapi.7kas.com:9087/tucloud?func=checkextnum&amp;amp;ukey=KEY&amp;amp;pbx=tucall&amp;amp;num=1234&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
{ok:true, num, available:true} | {ok:true, num, available:false, field:&amp;quot;num&amp;quot;, reason, message, next_free:&amp;quot;201&amp;quot;|null}.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
Always HTTP 200. On failure the body is &amp;lt;code&amp;gt;{&amp;quot;ok&amp;quot;:false,&amp;quot;code&amp;quot;:&amp;quot;...&amp;quot;,&amp;quot;message&amp;quot;:&amp;quot;...&amp;quot;}&amp;lt;/code&amp;gt;. Common codes: &amp;lt;code&amp;gt;missing_pbx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;forbidden&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;invalid_param&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;not_found&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;conflict&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;in_use&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;db_error&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;server_busy&amp;lt;/code&amp;gt;; the Response section above lists any specific to this function.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[TuCloudAPI]]&lt;br /&gt;
[[Category:TuCloudAPI SuperRoot]][[Category:TuCloudAPI Operator]][[Category:TuCloudAPI Client]][[Category:TuCloudAPI]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>