获取分机启用状态
<h4>接口说明:</h4>
<h5>获取用户拥有的分机列表信息。</h5>
<h4>请求方式:POST,form-data格式</h4>
<h4>请求参数</h4>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">是否必须</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">service</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">App.Sip_Status.GetSipValidStatus</td>
</tr>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">通过授权接口获取的token</td>
</tr>
<tr>
<td style="text-align: left;">extnumber</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">分机号,多个分机号用英文逗号隔开</td>
</tr>
</tbody>
</table>
<h4>接口请求示例(PHP)</h4>
<pre><code>&lt;?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' =&gt; 'App.Sip_Status.GetSipValidStatus',
'token' =&gt; 'ABCDEFG',
'extnumber' =&gt; '100001'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?&gt;
</code></pre>
<h4>返回数据结构示例</h4>
<pre><code>{
&quot;ret&quot;: 200,
&quot;data&quot;: {
&quot;status&quot;: 0,
&quot;desc&quot;: &quot;获取成功&quot;,
&quot;result&quot;: [
{
&quot;extnumber&quot;: &quot;90170002&quot;,
&quot;code&quot;: 1016
}
],
&quot;reqtime&quot;: 1581508401,
&quot;rsptime&quot;: 1581508401
},
&quot;msg&quot;: &quot;&quot;
}
</code></pre>
<h4>返回参数说明</h4>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">result</td>
<td style="text-align: left;">array</td>
<td style="text-align: left;">分机数据数组</td>
</tr>
<tr>
<td style="text-align: left;">—extnumber</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">分机号</td>
</tr>
<tr>
<td style="text-align: left;">—code</td>
<td style="text-align: left;">int</td>
<td style="text-align: left;">分机号状态</td>
</tr>
</tbody>
</table>