1

VSXI REST API Guide Version 11

The VSXi REST API allows you to manage VSXi systems in a simple, programmatic way using conventional HTTP requests. Most of the functionality that you are familiar with in the VSXi GUI is also available through the API, allowing you to script the actions that your situation requires.

The API documentation will start with a general overview and then break down the different components. To access the VSXi REST API,  basic HTTP knowledge is necessary: how an HTTP request is sent as {method url}, how to attach a file as input and save output into a file.

This guide is written for VSXis running version 11 or later.

API authentication is done on each request using basic authentication. User has to input a valid GUI/API username/password and embed that in HTTPS basic authentication header.

All requests made to the VSXi follow a similar format, with user authentication performed on each HTTP request. In the near future providing Bearer Token Authentication. 

The syntax for the API is as follows:

curl -u $user:$pass -X $METHOD -k -$FLAG file.xml
https://SERVER_IP:8888/SSConfig/webresources/<action>/{table}?{format=xml/json}

The base URL will always be of the format https:$SERVER_IP:8888/SSConfig/websresources/

In the following sections we go into further detail on actions and tables.

In general the API supports the following actions:

  • download: downloads all content from a table.
  • delete: deletes specific entries matched against the uploaded file.
  • update: updates the contents of a table with the file being uploaded. If the entries exist they get updated. If the entries do not exist they get inserted.
  • upload: replaces the contents of a table with the file being uploaded. This is a table flush. Proceed with caution.
  • query: downloads specific content from a table.
  • stats: downloads statistics from the system.
  • system: reads specific system information.

download, delete and upload also support zipped payloads. When uploading zipped payloads you must use the Large API call: downloadLarge, deleteLarge and replaceLarge (for upload).

The VSXi REST API is an evolution of the VSXi legacy SOAP/Web Services API. By default, if not specified, data will be downloaded or received in XML format. You can use the format parameter within the URL to specify the desired data format.

?{format=xml/json}

While XML/JSON are widely supported for configuration tables or actions support CSV and plain text.

On any data input operation (UPDATE, DELETE, UPLOAD, REPLACE) you must submit the the entire payload. That is all XML/JSON elements that correspond to the table. All fields are required and omitting fields will result in an error. As an example if you are updating one field in the Resource table, you need to submit all fields not just the key element and the field being changed.  The best common practice is to download, edit and upload the file.

While files are most commonly used it is also possible to send serial data with the full XML/JSON content if desired.

Endpoints are objects within the VSXi used for configuration, monitoring and administration. For simplicity we will organize this section into two logical groups: configuration, administration. Endpoints are listed in alphabetical order.

Manages configuration under App Server > LNP server.

Supported actions: download, update.

Supported payload: XML.

curl -k -X GET -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/download/app_server_lnp"
curl -T file.xml -k -X POST -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/update/app_server_lnp"

Example input/output:

<?xml version="1.0" encoding="UTF-8"?>
<XBAppServerGroupList>
   <XBAppServerGroup>
      <applicationType>LNP</applicationType>
      <applicationIndex>2</applicationIndex>
      <groupIndex>1</groupIndex>
      <groupPolicy>round_robin</groupPolicy>
      <appServers>
         <serverIndex>1</serverIndex>
         <fqdn>10.55.52.247</fqdn>
         <portAndSvcPort>
            <port>5060</port>
            <servicePortIndex>1</servicePortIndex>
         </portAndSvcPort>
      </appServers>
      <digitMapTableIndex>100</digitMapTableIndex>
      <resendPeriod>1</resendPeriod>
      <maxResend>1</maxResend>
   </XBAppServerGroup>
</XBAppServerGroupList>

Manages configuration under App Server > CNAM server.

Supported actions: download, update.

Supported payload: XML.

curl -k -X GET -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/download/app_server_cnam"
curl -T file.xml -k -X POST -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/update/app_server_cnam"
<?xml version="1.0" encoding="UTF-8"?>
<XBAppServerGroupList>
   <XBAppServerGroup>
      <applicationType>CNAM</applicationType>
      <applicationIndex>4</applicationIndex>
      <groupIndex>1</groupIndex>
      <groupPolicy>round_robin</groupPolicy>
      <appServers>
         <serverIndex>1</serverIndex>
         <fqdn>192.168.92.16</fqdn>
         <portAndSvcPort>
            <port>5200</port>
            <servicePortIndex>1</servicePortIndex>
         </portAndSvcPort>
      </appServers>
      <appServers>
         <serverIndex>2</serverIndex>
         <fqdn>192.168.92.17</fqdn>
         <portAndSvcPort>
            <port>5200</port>
            <servicePortIndex>1</servicePortIndex>
         </portAndSvcPort>
      </appServers>
      <resendPeriod>1</resendPeriod>
      <maxResend>1</maxResend>
   </XBAppServerGroup>
</XBAppServerGroupList>

Manages configuration under App Server > STI AS server.

Supported actions: download, update.

Supported payload: XML.

curl -k -X GET -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/download/app_server_sti_as"
curl -T lnp.xml -k -X POST -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/update/app_server_sti_as"
<?xml version="1.0" encoding="UTF-8"?>
<XBAppServerGroupList>
   <XBAppServerGroup>
      <applicationType>STI-VS</applicationType>
      <applicationIndex>8</applicationIndex>
      <groupIndex>1</groupIndex>
      <groupPolicy>round_robin</groupPolicy>
      <appServers>
         <serverIndex>1</serverIndex>
         <fqdn>1.2.3.4</fqdn>
         <portAndSvcPort>
            <port>5060</port>
            <servicePortIndex>1</servicePortIndex>
         </portAndSvcPort>
      </appServers>
      <digitMapTableIndex>0</digitMapTableIndex>
      <resendPeriod>1</resendPeriod>
      <maxResend>1</maxResend>
   </XBAppServerGroup>
</XBAppServerGroupList>

Manages configuration under App Server > STI VS server.

Supported actions: download, update.

Supported payload: XML.

curl -k -X GET -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/download/app_server_sti_vs"
curl -T file.xml -k -X POST -u $USER:$PASS  "https://vsxi.sansay.support:8888/SSConfig/webresources/update/app_server_sti_vs"
<?xml version="1.0" encoding="UTF-8"?>
<XBAppServerGroupList>
   <XBAppServerGroup>
      <applicationType>STI-VS</applicationType>
      <applicationIndex>8</applicationIndex>
      <groupIndex>1</groupIndex>
      <groupPolicy>round_robin</groupPolicy>
      <appServers>
         <serverIndex>1</serverIndex>
         <fqdn>1.2.3.4</fqdn>
         <portAndSvcPort>
            <port>5060</port>
            <servicePortIndex>1</servicePortIndex>
         </portAndSvcPort>
      </appServers>
      <digitMapTableIndex>0</digitMapTableIndex>
      <resendPeriod>1</resendPeriod>
      <maxResend>1</maxResend>
   </XBAppServerGroup>
</XBAppServerGroupList>

 

curl -k -X GET -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/download/cac_index"
curl -T file.xml -k -X POST -u $USER:$PASS
"https://vsxi.sansay.support:8888/SSConfig/webresources/update/cac_index"
<?xml version="1.0" encoding="UTF-8"?>
<XBCACIndexList>
   <XBCACIndex>
      <cacProfileId>63</cacProfileId>
      <alias>Philippines</alias>
      <prefix>+63</prefix>
   </XBCACIndex>
   <XBCACIndex>
      <cacProfileId>1767</cacProfileId>
      <alias>Dominica</alias>
      <prefix>+1767</prefix>
   </XBCACIndex>
   <XBCACIndex>
      <cacProfileId>1784</cacProfileId>
      <alias>St Vincent</alias>
      <prefix>+1784</prefix>
   </XBCACIndex>
   <XBCACIndex>
      <cacProfileId>1242</cacProfileId>
      <alias>Bahamas</alias>
      <prefix>+1242</prefix>
   </XBCACIndex>
   <XBCACIndex>
      <cacProfileId>882</cacProfileId>
      <alias>Thuraya</alias>
      <prefix>+882</prefix>
   </XBCACIndex>
</XBCACIndexList>

 

Manages configuration under Resources > Cause Code Profile.

Supported actions: download, update.

Supported payload: XML.

curl -k -X GET -u superuser:sansay "https://vsxi.sansay.support:8888/SSConfig/webresources/download/cause_code_profile

curl -T lnp.xml -k -X POST -u superuser:sansay "https://vsxi.sansay.support:8888/SSConfig/webresources/update/cause_code_profile

<XBCauseCodeProfileList>
   <XBCauseCodeProfile>
      <id>0</id>
      <alias>Default</alias>
<causeCodeMappings>
         <XBSourceCauseCode>503</XBSourceCauseCode>
         <XBMappedSipCauseCode>503</XBMappedSipCauseCode>
         <XBMappedH323CauseCode>34</XBMappedH323CauseCode>
</causeCodeMappings>
</XBCauseCodeProfile>
</XBCauseCodeProfileList>

Manages configuration under Digit Mappings > Digit Mappings.

Supported actions: download, update, replace, delete.

Supported payload: XML, CSV.

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/digit_mapping
curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/digit_mapping
<?xml version="1.0" encoding="UTF-8"?>
<DigitTranslationList>
   <DigitTrans>
      <alias>Block Abuser</alias>
      <tableId>20</tableId>
      <origAni>+18587542</origAni>
      <origAniMinLength>0</origAniMinLength>
      <origAniMaxLength>40</origAniMaxLength>
      <origDnis>any</origDnis>
      <origDnisMinLength>0</origDnisMinLength>
      <origDnisMaxLength>40</origDnisMaxLength>
      <transAni></transAni>
      <transDnis>9999</transDnis>
      <aniAction>passthrough</aniAction>
      <dnisAction>all</dnisAction>
   </DigitTrans>
</DigitTranslationList>

Manages configuration under Digit Mappings > Digit Mapping Tables.

Supported actions: download, update, replace, delete.

Supported payload: XML, CSV.

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/digit_mapping_index
curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/digit_mapping_index

Payload

<?xml version="1.0" encoding="UTF-8"?>
<DigitTranslationIndexList>
   <DigitTransIndex>
      <name>NO-LNP</name>
      <id>1</id>
   </DigitTransIndex>
   <DigitTransIndex>
      <name></name>
      <id>20</id>
   </DigitTransIndex>
   <DigitTransIndex>
      <name></name>
      <id>100</id>
   </DigitTransIndex>
</DigitTranslationIndexList>

Manages configuration under App Servers > Media Servers

Supported actions: download, update, delete.

Supported payload: XML, JSON

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/media_server?format=xml"
curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/media_server"
<?xml version="1.0" encoding="UTF-8"?>
<XBMediaServerList>
   <XBMediaServer>
      <aha_id>0</aha_id>
      <mediaSrvIndex>1</mediaSrvIndex>
      <publicIP>192.168.40.216</publicIP>
      <privateIP>10.132.0.26</privateIP>
      <udpPort>10000</udpPort>
      <maxConnections>32000</maxConnections>
      <allowedSessCnt>3000</allowedSessCnt>
      <priority>2</priority>
      <alias>Internal Media Switching</alias>
      <state>enable</state>
      <switchType>Internal Media Switching</switchType>
   </XBMediaServer>
</XBMediaServerList>

Manages configuration under Service Ports > Media Server Profiles

Supported actions: download, update, delete.

Supported payload: XML, JSON

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/media_server_profile"
curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/media_server_profile"
<?xml version="1.0" encoding="UTF-8"?>
<XBMediaServerProfileList>
   <XBMediaServerProfile>
      <msProfIndex>1</msProfIndex>
      <msIdVip>
         <msIndex>1</msIndex>
         <ethIf>eth0</ethIf>
         <vipAddress>192.168.40.216</vipAddress>
         <subnetMask>255.255.255.0</subnetMask>
         <natEnable>no</natEnable>
         <natIP>0.0.0.0</natIP>
         <vlanId>0</vlanId>
         <aha_id>0</aha_id>
         <pair_id>0</pair_id>
      </msIdVip>
   </XBMediaServerProfile>
</XBMediaServerProfileList>

Manages configuration under Resources > Resources, also known as Trunks or Trunk IDs.

Supported actions: download, downloadLarge, update, updateLarge, delete, deleteLarge, upload, replaceLarge, query.

Supported payload: XML, XML/ZIP, JSON, JSON/XML

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/resource"

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/resource"

Payload
<?xml version="1.0" encoding="UTF-8"?>
<XBResourceList>
   <XBResource>
      <protocol>SIP</protocol>
      <typeSIPgw>
         <portAddress>5060</portAddress>
         <serviceState>trace</serviceState>
         <direction>both</direction>
         <NAT>disable</NAT>
         <allowDirectMedia>no</allowDirectMedia>
         <sipProfileIndex>0</sipProfileIndex>
         <optionPoll>disable</optionPoll>
         <authorizedRPS>500</authorizedRPS>
         <unauthorizedRPS>500</unauthorizedRPS>
      </typeSIPgw>
      <name>STIR SHAKEN Test Number - PROD</name>
      <companyName>Asterisk</companyName>
      <trunkId>1</trunkId>
      <sgId>0</sgId>
      <capacity>1200</capacity>
      <cpsLimit>500</cpsLimit>
      <node>
         <fqdn>10.190.114.245</fqdn>
         <netmask>32</netmask>
         <capacity>12</capacity>
         <cpsLimit>5</cpsLimit>
         <cacProfileId>0</cacProfileId>
      </node>
      <rtid>0</rtid>
      <ingress1>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </ingress1>
      <ingress2>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </ingress2>
      <egress1>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </egress1>
      <egress2>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </egress2>
      <outboundANI>pass</outboundANI>
      <techPrefix>default</techPrefix>
      <rnIngress1>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </rnIngress1>
      <rnIngress2>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </rnIngress2>
      <rnEgress1>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </rnEgress1>
      <rnEgress2>
         <match>all</match>
         <action1>none</action1>
         <digits1></digits1>
         <action2>none</action2>
         <digits2></digits2>
      </rnEgress2>
      <codecPolicy>enforced</codecPolicy>
      <srtpEnable>disable</srtpEnable>
      <srtpSize>80</srtpSize>
      <srtpDtls>disable</srtpDtls>
      <codec>g711u 64k</codec>
      <groupPolicy>round_robin</groupPolicy>
      <dtid>0</dtid>
      <t38>enable</t38>
      <rfc2833>enable</rfc2833>
      <payloadType>101</payloadType>
      <tos>B8</tos>
      <svcPortIndex>1</svcPortIndex>
      <radiusAuthGrpIndex>0</radiusAuthGrpIndex>
      <radiusAcctGrpIndex>0</radiusAcctGrpIndex>
      <lnpGrpIndex>0</lnpGrpIndex>
      <lnpEnhancedGrpIndex>0</lnpEnhancedGrpIndex>
      <stiASGrpIndex>0</stiASGrpIndex>
      <stiVSGrpIndex>0</stiVSGrpIndex>
      <cnamGrpIndex>0</cnamGrpIndex>
      <ersGrpIndex>0</ersGrpIndex>
      <maxCallDuration>10800</maxCallDuration>
      <minCallDuration>0</minCallDuration>
      <noAnswerTimeout>120</noAnswerTimeout>
      <noRingTimeout>30</noRingTimeout>
      <causeCodeProfile>0</causeCodeProfile>
      <stopRouteProfile>0</stopRouteProfile>
      <paiAction>Disable</paiAction>
      <paiString></paiString>
      <inheritedGenericHeader></inheritedGenericHeader>
      <outSMCProfileId>21</outSMCProfileId>
      <stiIngressAuthentication>none</stiIngressAuthentication>
      <stiIngressAuthFailBehavior>passthru</stiIngressAuthFailBehavior>
      <stiEgressIdHdrTreatment>passthru</stiEgressIdHdrTreatment>
      <stiIngressVerification>disable</stiIngressVerification>
      <stiEgressVerifyFailBehavior>passthru</stiEgressVerifyFailBehavior>
   </XBResource>
</XBResourceList>

Manages configuration under Resources > Blocked Resources.

Supported actions: download, update, delete, upload.

Supported payload: XML, JSON

download

curl -k -X GET -u "$1":"$2" "https://$3:8888/SSConfig/webresources/download/resourceblock

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/resourceblock"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBResourceBlockList>
   <XBResourceBlock>
      <trunkId>100</trunkId>
      <ingressTrunkId>0</ingressTrunkId>
      <blockDigit>+1829</blockDigit>
      <comment>Block Dominican</comment>
   </XBResourceBlock>
</XBResourceBlockList>

Manages configuration under Routes > Routes.

Supported actions: download, downloadLarge, update, updateLarge, delete, deleteLarge, upload, replaceLarge, query.

Supported payload: XML, JSON, CSV.

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/route

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/route"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBRouteList>
   <XBRoute>
      <tid>0</tid>
      <alias>999</alias>
      <digitMatch>default</digitMatch>
      <extension>1</extension>
      <policy>percentage</policy>
      <rd>
         <rdid>100</rdid>
         <loadPercentage>80</loadPercentage>
         <con_Routing>yes</con_Routing>
      </rd>
      <tod_type>weekly</tod_type>
      <tod_weekly>
         <tod_begin>
            <day>Monday</day>
            <hour>00:00:01</hour>
         </tod_begin>
         <tod_end>
            <day>Sunday</day>
            <hour>24:00:00</hour>
         </tod_end>
      </tod_weekly>
      <matchLenCondition>
         <minLen>1</minLen>
         <maxLen>40</maxLen>
      </matchLenCondition>
   </XBRoute>
</XBRouteList>

Manages configuration under Routes > Route Group.

Supported actions: download, update, delete, upload.

Supported payload: XML, JSON

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/routegroup

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/routegroup"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBRouteGroupList>
   <XBRouteGroup>
      <rgid>1</rgid>
      <alias>Default</alias>
      <policy>top_down</policy>
      <rd>
         <rdid>100</rdid>
         <con_Routing>yes</con_Routing>
      </rd>
      <rd>
         <rdid>555</rdid>
         <con_Routing>yes</con_Routing>
      </rd>
   </XBRouteGroup>
</XBRouteGroupList>

Manages configuration under Routes > Route Tables.

Supported actions: download, update, delete, upload.

Supported payload: XML, JSON.

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/routetable

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/routetable"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBRouteTableList>
   <XBRouteTable>
      <tid>1</tid>
      <alias></alias>
   </XBRouteTable>
   <XBRouteTable>
      <tid>2</tid>
      <alias>CNAM Proxy</alias>
   </XBRouteTable>
</XBRouteTableList>

Manages configuration under Service Ports > Service Ports.

Supported actions: download, update, delete, upload, query.

Supported payload: XML, JSON.

download

curl -k -X GET -u "$1":"$2" "https://$3:8888/SSConfig/webresources/download/serviceport

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/serviceport"
<?xml version="1.0" encoding="UTF-8"?>
<XBServicePortList>
   <XBServicePort>
      <svcPortIndex>1</svcPortIndex>
      <alias>Test</alias>
      <ethIf>eth0</ethIf>
      <vipAddress>10.197.40.216</vipAddress>
      <serviceType>SIP</serviceType>
      <portAddress>5060</portAddress>
      <svcPortType>UDP</svcPortType>
      <svcPortResType>Peering</svcPortResType>
      <msProfileId>1</msProfileId>
      <authenticationMode>None</authenticationMode>
      <certificateFileName></certificateFileName>
      <natEnable>no</natEnable>
      <natIP>0.0.0.0</natIP>
      <inSMCProfileId>0</inSMCProfileId>
   </XBServicePort>
</XBServicePortList>

Manages configuration under Service Ports > Certificates

Supported actions: update, delete.

Supported payload: P12/ZIP

update

curl -u $user:$pass -X POST -k -T files.zip
"https://$ip:8888/SSConfig/webresources/update/serviceport_certificates?passphrase=sansay123"

delete

curl -u $user:$pass -X DELETE -k -T files.zip
"https://$ip:8888/SSConfig/webresources/delete/serviceport_certificates"

Manages configuration under Resources > SMC Profiles

Supported actions: download, update, delete.

Limitations: update action only supports one SMC Profile at a time.

Supported payload: JSON

curl -u $user:$pass -X POST -k -T smc.json "https://$ip:8888/SSConfig/webresources/update/smc_profile"

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/smc_profile"

delete

curl -u $user:$pass -X DELETE -k -T files.zip
"https://$ip:8888/SSConfig/webresources/delete/smc_profile"

Payload

    {
      "ProfileID": 1,
      "ProfileName": "Replace DisplayName using DIDCNAM.csv",
      "Rules": [
        {
          "MsgType": "REQUEST",
          "ReqMethod": "INVITE",
          "DataFile": "DIDCNAM.csv",
          "DataFileBSearchIndex": 1,
          "Conditions": [
            {
              "Header": "From:",
              "HeaderAttr": "HEADER_SECTION_ONLY",
              "Macro": "GETURI_USERNAME",
              "Operator": "BSEARCH_EQ"
            }
          ],
          "Action": "REPLACE_MSG",
          "ReplaceDefs": [
            {
              "ReplaceType": "FINDSUB_LINES",
              "Header": "From:",
              "HeaderAttr": "HEADER_SECTION_ONLY",
              "Macro": "GETDISPLAYNAME",
              "Output": "{$DataFile.Field2}"
            }
          ]
        }]}

Manages configuration under Resources > SMC Data Files.

Supported actions: download, replace.

Supported payload: CSV/ZIP

downloadLarge

curl -k -X GET -o smc.zip -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/downloadLarge/smcDataFile

replaceLarge

curl -k -X POST -T files.zip -o smc.zip -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/replaceLarge/smcDataFile

Manages configuration under Resources > Stop Route Profiles.

Supported actions: download, update, delete.

Supported payload: XML

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/stop_route_profile"

update

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/stop_route_profile"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBStopRouteProfileList>
   <XBStopRouteProfile>
      <id>0</id>
      <alias>Default</alias>
      <sipTrunkStopCodes></sipTrunkStopCodes>
      <sipGlobalStopCodes>603</sipGlobalStopCodes>
      <h323TrunkStopCodes></h323TrunkStopCodes>
      <h323GlobalStopCodes></h323GlobalStopCodes>
   </XBStopRouteProfile>
   <XBStopRouteProfile>
      <id>10</id>
      <alias>DNO Only</alias>
      <sipTrunkStopCodes></sipTrunkStopCodes>
      <sipGlobalStopCodes>603</sipGlobalStopCodes>
      <h323TrunkStopCodes></h323TrunkStopCodes>
      <h323GlobalStopCodes></h323GlobalStopCodes>
   </XBStopRouteProfile>
   <XBStopRouteProfile>
      <id>11</id>
      <alias>DNO and RoboRisk</alias>
      <sipTrunkStopCodes></sipTrunkStopCodes>
      <sipGlobalStopCodes>603,604</sipGlobalStopCodes>
      <h323TrunkStopCodes></h323TrunkStopCodes>
      <h323GlobalStopCodes></h323GlobalStopCodes>
   </XBStopRouteProfile>
</XBStopRouteProfileList>

Manages configuration under Resources > Registrar.

Supported actions: download, downloadLarge, update, updateLarge, deleteLarge, upload, replaceLarge.

Limitations: downloads hashed (XXXX) password for security purposes.

Supported payload: XML, XML/ZIP

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/subscriber
curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/subscriber"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBSubscriberList>
   <XBSubscriber>
      <username>sansay</username>
      <password>XXXX</password>
      <auth>enable</auth>
      <trunkId>0</trunkId>
   </XBSubscriber>
   <XBSubscriber>
      <username>test</username>
      <password>XXXX</password>
      <auth>enable</auth>
      <trunkId>0</trunkId>
   </XBSubscriber>
</XBSubscriberList>

Manages configuration under Service Ports > Virtual IP

Supported actions: download, update, delete.

Limitations: downloads hashed (XXXX) password for security purposes.

Supported payload: XML, JSON

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/download/virtualip

update

curl -k -X POST -T file.xml -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/update/virtualip

delete

curl -k -X DELETE -T vip.xml -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/delete/virtualip

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBVirtualIpList>
   <XBVirtualIp>
      <ethIf>eth0</ethIf>
      <ip>1.2.3.4</ip>
      <subnetMask>255.255.255.0</subnetMask>
      <natEnable>no</natEnable>
      <natIP>0.0.0.0</natIP>
      <aha_id>0</aha_id>
   </XBVirtualIp>
</XBVirtualIpList>

The following endpoints are read-only except where an example is included for read/write.

Downloads and Manages active calls list. This is also available from the UI via Monitoring > Answered Calls.

Supported actions: download, delete, query.

Supported formats: XML, JSON.

Download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/stats/active_calls"

Query

Query specific DNIS

curl -u $USER:PASS -X GET -o activecall.xml "https://$SYSTEM_IP:8888/SSConfig/webresources/query/active_calls?queryString=dnis like '%123456%'".

Note: Depending on your development environment you may need to escape special characters. This is a similar query escaping blank space, single quote and percentage chars.

Character escape syntax:

curl -u $USER:PASS -X GET -o activecall.xml
"https://$SYSTEM_IP:8888/SSConfig/webresources/query/active_calls?queryString=dnis%20like%20%27%25123456%25%27'".

Delete

curl -T file.xml -k -X POST -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/delete/active_calls"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBActiveCallsList>
   <XBActiveCall>
      <ssm_index>8109</ssm_index>
      <orig_tid>3</orig_tid>
      <term_tid>6</term_tid>
      <dnis>8_2206</dnis>
      <ani>+15738170000</ani>
      <orig_ip>192.168.121.21</orig_ip>
      <term_ip>24.25.201.122</term_ip>
      <inv_time>04-29-2024-14:23:28 GMT-08</inv_time>
      <ans_time>04-29-2024-14:23:45 GMT-08</ans_time>
      <duration>26067</duration>
      <callID>1268093-2-1527473968@192.168.121.177</callID>
   </XBActiveCall>
   <XBActiveCall>
      <ssm_index>8106</ssm_index>
      <orig_tid>2</orig_tid>
      <term_tid>1</term_tid>
      <dnis>18587542200</dnis>
      <ani>+15738170000</ani>
      <orig_ip>8.14.115.88</orig_ip>
      <term_ip>192.168.121.21</term_ip>
      <inv_time>04-29-2024-14:23:07 GMT-08</inv_time>
      <ans_time>04-29-2024-14:23:07 GMT-08</ans_time>
      <duration>26105</duration>
      <callID>1268092-0-1527452818@192.168.121.177</callID>
   </XBActiveCall>
</XBActiveCallsList>

Searches and prints matching CDR records on the system. This is also available from the UI via Trace > CDR Trace.

Format: UI Printout, CSV/RAW.

Parameters:

  • string1 (required). This string can be anything in the CDR: Cause Code, ANI, DNIS, Trunk ID, specific value.
  • string2 (optional). This string can be anything in the CDR: Cause Code, ANI, DNIS, Trunk ID, specific value.
  • date in YYYY-MM-DD format (best practice). If empty = current time.
    • time in HH:MM format (best practice). If empty = now. Required if date is present.
    • duration in minutes. Required if date is present. Duration represents the search timespan.

Examples

Search current time for BYE

curl -u superuser:sansay -X GET -k -o cdr.csv
"https://192.168.9.42:8888/SSConfig/webresources/query/cdrlookup?queryString=string1=BYE"

Search on specific date for BYE

curl -u superuser:sansay -X GET -k "https://192.168.9.42:8888/SSConfig/webresources/query/cdrlookup?queryString=string1=BYE;date=2024-3-27;time=00:00;duration=60" 

Search for specific ANI (string1) on specific date.

curl -u superuser:sansay -X GET -k "https://192.168.9.42:8888/SSConfig/webresources/query/cdrlookup?queryString=string1=2234567890;date=2024-4-5;time=08:10;duration=100&format=text"

======================================================================
Session 1000067-9652900@192.168.9.42,    Release Cause = 0001
    Record Sequence Number = 000000016
    Termination Stack Cause =  200,  Normal BYE
    Start    = Fri Apr  5 08:07:36 2024
    Answer   = Fri Apr  5 08:07:39 2024
    Release  = Fri Apr  5 08:07:43 2024
    Duration (Seconds) = 3
    Post Dial Delay (Seconds) = 0
    Termination Post Dial Delay (Milliseconds) = 270
    Ring Time (Seconds) = 2
    Media    = WithMedia

  --Origination--
    Trunk ID = 000111
    ANI      = 2234567890,    From = 192.168.2.180
    DNIS     = 4444567890,    To = jwang1.com
    RN       =
    Call ID  = 2723867b97b240bba0c89e2300dc8c65
    Media IP:UDP     = 61.219.165.76:4020
    Switched IP:UDP  = 192.168.9.41:10000
    Codec List = G.711u_64k,RFC 2833

  --Termination--
    Trunk ID = 000111
    ANI      = 2234567890,    From = 192.168.9.41
    DNIS     = 4444567890,    To = 192.168.2.180
    RN       =
    Call ID  = 2723867b97b240bba0c89e2300dc8c65
    Media IP:UDP     = 192.168.2.180:50928
    Switched IP:UDP  = 192.168.9.41:10002
    Codec List = G.711u_64k,G.711a_64k,RFC 2833

  --Routing--
    Routed Digits = 4444567890
    Route Selection = 1,    Final Call Indication = Final Route Selection,    OLI =
    CNAM Dipped = No,    LNP Dipped = No,    External Route Server Dipped = No
    ERS Route Table = 0,    Sequence = 0,    Jurisdiction = 0
    Matched ERS Digits =

  --Packet Statistics--
    Orig:  Pkt In = 198,  Pkt Out = 197,  Byte In = 34056,  Byte Out = 33884,  MOS = 4.4
    Term:  Pkt In = 198,  Pkt Out = 197,  Byte In = 34056,  Byte Out = 33884,  MOS = 4.4

    Transcoded Media = No
    Orig Media = No,  Term Media = No
    FAS (msec)  Ring = 0,  Silence = 0

    Caller Identity Header Presence = No Identity Header
    Caller Identity Authentication = No Authentication
    Egress Caller Identity Header = Identity Header Not Sent
    Caller Identity Verification = No Verification
    Number of SIP Diversion Headers = 0
    Number of Inbound Diversion Passports = 0
    Number of Outbound Diversion Passports = 0

    Customer Rate =
    Vendor Rate =
    Caller Identity Header OrigID =

    Origination Video = No
    Termination Video = No

    Inbound RCD Passport Present = RCD Not Present
    Outbound RCD Passport Present = RCD Not Present

======================================================================
Session 1000069-9765530@192.168.9.42,    Release Cause = 0001
    Record Sequence Number = 000000017
    Termination Stack Cause =  200,  Normal BYE
    Start    = Fri Apr  5 08:09:29 2024
    Answer   = Fri Apr  5 08:09:31 2024
    Release  = Fri Apr  5 08:09:34 2024
    Duration (Seconds) = 3
    Post Dial Delay (Seconds) = 0
    Termination Post Dial Delay (Milliseconds) = 30
    Ring Time (Seconds) = 1
    Media    = WithMedia

  --Origination--
    Trunk ID = 000111
    ANI      = 3334567890,    From = 192.168.2.180
    DNIS     = 2234567890,    To = jwang1.com
    RN       =
    Call ID  = topLhafP1q1thWYAywqWMw..
    Media IP:UDP     = 192.168.2.180:50708
    Switched IP:UDP  = 192.168.9.41:10004
    Codec List = G.711a_64k,RFC 2833,G.711u_64k

  --Termination--
    Trunk ID = 000111
    ANI      = 3334567890,    From = 192.168.9.41
    DNIS     = 2234567890,    To = 192.168.2.180
    RN       =
    Call ID  = topLhafP1q1thWYAywqWMw..
    Media IP:UDP     = 61.219.165.76:4022
    Switched IP:UDP  = 192.168.9.41:10006
    Codec List = G.711a_64k,RFC 2833

  --Routing--
    Routed Digits = 2234567890
    Route Selection = 1,    Final Call Indication = Final Route Selection,    OLI =
    CNAM Dipped = No,    LNP Dipped = No,    External Route Server Dipped = No
    ERS Route Table = 0,    Sequence = 0,    Jurisdiction = 0
    Matched ERS Digits =

  --Packet Statistics--
    Orig:  Pkt In = 146,  Pkt Out = 149,  Byte In = 24953,  Byte Out = 25628,  MOS = 4.4
    Term:  Pkt In = 152,  Pkt Out = 146,  Byte In = 26144,  Byte Out = 24953,  MOS = 4.4

    Transcoded Media = No
    Orig Media = No,  Term Media = No
    FAS (msec)  Ring = 0,  Silence = 0

    Caller Identity Header Presence = No Identity Header
    Caller Identity Authentication = No Authentication
    Egress Caller Identity Header = Identity Header Not Sent
    Caller Identity Verification = No Verification
    Number of SIP Diversion Headers = 0
    Number of Inbound Diversion Passports = 0
    Number of Outbound Diversion Passports = 0

    Customer Rate =
    Vendor Rate =
    Caller Identity Header OrigID =

    Origination Video = No
    Termination Video = No

    Inbound RCD Passport Present = RCD Not Present
    Outbound RCD Passport Present = RCD Not Present

Prints CDR stats. This endpoint can be used to correlate billing platforms against CDR stats.

Read

curl -u $user:$password -X GET -k "https://$host:8888/SSConfig/webresources/system/cdr_stats"

Payload

CDR Processed           = 2
Number of Final Calls   = 2
Number of Intermediate Calls = 0
Release Cause Normal   = 2
Release Cause No Answer = 0
Release Cause No Answer by System = 0
Release Cause 4xx       = 0
Release Cause 5xx       = 0
Release Cause 6xx       = 0
Release Cause 8xx       = 0
Release Cause 9xx       = 0

Supported formats: XML, JSON

Read

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/stats/realtime"

Payload

<?xml version="1.0"?>
<mysqldump>
<database name="lb">
    <table name="system_stat">
    <row>
        <field name="id">1</field>
        <field name="sum_active_session">2</field>
        <field name="sum_attempt_session">5319</field>
        <field name="peak_active_session">15</field>
        <field name="max_session_allowed">1000</field>
        <field name="max_session_exceed">0</field>
        <field name="inbound_sip_leg">2</field>
        <field name="outbound_sip_leg">2</field>
        <field name="peak_sip_leg">30</field>
        <field name="inbound_h323_leg">0</field>
        <field name="outbound_h323_leg">0</field>
        <field name="peak_h323_leg">0</field>
        <field name="cpu_idle_percent">99</field>
        <field name="flow_control_lev">0</field>
        <field name="cluster_active_session">2</field>
        <field name="cluster_peak_session">15</field>
        <field name="demo_lic">-1</field>
        <field name="slave_stat">1</field>
        <field name="ha_pre_state">boot</field>
        <field name="ha_current_state">boot</field>
        <field name="ha_remote_status">127</field>
        <field name="switch_over_flag">3</field>
        <field name="ha_local_status">25</field>
        <field name="max_cps_allowed">10000</field>
        <field name="max_cps_exceed">0</field>
        <field name="current_cps">0</field>
    </row>
    </table>
    <table name="gw_realtime_stat">
    </table>

<table name="XBResourceRealTimeStatList">
<row>
<field name="trunkId">1</field>
<field name="alias">VENICE_RESOURCE_ONNET_OFFNET_CS</field>
<field name="fqdn">Group</field>
<field name="numOrig">0</field>
<field name="numTerm">1</field>
<field name="cps">0</field>
<field name="numPeak">1</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
<row>
<field name="trunkId">1</field>
<field name="alias">VENICE_RESOURCE_ONNET_OFFNET_CS</field>
<field name="fqdn">192.168.121.21</field>
<field name="numOrig">0</field>
<field name="numTerm">1</field>
<field name="cps">0</field>
<field name="numPeak">1</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
<row>
<field name="trunkId">2</field>
<field name="alias">VENICE_TRUNK_OFFNET_DEFAULT</field>
<field name="fqdn">Group</field>
<field name="numOrig">1</field>
<field name="numTerm">0</field>
<field name="cps">0</field>
<field name="numPeak">1</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
<row>
<field name="trunkId">2</field>
<field name="alias">VENICE_TRUNK_OFFNET_DEFAULT</field>
<field name="fqdn">8.14.115.88</field>
<field name="numOrig">1</field>
<field name="numTerm">0</field>
<field name="cps">0</field>
<field name="numPeak">1</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
<row>
<field name="trunkId">3</field>
<field name="alias">VENICE_RESOURCE_ONNET_PBX_CS2</field>
<field name="fqdn">Group</field>
<field name="numOrig">1</field>
<field name="numTerm">0</field>
<field name="cps">0</field>
<field name="numPeak">8</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
<row>
<field name="trunkId">3</field>
<field name="alias">VENICE_RESOURCE_ONNET_PBX_CS2</field>
<field name="fqdn">192.168.121.21</field>
<field name="numOrig">1</field>
<field name="numTerm">0</field>
<field name="cps">0</field>
<field name="numPeak">8</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
<row>
<field name="trunkId">6</field>
<field name="alias">VENICE_RESOURCE_ONNET_PHONE_CS2</field>
<field name="fqdn">Group</field>
<field name="numOrig">0</field>
<field name="numTerm">1</field>
<field name="cps">0</field>
<field name="numPeak">8</field>
<field name="totalCLZ">1</field>
<field name="numCLZCps">0</field>
<field name="totalLimit">500</field>
<field name="cpsLimit">500</field>
</row>
</table>
</database>
</mysqldump>

Downloads Trunk ID statistics (15-min, 60-min, 3600-min). Also avaialable at (Monitoring > Resource Stats).

Supported formats: XML, JSON

Read

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/stats/resource"

Payload

<?xml version="1.0"?>
<mysqldump>
<database name="lb">
    <table name="ingress_stat">
    <row>
        <field name="id">1</field>
        <field name="trunk_id">6</field>
        <field name="1st15mins_call_attempt">0</field>
        <field name="1st15mins_call_answer">0</field>
        <field name="1st15mins_call_fail">0</field>
        <field name="1h_call_attempt">1</field>
        <field name="1h_call_answer">1</field>
        <field name="1h_call_fail">0</field>
        <field name="24h_call_attempt">2</field>
        <field name="24h_call_answer">2</field>
        <field name="24h_call_fail">0</field>
        <field name="1st15mins_call_durationSec">0</field>
        <field name="1h_call_durationSec">36</field>
        <field name="24h_call_durationSec">79</field>
        <field name="alias">VENICE_RESOURCE_ONNET_PHONE_C</field>
        <field name="1st15mins_pdd_ms">0</field>
        <field name="1h_pdd_ms">0</field>
        <field name="24h_pdd_ms">0</field>
    </row>
    </table>
    <table name="gw_egress_stat">
    <row>
        <field name="id">5</field>
        <field name="trunk_id">21004</field>
        <field name="1st15mins_call_attempt">0</field>
        <field name="1st15mins_call_answer">0</field>
        <field name="1st15mins_call_fail">0</field>
        <field name="1h_call_attempt">0</field>
        <field name="1h_call_answer">0</field>
        <field name="1h_call_fail">0</field>
        <field name="24h_call_attempt">0</field>
        <field name="24h_call_answer">0</field>
        <field name="24h_call_fail">0</field>
        <field name="1st15mins_call_durationSec">0</field>
        <field name="1h_call_durationSec">0</field>
        <field name="24h_call_durationSec">0</field>
        <field name="alias">Carlos Perez</field>
        <field name="1st15mins_pdd_ms">0</field>
        <field name="1h_pdd_ms">0</field>
        <field name="24h_pdd_ms">0</field>
    </row>
    </table>
</database>
</mysqldump>

Provides real-time session information

Read

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/stats/resource_detail"

Payload

<?xml version="1.0" encoding="UTF-8"?>
<XBResourceDetailRealTimeStatList>
   <XBResourceDetailRealTimeStat>
      <origTrunkId>2</origTrunkId>
      <origAlias>VENICE_TRUNK_OFFNET_DEFAULT</origAlias>
      <origGrpCap>500</origGrpCap>
      <origGrpCps>500</origGrpCps>
      <origFqdn>10.14.115.88</origFqdn>
      <origCap>500</origCap>
      <origCps>500</origCps>
      <termTrunkId>1</termTrunkId>
      <termAlias>VENICE_RESOURCE_ONNET_OFFNET_CS</termAlias>
      <termGrpCap>500</termGrpCap>
      <termGrpCps>500</termGrpCps>
      <termFqdn>192.168.121.21</termFqdn>
      <termCap>500</termCap>
      <termCps>500</termCps>
      <numActive>1</numActive>
      <peakActive>1</peakActive>
      <cps>0</cps>
   </XBResourceDetailRealTimeStat>
</XBResourceDetailRealTimeStatList>

Reads statistics available under Monitoring > SIP Stats.

Read

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/stats/sip_stats

Payload

<XBSipStatsList>
   <XBSipStats>
      <timeStamp>2024-04-29T21:45:04.000Z</timeStamp>
      <numSIPDialogs>4</numSIPDialogs>
      <numSIPSubscribeDialogs>0</numSIPSubscribeDialogs>
      <tcpConnectionBuffers>1</tcpConnectionBuffers>
      <numRegisteredSubs>13</numRegisteredSubs>
      <avgRegistersPerSec>0</avgRegistersPerSec>
      <totNumRegisterMsgs>8889573</totNumRegisterMsgs>
      <numSipBuffAlloc>1</numSipBuffAlloc>
      <sipDeviceErrStats>
         <deviceIP>10.14.115.88</deviceIP>
         <optionsPoll>Active</optionsPoll>
         <rxInviteResends>0</rxInviteResends>
         <inviteResends>0</inviteResends>
         <inviteTimeouts>0</inviteTimeouts>
         <nonInviteResends>0</nonInviteResends>
         <nonInviteTimeouts>0</nonInviteTimeouts>
         <dialogMatchErrors>0</dialogMatchErrors>
         <protocolErrors>0</protocolErrors>
         <srcVerifyFailures>0</srcVerifyFailures>
      </sipDeviceErrStats>
      <dosStats></dosStats>
   </XBSipStats>
</XBSipStatsList>

Downloads statistics displayed under Monitoring > Subscriber Stats.

Format: XML, JSON.

Download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/stats/sub_stats

Description of fields:

  • States:
    • Authenticated: Successful registration.
    • Unauthenticated: Registration with pending authentication.
    • Blocked: Endpoint has failed N number of authentication attempts.
    • Pending: Transient state normally indicates waiting for Feature Server/Registrar.
  • Trunk ID: Trunk ID associated with the registered user.
  • Create Time: Registration instance when the device first registered.
  • Username.
  • User Domain.
  • User IP: Source IP address of registering endpoint.
  • User Port: Source Port of registering endpoint.
  • ID: Registration ID created by the VSXi for internal tracking purposes.
  • NAT: Network Address Translation detection (Yes, No).
  • SPID: Origination Service Port ID.
  • Protocol:
    • UDP
    • TCP
    • TLS (TLS v1.0, TLS v1.1, TLS v1.2, TLS v1.3).
    • Note: TLS protocol version display added in VSXi-10.7.1.70+.
  • Expiration: Calculation of when this registration will expire if the device fails to re-register timely. This was designed for Push Notifications that may not re-register for days or weeks.
  • Agent: SIP User-Agent disclosed in the SIP REGISTER.
  • PN-PARAM: Push Notifications pn-param per RFC8599.

Payload

<XBSubStatsList>
   <XBSubStats>
      <states>AUTHENTICATED</states>
      <trunkId>00013</trunkId>
      <createTime>02-10-2023 17:20:52</createTime>
      <username>2200_06</username>
      <userDomain>sip.sansay.com</userDomain>
      <userIp>192.168.191.98</userIp>
      <userPort>5188</userPort>
      <id>2-1</id>
      <nat>Yes</nat>
      <spid>3</spid>
      <protocol>UDP</protocol>
      <expiration>03-13-2023 07:46:05</expiration>
      <agent>MicroSIP/3.21.3</agent>
      <pn-param></pn-param>
   </XBSubStats>

Allows managing the Subscriber Stats page by deleting specific entries. The API request can specify from one or multiple fields to perform the delete. The following fields can be included:

  • "username",
  • "trunkID",
  • "id" (Subscriber ID),
  • "userDomain" (Host) or
  • "userIp" (Source IP)

Multiple entries are interpreted as an AND operator.

 
Example:

curl -u username:password -X DELETE -k -T sub_stats_delete.xml
'https://testip:8888/SSConfig/webresources/delete/sub_stats'

<?xml version="1.0" encoding="UTF-8"?>
<XBSubStatsList>
<XBSubStats>
<username>8_2216_M</username>
<userDomain>venice-domain-cs2</userDomain>
<id>3-7</id>
<userIp>72.197.139.18</userIp>
<trunkId>00006</trunkId>
</XBSubStats>
<XBSubStats>
<username>8_2215</username>
</XBSubStats>
</XBSubStatsList>

All requests receive a 200 OK.

Downloads general system stats in text format.

download

curl -k -X GET -u "$1":"$2"
"https://$3:8888/SSConfig/webresources/system/realtime"

Payload

System Status at:     Mon Apr 29 21:14:11 GMT 2024
CPU Idle Percentage:  99%
HD Available Space:   138G
HW Up Time:           65 days, 21:14:11
SW Start Time:        Apr 29 18:26
Avail Memory(MB):     5681, 5681 (VM)
Eth0 Rx  packets:3641864
Eth0 Rx  bytes:938301528
Eth0 Rx  errors:0
Eth0 Rx  dropped:0
Eth0 Rx  overruns:0
Eth0 Rx  frame:0
Eth0 Tx  packets:4028692
Eth0 Tx  bytes:595862094
Eth0 Tx  errors:0
Eth0 Tx  dropped:0
Eth0 Tx  overruns:0
Eth0 Tx  carrier:0
Eth0 Tx  collisions:0
Eth1 Rx  packets:1628
Eth1 Rx  bytes:132048
Eth1 Rx  errors:0
Eth1 Rx  dropped:0
Eth1 Rx  overruns:0
Eth1 Rx  frame:0
Eth1 Tx  packets:627877
Eth1 Tx  bytes:26393760
Eth1 Tx  errors:0
Eth1 Tx  dropped:0
Eth1 Tx  overruns:0
Eth1 Tx  carrier:0
Eth1 Tx  collisions:0
Slave Status: NoMaster


Number of active network sessions        = 0
Peak number of active network sessions   = 0
Maximum network sessions allowed         = 1000


Number of active cluster sessions        = 0
Peak number of active cluster sessions   = 0
Maximum cluster sessions allowed         = 1000


Number of active local sessions          = 0
Peak number of local concurrent sessions = 0
Maximum local sessions allowed           = 1000
Number of times maximum exceeded         = 0
Total number of local session attempts   = 0
Total number of local session answered   = 0

Number of orig CPS (past 5 seconds)      = 0  0  0  0  0
Peak number of orig CPS                  = 0
Maximum orig CPS allowed                 = 10000
Number of times max CPS exceeded         = 0
Number of term CPS (past 5 seconds)      = 0  0  0  0  0
Peak number of term CPS                  = 0
Number of ERS CPS (past 5 seconds)       = 0  0  0  0  0
Peak number of ERS CPS                   = 0
Number of LNP CPS (past 5 seconds)       = 0  0  0  0  0
Peak number of LNP CPS                   = 0
Number of LNP STI-AS CPS (past 5 seconds) = 0  0  0  0  0
Peak number of LNP STI-AS CPS            = 0
Number of STI-AS CPS (past 5 seconds) = 0  0  0  0  0
Peak number of STI-AS CPS                = 0
Number of STI-VS CPS (past 5 seconds) = 0  0  0  0  0
Peak number of STI-VS CPS                = 0

Number of inbound SIP legs in progress   = 0
Number of outbound SIP legs in progress  = 0
Peak number of SIP legs                  = 0

Number of inbound H323 legs in progress  = 0
Number of outbound H323 legs in progress = 0
Peak number of H323 legs                 = 0

CPU idle                                 = 99%
Flow control level                       = 0
Total number of loop detections          = 0
Radius server resends                    = 0
Radius server failures                   = 0
Session Blocks                  In Use   = 0    Peak = 0    Max = 500
Dialog Blocks                   In Use   = 0    Peak = 0    Max = 2000
Syslog Buffer Exceeded          Drops    = 0
Timer Buffers Pid 4E13            In Use   = 2    Peak = 5    Max = 1000
ICE Blocks                      In Use   = 0    Peak = 0    Max = 0


Transcode sessions active local          = 0
Transcode sessions active nlz total      = 0
Transcode sessions nlz total peak        = 0
Transcode max license                    = 5000
Transcode sessions exceeded              = 0


Media Server 192.168.40.216 -     Status = UP,   # Sessions = 0,   # Video Sessions = 0


VM Authentication Status - Active!


VM Grace Period Remaining Hours: 168/168
System Code Version:VSXi-11.2.2.2-lvm

Download

curl -k -X GET -u "$1":"$2" -o output.zip "https://$3:8888/SSConfig/webresources/downloadLarge/systemConfiguration

Verify

curl -u $1:$2 -X POST -k -T configFileName.zip
"https://xxx:8888/SSConfig/webresources/verify/verifyConfig

Supported action: replace (via updateLarge)

Supported format: SDC/ZIP

Limitations: requires a superuser role.

curl -u $1:$2 -X POST -k -T configFileName.zip
"https://$3:8888/SSConfig/webresources/updateLarge/restoreConfig"

Manages system users also avaialble under System > Users.

Supported format: XML.

Supported actions: update, delete.

update

curl -u $1:$2 -X POST -k -T users.xml
"https://$3:8888/SSConfig/webresources/update/users"

delete

curl -u $1:$2 -X POST -k -T users.xml
"https://$3:8888/SSConfig/webresources/delete/users"

Payload

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XBUserList>
    <XBUser>
        <username>kim123</username>
        <password>sansay</password>
        <auth>super</auth>
        <firstname>Kim 123</firstname>
        <lastname>Nguyen</lastname>
    </XBUser>
</XBUserList>

 

This paragraph lists codes returned by VSXi server in response to various requests. Each return message has the return code and text message that describes the code.

Code Associated Message Description
200 200 OK General OK response.
  200 OK - uploadXmlFile success. File upload was OK.
300 Finished With Errors File was uploaded but some items failed validation and were discarded. Valid items were processed successfully.
400 400 fail - invalid table specified: + requested table name. Invalid table name.
    Invalid table name.
  400 fail - validation exception XML validation error.
  400 fail - digit match can not be empty Digit match has to be specified for RouteLookUp
  400 – failed Other types of errors (exception)
401 401 Fail - User Not Authorized: Invalid username or no read/write permissions. User is not authorized or doesn't have permissions
  401 Fail - User Not Authorized: invalid user password User password is invalid.
402 402 Fail - This action is not allowed while system is in Load-Balance Slave mode

No configuration changes are allowed on slave servers data can only be dowloaded

When data is uploaded to the VSXi server in plain-text the whole file is validated and if any error is found, the process is aborted and no changes are done to the system table.

In case when “Large” commands are used with compressed (zipped) data, if an error is found in one entry (XML element), that entry is thrown away and error is logged to the user log file. However, the process continues. For example, if one route is found to be invalid, it’s thrown away, but the other routes are processed and stored in DB (updated, replaced, deleted...). In that case the return code is 300, and the message describing the error is “300 Finished With Errors - Validation Errors were detected. Please see User Access Log file for details.”

In both cases errors are logged to User Access Log File that can be found and downloaded in GUI, Trace>User Log tab. Upper box on this page lists all User Log files available for download, and the lower box shows the latest entries in the latest file – user_access.log.

Configuration tables that support the query action are listed below.

Querying a table allows you to download just a portion of the content you are interested in instead of the entire table. This is the list of table parameters currently supported:

resource route digit_mapping
alias alias alias
allow_directMedia digit_match table_id
cause_code_profile_id end_tod oani
CNAME_group_index group_id odnis
codec_policy max_len tani
company_name min_len tdnis
cps_limit policy  
digit_trans_id resource_id_1  
direction resource_id_2  
DNC_group_index resource_id_3  
ERS_group_index resource_id_4  
LNP_group_index resource_id_5  
max_call_duration resource_id_6  
no_answer_timeout resource_id_7  
no_ring_timeout resource_id_8  
option_poll start_tod  
pai_action table_id  
pai_string    
RADIUS_acct_group_index    
RADIUS_auth_group_index    
service_port_index    
service_state    
sip_profile_index    
source_address    
stop_route_profile_id    
table_id    
tech_prefix    
trunk_id    
egress_smc_profile_id    
srtp_enable    
sti_ingress_authentication    
sti_ingress_verification    
sti_egress_id_hdr_treatment    
STI_AS_group_index    
STI_VS_group_index    
nat_peering    
     
curl -u USERNAME:PASSWORD -X GET -o DMT.xml
              "https://SERVER_IP:8888/SSConfig/webresources/query/digit_mapping?queryString=alias like '%TEST%'"

or

curl -u USERNAME:PASSWORD -X GET -o DMT.xml
             "https://SERVER_IP:8888/SSConfig/webresources/query/digit_mapping?queryString=alias%20like%20%27%25TEST%25%27"

Reply

null