Overview

This document outlines the API interface used for interacting with SolSwitch systems through outside applications. The functions available and the guidelines for using them are described below. The API functions use JSON for communication and follow the following guidelines:

The application provider will provide a delivery agent to send the request as an HTTP POST. The request will deliver the document as content-type application/json with json formatted key/value pairs in the request body, or as HTTP POST variables with content-type application/x-www-form-urlencoded.

For security reasons, the API requires either a system generated API key to be used or a specific IP address to be given permission to connect. For additional security, both measures can be enabled.

Formatting

All API URLs will be formatted as follows, where 'solswitch' is the IP or domain of the desired system, and 'function' is the name of the function being called (as provided below): solswitch/api/function/

Call Functions

Add Header

Insert a custom header into an upcoming outbound call.

Add Header URL: solswitch/api/addheader/

The request must contain the following attributes:

  • One of srcnumber or dstnumber: At least one is required. Both may be supplied together to match on the source and destination of the same call.
    • srcnumber: The source number to apply the new custom header to. If the call originates from an extension, srcnumber should be the extension number.
    • dstnumber: The destination number to apply the new custom header to.
  • header-name: The name of the custom header to be applied.
  • value: The value of the custom header.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                    
                  POST /api/addheader/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "srcnumber": "123",
                    "header-name": "ExampleHeader",
                    "value": "ExampleValue"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK"
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Missing required field destination number or source number"
                  }
                    
                

Digit Validation

A Digit Validation (DV) is configured with a URL directing to an external API file. When a call is routed to that DV, the caller is requested to dial digits which are passed along the API URL. The API should then provide a response which tells the DV how to route the call. A DV can be configured in Phone System -> API Digit Validation.

A report of results for DVs can be pulled using the Digit Validation Log API.

The request will be an HTTP POST request which contains the following attributes:

  • Digits: The digits entered by the caller when prompted.
  • ExtensionNumber: The extension number of the DV.
  • CDRCallID: The ID of the call sending the request.
  • CIDName: The Caller ID Name of the caller.
  • CIDNum: The Caller ID Number of the caller.
  • DID: The number the caller dialed to reach the DV.

The response should just print out a single string which corresponds to one of the configured options in the DV.

Request:

                    
                  POST /external/endpoint HTTP/1.1
                  {
                    "Digits": "12345",
                    "ExtensionNumber": "100",
                    "CDRCallID": "56789",
                    "CIDName": "Example Caller",
                    "CIDNum": "7055551234",
                    "DID": "7055556789"
                  }
                    
                

Response

                    
                  Support
                    
                

Hold Call

The Hold Call function is used to put an active call on hold.

Hold Call URL: solswitch/api/holdcall/

The request must contain the following attributes:

  • Channel: Channel of an active call to be put on hold, as returned by 'List Active Calls'.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                    
                  POST /api/holdcall/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 96
                  {
                    "Channel": "SIP/Example2-000003ee",
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK"
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Unknown Customer ID"
                  }
                    
                

Manage Caller ID Routes

This function can add, edit, or delete caller ID routes.

Manage Caller ID Routes URL: solswitch/api/managecid/

The request must contain the following attributes:

  • Type: Defines the desired function. The only options allowed are 'addedit' and 'del'.
  • CID: Caller ID needed to modify a route.
  • Extension: Provide extension to assign to the CID Route. Required when Type is 'addedit'.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Message: This will output a success message if there are no issues.

Request:

                    
                  POST /api/managecid/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 96
                  {
                      "Customer": "1",
                      "Key": "NCGIPEHffCVgDYUMTLQVOeSecbWbfKEZ",
                      "Type": "addedit",
                      "CID": "100",
                      "Extension": "500"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "Message": "Successfully added CID"
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "No type was given"
                  }
                    
                

New Call - Standard

The New Call function is used to generate a call from a user's extension or another system feature to a specified destination.

New Call URL: solswitch/api/newcall/

The request must contain the following attributes:

  • Extension: The source of the call, generally the extension number of a user's Extension but can also be another system feature such as an IVR, Digit Validation or Custom Script. Extensions are numeric values, 3 to 5 digits in length.
  • Destination: The destination the call should be connected to. Destination is a numeric value.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • CIDName: Defaults to caller ID details of the extension. Caller ID name to use for the call.
  • CIDNum: Defaults to caller ID details of the extension. Caller ID number to use for the call.
  • Timeout: Defaults to 25. Time in seconds to wait before ending the call if unanswered.
  • WaitForStart: Defaults to 1. Must be set to 1 or 0. When set to 0, the API will respond instantly, and only return the OK status. When set to 1, it will wait until the call has been started and also returns the callID and Channel.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • CallID: ID of the connected call (On OK return status).
  • Channel: Source channel of the connected call (On OK return status).
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                    
                  POST /api/newcall/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 109
                  {
                    "Extension": "123",
                    "Destination": "17055551234",
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "Timeout": "30",
                    "WaitForStart": "0"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "CallID": "758923",
                    "Channel": "SIP/Example2-000004fb"
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Error with Key"
                  }
                    
                

New Call - Advanced Digit Validation

Beyond the standard functionality described above, the New Call API can be used in combination with the Digit Validation API to perform more complex tasks based on the provided data.

For this functionality, these additional optional attributes can be included as part of the request:

  • CustomDVData: An array containing key value pairs for substitution when using a DigitValidation as the Extension attribute. When processing replacements we use ${} to determine variable names. For example to replace a variable URL within the request you would use ${URL} to denote where to place that data and pass an array containing the key URL with some value.
    • URL: URL to use in place of the set URL for the Digit Validation.
    • Method: POST or GET.
    • Auth: Type of authentication to use. For example "Header" authorization would expect AuthInfo to contain "type" and "credentials".
    • AuthInfo: Dependant on the Auth type above.
    • Response: A special response to send if the request to the URL was successful.
    • CustomData: An array containing data to be sent to the URL instead of the regular call data.
    • Headers: An array of headers to add to the request NoURL - Boolean value determining whether or not to try to call out to the URL of the DigitValidation.
  • CustomDVDigits: An array containing special instructions for handling digits being pressed when using a DigitValidation as the Extension attribute. The digit is the index of the array with the value containing the instructions. All attribute values are passed through substitution for the CustomDVData array. Setting the URL attribute to "https://${URL}/api/" would replace ${URL} with whatever you set in the above array.

Outbound Fax

The Outbound Fax function is used to send a fax to a specified number.

Outbound Fax URL: solswitch/api/fax/

The request must contain the following attributes:

  • To: The fax number to send to. No '-'s allowed.
  • From: The fax number to send from. No '-'s allowed. Must be set up as a FaxToEmail DID.
  • File: The PDF to send, as either: a location (path or URL) accessible from the SolSwitch, or a base64-encoded data URI in the form data:application/pdf;base64,<data>. Leave this blank if uploading a local file before submitting.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL". Indicates whether the fax was queued properly.
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                    
                  POST /api/fax/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "To": "7055553482",
                    "From": "7055551234",
                    "File": "http://path.to.file/faxMe.pdf"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK"
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "You must upload a file to fax."
                  }
                    
                

Schedule Queue Callback

Schedule a callback for a queue.

Schedule Queue Callback URL: solswitch/api/scheduledqueuecallback/

The request must contain the following attributes:

  • queueID: The ID for the queue that's scheduling the callback.
  • Number: The number to dial for the callback.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • CIDName: Optional name for the caller ID.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Message: This will output a success message if there are no issues.

Request:

                    
                  POST /api/scheduledqueuecallback/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "1",
                    "Key": "NCGIPEHffCVgDYUMTLQVOeSecbWbfKEZ",
                    "queueID": "146",
                    "Number": "2495551234",
                    "CIDName": "TestCall"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "Message": "Successfully added scheduled callback."
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Error adding to queue, please try again."
                  }
                    
                    

SIP Packet POST

The SIP Packet Post API is used to call an external API when an INVITE packet is received by specified SIP accounts. To access this feature, go to Advanced Tools -> API Management -> SIP API Settings.

The request will be an HTTP POST request which contains the following attributes:

  • APIKey: Key configured in Packet POST settings for authentication.
  • FromIP: Source IP address for the INVITE.
  • InviteTo: Destination number of the INVITE.
  • RawPacket: Full INVITE packet as received by the SolSwitch.
  • PacketHash: The full INVITE encoded using md5. Can be used to validate that the full packet was properly received.
  • AttemptNumber: Number of attempts made to deliver this POST request.

The response from the API must be the string "SUCCESS".

Request:

                    
                  POST /external/endpoint HTTP/1.1
                  {
                    "APIKey": "sdfSADFAKSJLHDKasd",
                    "FromIP": "192.168.176.34",
                    "InviteTo": "7055551694",
                    "RawPacket": "INVITE sip:7055551694 (packet truncated for this document)",
                    "PacketHash": "eed1e35af3d1530385d0983f020a22f1",
                    "AttemptNumber": "1"
                  }
                    
                    

Response

                    
                  SUCCESS
                    
                    

SIP POST Notification

SIP POST Notifications are used to call an external API when calls on the system are started or ended, based on the configured options. To access this feature, go to Advanced Tools -> API Management -> SIP API Settings.

The request will be an HTTP POST request which contains the following attributes:

  • Event: The call event that occurred. These are: Incoming, Outgoing, Connected and Disconnected.
  • CallID: The ID of the call.
  • Customer: The ID of the destination customer.
  • SourceNumber: Caller ID Number or Extension of the source of the call.
  • SourceChannel: Connected SIP Channel of the source of the call.
  • DestinationNumber: Caller ID Number or Extension of the destination of the call.
  • DestinationChannel: Connected SIP Channel of the destination of the call.
  • DialedNumber: The number that was dialed to reach the destination.

No response is required from the endpoint.

Request:

                    
                  POST /external/endpoint HTTP/1.1
                  {
                    "Event": "Incoming",
                    "CallID": "5332",
                    "Customer": "1",
                    "SourceNumber": "7055551694",
                    "SourceChannel": "SIP/Source-00023c5",
                    "DestinationNumber": "7057771234",
                    "DestinationChannel": "SIP/Destination-00052c7",
                    "DialedNumber": "7057771234"
                  }
                    
                    

Transfer Call

The Transfer Call function is used to transfer a currently active call to a new destination.

Transfer Call URL: solswitch/api/transfercall/

The request must contain the following attributes:

  • Channel: Channel of the call to be transferred to a new destination, as returned by 'List Active Calls'.
  • Destination: The destination the call should be transferred to. Destination is a numeric value.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                    
                  POST /api/transfercall/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Channel": "SIP/Example2-000003ee",
                    "Destination": "17055551234",
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                    
                    

Response (SUCCESS)

                    
                  {
                    "Status": "OK"
                  }
                    
                    

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "IP address not allowed"
                  }
                    
                    

Transmit DTMF

The Transmit DTMF function is used to send a DTMF tone to a specified channel.

Transmit DTMF URL: solswitch/api/dtmf/

The request must contain the following attributes:

  • Tone: The DTMF tone to be transmitted, accepted values are: 0-9 * #.
  • Channel: Channel of an active call where the tones should be sent. This would be the channel of the desired recipient, as returned by the 'List Active Calls' function.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                    
                  POST /api/dtmf/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 107
                  {
                    "Tone": "#1",
                    "Channel": "SIP/Example-000003ee",
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                    
                    

Response (SUCCESS)

                    
                  {
                    "Status": "OK"
                  }
                    
                    

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Unknown Channel"
                  }
                    
                    

Call Reporting

Agent Stats

The Agent Stats function returns all relevant information for Agent busy status.

Agent Stats URL: solswitch/api/agentstats/

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Extension: If provided, will only return information related to the given extension.
  • Date: Defaults to the current date. If provided, will only return information related to the given date. Format: YYYY-MM-DD.
  • DateStart: If provided, DateEnd is required. This will limit the returned data to be within DateStart and DateEnd. Format: YYYY-MM-DD.
  • DateEnd: If provided, DateStart is required. This will limit the returned data to be within DateStart and DateEnd. Format: YYYY-MM-DD.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Extension IDs: Details on the individual extensions (On OK return status). Attributes:
    • ActionIDs: Array of all actions performed by the extension.
  • ActionIDs: An array of action records keyed by action ID. Contains the following attributes:
    • Action: The new status of the extension.
    • DateTime: The datetime this action was done.
    • DateTimeUnix: The unixtime the action was done.
    • ReasonCode: The reason code used to enable busy/paused status if one was required.

Request:

                    
                  POST /api/agentstats/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "Date": "2018-05-30"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "220": {
                      "978398": {
                        "Action": "In",
                        "DateTime": "2018-05-30 00:00:00",
                        "DateTimeUnix": 1527652800,
                        "ReasonCode": ""
                      },
                      "978400": {
                        "Action": "Paused",
                        "DateTime": "2018-05-30 11:28:35",
                        "DateTimeUnix": 1527694115,
                        "ReasonCode": "10"
                      },
                      "978401": {
                        "Action": "Out",
                        "DateTime": "2018-05-30 23:59:59",
                        "DateTimeUnix": 1527739199,
                        "ReasonCode": ""
                      }
                    }
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "No matching end time"
                  }
                    
                

Call Recording

The Call Recording function is used to retrieve the URL(s) for the audio file(s) of a recorded call. A single call could have multiple recordings if the call went to multiple places on the system (ex, if the call was transferred to a second extension).

Call Recording URL: solswitch/api/recording/

The request must contain the following attributes:

  • CallID: Unique ID of the call to retrieve recordings for.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Recording: Array of call recordings and relevant information. Attributes:
    • StartTime: Time that this portion of the call connected.
    • EndTime: Time that this portion of the call ended.
    • Duration: Duration of this portion of the call.
    • SourceName: Name of the caller.
    • SourceNumber: Extension or number of caller.
    • SourceChannel: Channel of the source of the call.
    • DestinationName: Name of the destination.
    • DestinationNumber: Extension or number the call was connected to.
    • DestinationChannel: Channel of the destination of the call.
    • URL: URL to download the MP3 file of the recording.

Request:

                    
                  POST /api/recording/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 78
                  {
                    "CallID": "62135",
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "Recording": [
                      {
                        "StartTime": "2018-01-20 14:00:00",
                        "EndTime": "2018-01-20 14:01:23",
                        "Duration": "00:01:23",
                        "SourceName": "Example Caller",
                        "SourceNumber": "7055551234",
                        "SourceChannel": "SIP/Example3-000006e1",
                        "DestinationName": "Test Phone",
                        "DestinationNumber": "456",
                        "DestinationChannel": "SIP/Example2-000003ee",
                        "URL": "solswitch/download-file.php?id=621351&sc=a7ebe5fa6b5c110d9be13d23fefaa256"
                      },
                      {
                        "StartTime": "2018-01-20 14:01:23",
                        "EndTime": "2018-01-20 14:14:35",
                        "Duration": "00:13:12",
                        "SourceName": "Example Caller",
                        "SourceNumber": "7055551234",
                        "SourceChannel": "SIP/Example3-000006e1",
                        "DestinationName": "Test Phone 2",
                        "DestinationNumber": "654",
                        "DestinationChannel": "SIP/Example-000003f2",
                        "URL": "solswitch/download-file.php?id=721892&sc=c56afe7890d5c64b784cadeffe45acb45"
                      }
                    ]
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Unknown CallID"
                  }
                    
                

Caller ID Request

The Caller ID Request function returns all relevant information about an ongoing call.

Caller ID Request URL: solswitch/api/calleridrequest/

The request must contain the following attributes:

  • Extension: Extension number of the person you'd like to get the Caller ID information from.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • CallID: The unique ID of the call.
  • DailedNumber: This is the DID the calling party dialed to begin the call. (Note: field name is spelled "Dailed" in the response.)
  • IVROption: If the caller came in through an IVR, this will be the option they selected. Otherwise it will be -1.
  • CallerNumber: This is the caller ID number of the calling party.
  • CallerName: This is the caller ID name of the calling party. If no caller ID name was supplied this will be the same as the CallerNumber.
  • Message: Returned when no data is available (e.g. "No data returned").

Request:

                    
                  POST /api/calleridrequest/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "Extension": "220"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "CallID": "667890",
                    "DailedNumber": "7055551234",
                    "IVROption": "3",
                    "CallerNumber": "7055554321",
                    "CallerName": "Test Caller"
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "Invalid extension number given"
                  }
                    
                

CDR Export

The CDR Export function returns all relevant information about calls between 2 dates.

CDR Export URL: solswitch/api/cdrexport/

The request must contain the following attributes:

  • DateStart: This will limit the returned data to be within DateStart and DateEnd. A time can be provided optionally. Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS if specifying time.
  • DateEnd: This will limit the returned data to be within DateStart and DateEnd. A time can be provided optionally. Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS if specifying time.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

For each call returned, the response object uses the CallID as the key, and the value is an array of leg objects. Each leg object contains:

  • LegID: The ID of the call leg.
  • StartTime: This is the time the call connected to the SolSwitch.
  • ConnectTime: This is the time the call was connected to a second party.
  • EndTime: This is the time the call was ended by either party.
  • SourceName: Caller ID name of the calling party.
  • SourceNumber: Caller ID number of the calling party.
  • DestinationName: Caller ID name of the called party.
  • DestinationNumber: Caller ID number of the called party.
  • Disposition: This is what happened during that leg of the call. It will show if a call was answered, transferred, etc.
  • DialedNumber: This is the number that was dialed to reach the called party.
  • SourceType: See RouteTypes for ID values.
  • DestinationType: See RouteTypes for ID values.
  • CallCode: Call Reason Code if agent was required to enter a reason for the call.

Request:

                    
                  POST /api/cdrexport/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "DateStart": "2018-05-15 00:00:00",
                    "DateEnd": "2018-05-15 23:59:59"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "669932": [{
                      "LegID": "669932",
                      "StartTime": "2018-05-15 11:07:45",
                      "ConnectTime": "",
                      "EndTime": "2018-05-15 11:07:47",
                      "SourceName": "Test Phone #1",
                      "SourceNumber": "220",
                      "DestinationName": "Test Phone #2",
                      "DestinationNumber": "290",
                      "Disposition": "NOANSWER",
                      "DialedNumber": "290",
                      "SourceType": "7",
                      "DestinationType": "7",
                      "CallCode": ""
                    },
                    {
                      "LegID": "669933",
                      "StartTime": "2018-05-15 11:31:42",
                      "ConnectTime": "2018-05-15 11:31:44",
                      "EndTime": "2018-05-15 11:31:51",
                      "SourceName": "Test Phone #1",
                      "SourceNumber": "7055551234",
                      "DestinationName": "Test Phone #2",
                      "DestinationNumber": "290",
                      "Disposition": "ANSWERED",
                      "DialedNumber": "7055553584",
                      "SourceType": "15",
                      "DestinationType": "7",
                      "CallCode": ""
                    }]
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "No matching end time"
                  }
                    
                

Note: If a call has multiple legs it will show as an array of legs. Otherwise it will be a single object.

CDR Leg Details

The CDR Leg Details function returns all leg details for the provided CallID.

CDR Leg Details URL: solswitch/api/cdrlegdetailsapi/

The request must contain the following attributes:

  • CallID: The ID of the call to retrieve leg details for.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Details: Array of call leg detail objects. Present on success.
  • StartTime: The start time display showing the date and time.
  • Duration: The duration of this detail measured in seconds.
  • Action: Describes what's being done at this moment.
  • State: The state of the call.
  • Recording: The name of the recording if there is one.

Request:

                    
                  POST /api/cdrlegdetailsapi/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                      "Key": "NCGIPEHffCVgDYUMTLQVOeSecbWbfKEZ",
                      "CallID": "222287"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "Details": [
                        {
                            "StartTime": "2026-03-12 16:13:28",
                            "Duration": "",
                            "Action": "Test1 (333) called 77777",
                            "State": "Routed",
                            "Recording": ""
                        },
                        {
                            "StartTime": "2026-03-12 16:13:28",
                            "Duration": 3,
                            "Action": "Calling voicemail testvm (4252)",
                            "State": "Answered",
                            "Recording": "f33-t4252-20260312-161328-222288.mp3"
                        },
                        {
                            "StartTime": "2026-03-12 16:13:31",
                            "Duration": "",
                            "Action": "Call ended by 77777",
                            "State": "Ended",
                            "Recording": ""
                        }
                    ]
                }
                    
                

Response (FAIL)

                    
                  {
                      "Status": "FAIL",
                      "Reason": "Unknown CallID"
                  }
                    
                

Note: If a call has multiple legs it will show as an array of legs. Otherwise it will be a single object.

Digit Validation Log

The Digit Validation (DV) Log returns the details of digit validations accessed with the provided time range. See Digit Validation for more details on using the DV system.

DV Log URL: solswitch/api/dvlog/

The request must contain the following attributes:

  • From: This will limit the returned data to be within From and To. Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS
  • To: This will limit the returned data to be within From and To. Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • DID: Filter the logs for a specified DID.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Logs: An array of log activity for the requested report. The array contains sub-arrays, each of which will contain the below attributes.
  • LogID: The unique ID of this log entry.
  • CDRCallID: The ID of the call.
  • Time: The recorded timestamp of the log as a unix timestamp.
  • DID: DID dialed to access the DV.
  • DVExtension: Extension number of the accessed DV.
  • DVDigits: Digits dialed by the user when accessing the DV.
  • CIDName: The Caller ID Name of the caller.
  • CIDNum: The Caller ID number of the caller.
  • APIResult: Response from the external API, in the case of a success.
  • APIFail: Reason for API failure, in the case of a fail.

Request:

                    
                  POST /api/dvlog/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "From": "2025-05-01",
                    "To": "2025-05-02",
                    "DID": "7058053333"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "Logs": [
                      {
                        "LogID": "667890",
                        "Time": "1740775306",
                        "DID": "7058053333",
                        "DVExtension": "123",
                        "DVDigits": "1234",
                        "CIDNum": "2485551234",
                        "CDRCallID": "55555",
                        "APIResult": "Support",
                        "APIFail": "0"
                      },
                      {
                        "LogID": "667890",
                        "Time": "1740775306",
                        "DID": "7058053333",
                        "DVExtension": "123",
                        "DVDigits": "5678",
                        "CIDNum": "7055551234",
                        "CDRCallID": "66666",
                        "APIResult": "Billing",
                        "APIFail": "0"
                      }]
                  }
                    
                

Response (FAIL)

                    
                  {            
                    "Status": "FAIL",
                    "Reason": "IP does not have access"
                  }
                    
                

List Active Calls

The List Active Calls function returns all relevant information of current active calls.

List Active Calls URL: solswitch/api/listactivecalls/

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Calls: Details on the individual calls (On OK return status). Attributes:
    • CallID: The unique ID of the call.
    • SourceNumber: The phone number or extension of the source of the call.
    • SourceChannel: The call channel connected to the source of the call.
    • DestinationNumber: The phone number or extension of the destination of the call.
    • DestinationChannel: The call channel connected to the destination of the call.
    • Duration: Length of the call in format HH:MM:SS.

Request:

                    
                  POST /api/listactivecalls/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                    
                

Response (SUCCESS)

                    
                  {
                    "Status": "OK",
                    "Calls": [
                      {
                        "CallID": "667890",
                        "SourceNumber": "7055551234",
                        "SourceChannel": "SIP/Example-000003f2",
                        "DestinationNumber": "123",
                        "DestinationChannel": "SIP/Example2-000003ee",
                        "Duration": "00:01:23"
                      },
                      {
                        "CallID": "667891",
                        "SourceNumber": "345",
                        "SourceChannel": "SIP/Example3-000006e1",
                        "DestinationNumber": "7055551234",
                        "DestinationChannel": "SIP/Example4-000004fe",
                        "Duration": "00:00:46"
                      }
                    ]
                  }
                    
                

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "IP does not have access"
                  }
                    
                

Live Queue Stats

Returns live statistics for one or all queues, including current calls, agents, abandoned, wait time, etc.

Live Queue Stats URL: solswitch/api/livequeuestat/

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • queueID: Defaults to all queues. ID of the Queue the function should run on, should be a numeric value.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Ext: Extension of the Queue.
  • Queue: Name of the Queue.
  • Calls: Current Calls of that queue.
  • Callback: Number of callers waiting to be called back.
  • Avail.Agnts: Available Agents for that queue.
  • Answered: Number of calls answered.
  • Abandoned: Number of calls Abandoned.
  • WaitTime: Current smallest wait time.
  • EstimatedWaitTime: Average Wait time for that queue.
  • Voicemail: Current amount of voicemail.
  • ServiceLevel: Service Level of the queue at that moment.

Request:

                    
                  POST /api/livequeuestat/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Key": "FzeKKeEKSwXG2FW8jd",
                    "Customer": "1",
                    "queueID": "7"
                  }
                    
                

Response (SUCCESS)

                    
                  [
                    {
                      "Ext": "222",
                      "Queue": "Main Queue",
                      "Calls": "0",
                      "Callback": "0",
                      "Avail.Agnts": "2",
                      "Answered": "0",
                      "Abandoned": "0",
                      "WaitTime": "00:00:00",
                      "EstimatedWaitTime": "00:00:07",
                      "Voicemail": "0",
                      "ServiceLevel": "0.0000"
                    },
                    {
                      "Status": "OK"
                    }
                  ]
                    
                

Note: The response will repeat one entry per available or requested Queue, ending with a status object.

Response (FAIL)

                    
                  {
                    "Status": "FAIL",
                    "Reason": "No access to customer number 1"
                  }
                    
                

Live Stats

Live Stats returns live stats on Queues and Agents, including current and total daily calls in queue, wait time, available agents, and agent presence information.

Live Stats URL: solswitch/api/livestats/

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • queueID: Defaults to all queues. ID of the Queue the function should run on, should be a numeric value.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • queuestats: Per Queue Statistics. Each entry contains:
    • name: Name of Queue.
    • queued: Amount of calls currently queued.
    • answered: Calls answered today.
    • abandoned: Calls abandoned today.
    • overflow: Calls overflowed today.
    • voicemail: Amount of voicemails.
    • answeredRate: Percentage of calls answered.
    • abandonedRate: Percentage of calls abandoned.
    • overflowRate: Percentage of calls overflowed.
    • serviceLevel: Percentage of calls that met service level today.
    • liveWaitTime: Current wait time to be answered.
    • liveCalls: Current amount of calls.
    • liveAgents: Current amount of active agents in queue.
  • queuetotals: Total stats for queue. Contains:
    • queued: Amount of calls currently queued.
    • answered: Calls answered today.
    • abandoned: Calls abandoned today.
    • overflow: Calls overflowed today.
    • voicemail: Amount of voicemails.
    • liveWaitTime: Current wait time for queue.
    • liveCalls: Amount of calls in queue.
    • liveAgents: Amount of active agents in queue.
  • agentstatus: Current agent stats. Each entry contains:
    • name: Name of extension.
    • extension: Extension number.
    • status: Current availability status of extension.
  • presence: Live presence information for extensions.

Request:

                    
                  POST /api/livestats/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Customer": "1",
                    "Key": "FzeKKeEKSwXG2FW8jd",
                    "queueID": "7"
                  }
                    
                

Response (SUCCESS)

            
{
    "Status": "OK",
    "queuestats": [
        {
            "name": "Main Queue",
            "queued": 0,
            "answered": "0",
            "abandoned": "0",
            "overflow": "0",
            "voicemail": "0",
            "answeredRate": 0,
            "abandonedRate": 0,
            "overflowRate": 0,
            "serviceLevel": 0,
            "liveWaitTime": "00:00:00",
            "liveCalls": "0",
            "liveAgents": "2"
        }
    ],
    "queuetotals": {
        "queued": 0,
        "answered": 0,
        "abandoned": 0,
        "overflow": 0,
        "voicemail": 0,
        "liveWaitTime": "00:00:00",
        "liveCalls": 0,
        "liveAgents": 2
    },
    "agentstatus": [
        {
            "name": "Mel",
            "extension": "112",
            "status": "Available"
        },
        {
            "name": "Bruce",
            "extension": "117",
            "status": "Available"
        },
        {
            "name": "Will",
            "extension": "118",
            "status": "Available"
        }
    ],
    "presence": {
        "1": "NOT_INUSE",
        "100": "NOT_INUSE",
        "101": "BUSY",
        "102": "BUSY",
        "111": "NOT_INUSE",
        "112": "NOT_INUSE",
        "113": "BUSY",
        "114": "BUSY",
        "115": "BUSY",
        "116": "BUSY",
        "117": "NOT_INUSE",
        "118": "NOT_INUSE",
        "119": "BUSY",
        "145": "BUSY",
        "220": "BUSY",
        "223": "BUSY",
        "224": "BUSY",
        "1112": "NOT_INUSE",
        "2222": "BUSY",
        "11111": "BUSY",
        "99999": "BUSY"
    }
}
            
        

Response (FAIL)

            
                  {
                    "Status": "FAIL",
                    "Reason": "No access to customer number 1"
                  }
            
        

System Management

911 Info

List the current 911 information for each DID on the SolSwitch.

911 Info URL: solswitch/api/911info/

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Data: Array for 911 information.
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                
                  POST /api/911info/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                  "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Data": {
                      "1234567894": {
                        "custnum": "12345",
                        "did": "1234567894",
                        "streetnumber": "850",
                        "streetname": "Fake St",
                        "unit": "2",
                        "city": "Sudbury",
                        "province": "ON",
                        "country": "Canada",
                        "postalcode": "P3B1Y4"
                      },
                      "9055550123": {
                        "custnum": "12346",
                        "did": "9055550123",
                        "streetnumber": "1",
                        "streetname": "Example Ave",
                        "unit": "",
                        "city": "Toronto",
                        "province": "ON",
                        "country": "Canada",
                        "postalcode": "M5V2T6"
                      }
                    }
                  }
                
                

Note: The Data object will contain one entry per DID, keyed by DID.

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "IP address not allowed"
                  }
                
                

Add DID (Legacy)

Deprecated: This endpoint has been replaced by the DID Management suite (/api/did/add/), which supports adding multiple DIDs in a single request, exposes the full set of fields available in the DID modal (Description, Rate Center, Notes, Active, Apply Toll, Strip CID, Call Limit, SMS Provider, SMS Toll Plan, SMS Only), and creates the DIDRouting row in the same call. This legacy endpoint remains available for existing integrations only and should not be used for new development.

Add a new DID to the SolSwitch.

Add DID URL: solswitch/api/adddid/

The request must contain the following attributes:

  • DID: The new DID to add.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                
                  POST /api/adddid/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "DID": "7051234567"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Invalid DID provided"
                  }
                
                

Create Customer (Legacy)

Deprecated: This endpoint has been replaced by the Customer Management (/api/customer/add/), which exposes the full set of fields available in the customer modal and performs the full set of side-effects (default Music on Hold class, SolSwitch Connect group setup, parking-lot regeneration, DID limits). This legacy endpoint remains available for existing integrations only and should not be used for new development.

The Create Customer function will create a customer account on the SolSwitch using the supplied information and return the new customer ID.

Create Customer URL: solswitch/api/createcustomer/

The request must contain the following attributes:

  • FirstName: First name of the customer.
  • LastName: Last name of the customer.
  • CustomerNumber: The internal customer number. Used for toll billing if a specific customer number is required.
  • RouteGroupID: The ID of the default route group to be assigned.
  • TollPlanID: The ID of the toll plan to apply to this customer.
  • MaxSIPAccounts: The maximum number of SIP accounts to allow the customer to use.
  • MaxTrunks: The maximum number of trunks this customer can use at once.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Company: Defaults to FirstName + LastName. The company the customer represents.
  • Timezone: Defaults to the system timezone. Timezone to assign to the customer.
  • ServiceTollPlan: Defaults to 0. Service toll plan to apply to this customer.
  • AddressStreetNumber: Defaults to an empty string. Address street number.
  • AddressStreetName: Defaults to an empty string. Address street name.
  • AddressUnit: Defaults to an empty string. Address unit number.
  • PostalCode: Defaults to an empty string. Postal code (L#L#L#).
  • City: Defaults to an empty string. City the company is located in.
  • Province: Defaults to an empty string. Province code (ON).
  • Country: Defaults to an empty string. Country of residence.
  • PhoneNumber: Defaults to an empty string. Phone number without any '-'s.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • CustomerID: The ID of the newly created customer.

Request:

                
                  POST /api/createcustomer/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "RouteGroupID": "7",
                    "TollPlanID": "2",
                    "MaxSIPAccounts": "2",
                    "MaxTrunks": "4",
                    "CustomerNumber": "123456789",
                    "FirstName": "Test",
                    "LastName": "Name"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "CustomerID": "127"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Missing required field FirstName"
                  }
                
                

Check Time Rule

Used to find the current status (Open or Closed) of a time rule on the system.

Check Time Rule URL: solswitch/api/checktimerule/

The request must contain the following attributes:

  • ID: The time rule's ID.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • TimeRuleStatus: This is a 0 or 1 boolean representation of the state.
  • TimeRuleStatusText: This is the text form of the above (0 - Open, 1 - Closed).

Request:

                
                  POST /api/checktimerule/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "ID": "132"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "TimeRuleStatus": "0",
                    "TimeRuleStatusText": "Open"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Time rule not found"
                  }
                
                

DID Report

Pull a list of DIDs on the system with their current customer and route information.

DID Report URL: solswitch/api/didreport/

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • DID: DID number.
  • IRID: Internal Routing ID.
  • CustID: ID of the customer that owns the DID.
  • PrimaryRoute: Used for Load balancing. 0 is default in most cases, or 1 if priority routing is set up for that customer and server.

Request:

                
                  POST /api/didreport/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Key":"FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "0": {
                      "DID": "7058053584",
                      "IRID": "182",
                      "CustID": "1",
                      "PrimaryRoute": 1
                    },
                    "1": {
                      "DID": "7058053585",
                      "IRID": "183",
                      "CustID": "1",
                      "PrimaryRoute": 0
                    },
                    "Status": "OK"
                  }
                
                

Note: The response will contain one numbered entry per DID returned.

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Error with Key"
                  }
                
                

Find Me Follow Me Details

Pass in a Find Me Follow Me ID to retrieve Name, Numbers, OverflowRouteID, OverflowRouteType, Recording, AutoAnswer, StepTime, and Extension linked to the ID.

Find Me Follow Me URL: solswitch/api/findmefollowme/

The request must contain the following attributes:

  • ID: FindMeFollowMe ID to retrieve data for.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • ID: The Find Me Follow Me ID.
  • Name: Name of the Find Me Follow Me entry.
  • Numbers: Array of numbers configured on this entry.
  • OverflowRouteID: ID of the overflow route, or "No Overflow" if none is set.
  • OverflowRouteType: Type of the overflow route, or "No Overflow" if none is set.
  • Recording: Whether call recording is enabled.
  • AutoAnswer: Whether auto-answer is enabled.
  • StepTime: Time in seconds before stepping to the next number.
  • Extension: Extension number linked to this Find Me Follow Me.

Request:

                
                  POST /api/findmefollowme/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "ID": "5",
                    "Name": "dave-test",
                    "Numbers": [
                      "1112223333",
                      "2223334444",
                      "3334445555"
                    ],
                    "OverflowRouteID": "148",
                    "OverflowRouteType":"12",
                    "Recording": "0",
                    "AutoAnswer": "0",
                    "StepTime": "25",
                    "Extension": "9991"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

Firewall Management Suite

/api/firewall/view/

This endpoint will list the available firewall rules on the system. There will also be an optional ID value that will display information about just the requested firewall rule.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • ID: Defaults to all firewall rules. The ID of the specific firewall rule to view (Overrides the ViewType option below to Full).
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will be provided with as much information as possible.
    • Partial: Each listing will be provided with an ID and Name.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array with each row containing the following:
    • ID: ID of the firewall rule. To be used with other endpoints.
    • Name: Name of the firewall rule.
    • Position: The order priority of the firewall rule. Lower numbered items will be checked before higher numbered ones.
    • RuleType: This will be Allow or Deny.
    • AddressType: This will be Address, Subnet or Country.
    • Address: If AddressType is Address or Subnet this will contain the IP address or IP subnet of the rule.
    • Country: If the AddressType is Country this will contain the country code of the selected country (Canada = CA, United Kingdom = UK, etc).
    • Web: This will be set to 1 if the rule's filtering is applied to web traffic.
    • SysAdmin: This will be set to 1 if the rule's filtering is applied to web traffic on SysAdmin accounts.
    • Provisioning: This will be set to 1 if the rule's filtering is applied to provisioning traffic.
    • SIP: This will be set to 1 if the rule's filtering is applied to SIP traffic.

Request:

                
                  POST /api/firewall/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                      "ID": "5",
                      "Name": "Test name"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/firewall/add/

This endpoint will add a new rule to the firewall in the given position, or at the end if no position is given.

The request must contain the following attributes:

  • Name: Name of the firewall rule.
  • RuleType: This will be Allow or Deny.
  • AddressType: This will be Address, Subnet or Country.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Position: Defaults to 2. The order priority of the firewall rule. This will shift all positions down so entering 3 for example will increment the current rules of priority 3 or more by 1. Position 1 is reserved for the Guardian block list.
  • Address: If AddressType is Address or Subnet this must contain the IP address or IP subnet of the rule [xxx.xxx.xxx.xxx for address and xxx.xxx.xxx.xxx/yy for subnet].
  • Country: If the AddressType is Country this must contain the country code of the selected country [Canada = CA, United Kingdom = UK, etc].
  • Web: Defaults to 1. Boolean value [0 - Disabled on web traffic, 1 - Enabled on web traffic].
  • SysAdmin: Defaults to 1. Boolean value [0 - Disabled on SysAdmin web traffic, 1 - Enabled on SysAdmin web traffic].
  • Provisioning: Defaults to 1. Boolean value [0 - Disabled on provisioning traffic, 1 - Enabled on provisioning traffic].
  • SIP: Defaults to 1. Boolean value [0 - Disabled on SIP traffic, 1 - Enabled on SIP traffic].

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • ID: The ID of the new firewall rule.

Request:

                
                  POST /api/firewall/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "Name": "Test Rule",
                    "RuleType": "Allow",
                    "AddressType": "Address",
                    "Address": "127.0.0.1"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "ID": "4"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/firewall/edit/

This endpoint will allow editing of existing firewall rules.

The request must contain the following attributes:

  • ID: The ID of the rule to be edited.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The request may contain the following attributes:

Note: For edit requests, omitted fields preserve their existing value.

  • Name: The new name of the firewall rule.
  • RuleType: This will be Allow or Deny.
  • AddressType: This will be Address, Subnet or Country.
  • Position: The order priority of the firewall rule. This will shift all positions down so entering 3 for example will increment the current rules of priority 3 or more by 1. Position 1 is reserved for the Guardian block list.
  • Address: If AddressType is Address or Subnet this must contain the IP address or IP subnet of the rule [xxx.xxx.xxx.xxx for address and xxx.xxx.xxx.xxx/yy for subnet].
  • Country: If the AddressType is Country this must contain the country code of the selected country [Canada = CA, United Kingdom = UK, etc].
  • Web: Boolean value [0 - Disabled on web traffic, 1 - Enabled on web traffic].
  • SysAdmin: Boolean value [0 - Disabled on SysAdmin web traffic, 1 - Enabled on SysAdmin web traffic].
  • Provisioning: Boolean value [0 - Disabled on provisioning traffic, 1 - Enabled on provisioning traffic].
  • SIP: Boolean value [0 - Disabled on SIP traffic, 1 - Enabled on SIP traffic].

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/firewall/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "4",
                    "Name": "Test Rule Renamed"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/firewall/delete/

This endpoint will allow deletion of existing firewall rules.

The request must contain the following attributes:

  • ID: The ID of the rule to be deleted.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/firewall/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "4"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

Get Customer Information (Legacy)

Deprecated: This endpoint has been replaced by the Customer Management (/api/customer/view/), which supports lookup by both ID and CustomerNumber, returns a cleaner array-based response, and can return the full set of customer fields (configuration, billing, MFA, SolSwitch Connect) via the ViewType parameter. This legacy endpoint remains available for existing integrations only and should not be used for new development.

The Get Customer Information function will return all information related to a customer.

Get Customer Information URL: solswitch/api/getcustomerinformation/

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • CustomerNumber: The CustomerNumber on the account. Not the CustID, but the customer number entered when creating the account. Usually links with an external CRM.

The response will contain:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

On success, the response also contains one additional key per matching customer, keyed by the CustID. Multiple customers may be returned if more than one matches the CustomerNumber. Each customer entry contains:

  • ID: The CustID on the SolSwitch. Use this to perform other API calls.
  • firstname: First name of the customer.
  • lastname: Last name of the customer.
  • company: The company the customer represents.
  • streetnumber: Address street number.
  • streetname: Address street name.
  • unit: Address unit number.
  • postalcode: Postal code (L#L#L#).
  • city: City the company is located in.
  • province: Province code (ON).
  • country: Country of residence.
  • telephone: Phone number without any '-'s.
  • fax: Fax number.

Request:

                
                  POST /api/getcustomerinformation/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 74
                  {
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "CustomerNumber": "123456789"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "127": {
                      "ID": "127",
                      "company": "Sunwire",
                      "city": "Sudbury",
                      "country": "Canada",
                      "fax": "",
                      "firstname": "Test",
                      "lastname": "Name",
                      "postalcode": "P3A3T7",
                      "province": "ON",
                      "streetname": "Barrydowne Road",
                      "streetnumber": "850",
                      "telephone": "7055551234",
                      "unit": "303"
                    }
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": " No results returned"
                  }
                
                

Monitoring Notifications

When monitoring is enabled on an extension, through Toggle Monitor, event notifications will be POSTed to the notification URL (Configured in SolSwitch settings).

Notifications will be sent on incoming and outgoing calls to monitored extensions, for the following events:

  • Call Incoming
  • Call Connected
  • Call Disconnected

The notifications will contain the following attributes:

  • Event: The event that triggered the notification (Incoming, Connected, Disconnected).
  • CallID: The unique ID of the call.
  • Customer: ID of the customer for the notifying extension.
  • SourceNumber: The phone number or extension of the source of the call.
  • SourceChannel: The call channel connected to the source of the call.
  • DestinationNumber: The extension of the destination of the call.
  • DestinationChannel: The call channel connected to the destination of the call.
  • DialedNumber: The actual number dialed by the source of the call.

Request:

                
                  POST /example HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 200
                  {
                    "Event": "Incoming",
                    "CallID": "843597",
                    "Customer": "4",
                    "SourceNumber": "7055551234",
                    "SourceChannel": "SIP/Example-000003ee",
                    "DestinationNumber": "123",
                    "DestinationChannel": "SIP/Example-0004f2be",
                    "DialedNumber": "7055216777"
                  }
                
                

Remove DID (Legacy)

Deprecated: This endpoint has been replaced by the DID Management suite (/api/did/delete/), which performs the same provider-aware E911 record cleanup as the web UI and removes the DID's CIDRouting and DIDRouting rows in the same call. This legacy endpoint remains available for existing integrations only and should not be used for new development.

Delete a DID from the SolSwitch.

Remove DID URL: solswitch/api/removedid/

The request must contain the following attributes:

  • DID: The DID to remove.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                
                  POST /api/removedid/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "DID": "7051234567"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Invalid DID provided"
                  }
                
                

Scheduled Routing Details

Pass a Route ID to return Route Type, InternalRouteID, Extension, Name, and Default Route at present moment in time if between DateTo and DateFrom, TimeTo and TimeFrom in ScheduledRoutingOptions table.

Scheduled Routing URL: solswitch/api/scheduledrouting/

The request must contain the following attributes:

  • ID: The ID of the scheduled route you want data for if there's a scheduled route for the current time. If there isn't - the default route is returned.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: If the ID is non numerical or there's no records found for the ID.
  • Name: Name of the scheduled route entry.
  • Extension: Extension number of the scheduled route.
  • RouteExt: Extension number of the destination route.
  • RouteType: Type of the destination route.
  • IRID: Internal Route ID of the destination.
  • RouteName: Name of the destination route.

Request:

                
                  POST /api/scheduledrouting/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key":
                    "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "2"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Name": "Test 2",
                    "Extension": "101",
                    "RouteExt": "9696",
                    "RouteType": "7",
                    "IRID": "68",
                    "RouteName": "dave-ext"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No data found."
                  }
                
                

DID Management

This endpoint is used to create, view, edit and delete DIDs on the system. This replaces the old Add DID and Remove DID endpoints.

For security reasons, all endpoints in the DID Management suite require an API key with global (system-level) access. API keys assigned to a specific customer cannot be used with these endpoints.

/api/did/view/

This endpoint lists DIDs on the system, with optional filtering by ID, DID number, or CustID, and a ViewType to control how much data is returned. The ID and DID filters accept either a single value or a JSON array of values.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • ID: Defaults to all DIDs. The ID of the specific DID to view. Either a single value (e.g. "5") or a JSON array (e.g. [5, 6, 7]).
  • DID: Defaults to all DIDs. The DID phone number to filter by. Either a single value or a JSON array. Can be combined with other filters.
  • CustID: Defaults to all customers. ID of the customer to filter DIDs by. Can be combined with other filters.
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will include every DID configuration field plus the assigned route destination.
    • Partial: Each listing will include ID, DID, Description and Active.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array with each row containing the following:
  • ID: ID of the DID. To be used with other endpoints.
  • DID: The DID phone number.
  • Description: The given description of the DID.
  • Active: Boolean [1 - Yes, 0 - No].

When ViewType is set to Full, each row additionally contains:

  • CustID: ID of the customer the DID is assigned to.
  • RateCenter: Rate center the DID belongs to.
  • Notes: Free-text notes attached to the DID.
  • ApplyToll: Boolean [1 - Yes, 0 - No]. If enabled, calls to this number are processed as toll-free for billing purposes.
  • StripCID: Boolean [1 - Yes, 0 - No]. If enabled, the incoming caller ID is stripped before routing.
  • DIDLimit: Maximum concurrent calls allowed on this DID (0 = unlimited).
  • SMSProvider: ID of the SMS provider assigned to this DID (0 or null = none).
  • SMSTollID: ID of the SMS toll plan applied (0 or null = none).
  • SMSOnly: Boolean [1 - Yes, 0 - No]. If enabled, calls are not routed to this DID (SMS use only).
  • InternalRouteDestinationID: The internal routing destination ID for the DID, or 0 if no route is currently assigned.

Request:

                
                  POST /api/did/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                        "ID": "5",
                        "DID": "7055551234",
                        "Description": "Main office line",
                        "Active": "1"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Provided API Key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is invalid."
                  }
                
                

/api/did/add/

This endpoint adds one or more new DIDs to the system. The DID field can either be a single DID string (single insert) or a JSON array of DID strings (batch insert). Each DID also gets a corresponding DIDRouting row created with no route assigned (InternalRouteDestinationID = 0). Routing for the DID must be configured separately afterwards. New DIDs default to Active = 1 unless explicitly set otherwise.

The request must contain the following attributes:

  • DID: The DID phone number to add. Either a single string (e.g. "7055551234") or a JSON array of strings (e.g. ["7055551234", "7055551235", "7055551236"]).
  • CustID: ID of the customer to assign the DID(s) to.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Description: The given description of the DID.
  • RateCenter: Rate center name.
  • Notes: Free-text notes.
  • Active: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • ApplyToll: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • StripCID: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • DIDLimit: Defaults to 0. Maximum concurrent calls on the DID (0 = unlimited).
  • SMSProvider: SMS provider ID.
  • SMSTollID: SMS toll plan ID.
  • SMSOnly: Defaults to 0. Boolean [1 - Yes, 0 - No].

When the DID field is provided as an array, the same optional attribute values are applied to every DID in the batch. The whole batch is validated for duplicates against the existing system before any insert. If any DID in the batch is already in use, the entire request fails and nothing is inserted.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • IDs: An array of the newly inserted DIDAuthority row IDs, in the order the DIDs were provided.

Request:

                
                  POST /api/did/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "DID": ["7055551234", "7055551235"],
                    "CustID": "42",
                    "Description": "Branch office line",
                    "DIDLimit": "0"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "IDs": [101, 102]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "DID (7055551234) is already in use on the system."
                  }
                
                

/api/did/edit/

This endpoint updates one or more existing DIDs. The ID field can either be a single DID row ID (single edit) or a JSON array of IDs (batch edit, applying the same supplied field values to every DID in the batch). Only the fields supplied in the request are changed. Any field omitted will keep each DID's current database value. If a DID currently has a route assigned, the API will refuse to change the CustID or set Active to 0 on that DID until the route is removed.

For batch edit, all IDs are validated to exist up front. If any ID is not on the system, the entire request fails before any row is updated. The API only updates fields explicitly supplied in the request.

If the assigned customer changes, the E911 record for that DID (if any) is updated to the new customer and any existing SMS routing for the DID is cleared. If only the SMSProvider changes, the SMS configuration is regenerated to point at the new provider.

The request must contain the following attributes:

  • ID: The ID of the DID to be edited. Either a single value (e.g. "101") or a JSON array of IDs (e.g. [101, 102, 103]).

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The request may contain any of the attributes documented for /api/did/add/ (except DID, which is not editable). Any field omitted will keep each DID's current database value.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • IDs: An array of the DIDAuthority row IDs that were successfully edited.

Request:

                
                  POST /api/did/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": [101, 102],
                    "Description": "Bulk renamed",
                    "DIDLimit": "10"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "IDs": [101, 102]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "The route for this DID must be removed before changing the customer of the DID."
                  }
                
                

/api/did/delete/

This endpoint deletes one or more DIDs and their associated routing and caller ID configuration. The ID field can either be a single DID row ID (single delete) or a JSON array of IDs (batch delete). All IDs are validated up front. If any ID does not exist on the system, the entire request fails before any row is deleted.

If an E911 record exists for a DID, the configured 911 provider is called to remove the upstream record before the local rows are deleted. If the provider call fails, the request aborts at that DID. DIDs processed earlier in the batch will already have been deleted at that point. If no 911 provider is configured ("none") and an E911 record exists, the local E911 record is removed without an E911 update. If the 911 provider is set to anything other than "N911" or "none", the request fails with "Invalid Provider".

The request must contain the following attributes:

  • ID: The ID of the DID to be deleted. Either a single value (e.g. "101") or a JSON array of IDs (e.g. [101, 102, 103]).

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • IDs: An array of the DIDAuthority row IDs that were successfully deleted.

Request:

                
                  POST /api/did/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": [101, 102]
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "IDs": [101, 102]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find DID with ID 101"
                  }
                
                

Customer Management

This endpoint is used to create, view, edit and delete customers on the system. This replaces the old Get Customer Information and Create Customer endpoints.

For security reasons, all endpoints in the Customer Management suite require an API key with global (system-level) access. API keys assigned to a specific customer cannot be used with these endpoints.

/api/customer/view/

This endpoint lists customers on the system, with optional filtering by ID or CustomerNumber, and a ViewType to control how much data is returned.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • ID: Defaults to all customers. The internal ID of a specific customer to view.
  • CustomerNumber: Defaults to all customers. The CustomerNumber (custnum) of a specific customer to view. Can be combined with ID.
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will be provided with as much information as possible (all configuration, billing, MFA and SSC fields).
    • Partial: Each listing will include ID, CustomerNumber, Company, FirstName and LastName.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array of customer records. Each row contains:
  • ID: Internal customer ID.
  • CustomerNumber: External customer number (custnum).
  • Company: Company name.
  • FirstName: Contact first name.
  • LastName: Contact last name.

When ViewType is set to Full, each row additionally contains:

  • StreetNumber: Street number portion of the customer's address.
  • StreetName: Street name portion of the customer's address.
  • Unit: Suite or apartment unit.
  • City: City of the customer's address.
  • Province: Province or state.
  • Country: Country.
  • PostalCode: Postal or ZIP code.
  • Phone: Contact phone number.
  • Fax: Contact fax number.
  • MaxTrunks: Maximum trunks allowed for the customer (0 = unlimited).
  • MaxSIPAccounts: Maximum SIP accounts allowed for the customer (0 = unlimited).
  • RouteGroupID: ID of the default outbound route group.
  • TollPlanID: ID of the toll plan used for call rating.
  • ServiceTollPlan: ID of the toll plan used for PPU services (0 = none).
  • EmailRecordingFiles: Boolean [1 - attach MP3 file to email, 0 - send URL in email].
  • Timezone: IANA timezone string (e.g. America/Toronto).
  • Language: Default recording language for the customer.
  • PrimaryRoutingID: Server ID for SBC primary routing on load-balanced systems (0 = default).
  • MCQEnabled: Boolean [1 - Yes, 0 - No]. Multi-channel queueing features enabled.
  • AIFeatures: Boolean [1 - Yes, 0 - No]. AI powered features (STT, TTS, Smart IVRs).
  • CallSummary: Boolean [1 - Yes, 0 - No]. Call transcripts include a summary.
  • MFAEnable: Boolean [1 - Yes, 0 - No]. SolSwitch MFA enabled for users under this customer.
  • MFAPhoneCID: Caller ID name used for MFA phone-call delivery.
  • MFAPhoneDID: Caller ID number used for MFA phone-call delivery.
  • MFASMSDID: ID of the DID used for MFA SMS delivery.
  • SSCServerID: SolSwitch Connect server ID (0 = SSC disabled for this customer).
  • SSCGroup: SolSwitch Connect group name assigned to the customer.
  • SSCMaxUsers: Maximum SSC user accounts allowed in the group.
  • SSCMaxPresence: Maximum SSC presence-only users allowed in the group.
  • SSCMaxCollab: Maximum SSC collab-enabled users allowed in the group.
  • SSCDevices: Boolean [1 - Yes, 0 - No]. Allow SSC users to view and delete their devices.
  • SSCMeetings: Boolean [1 - Yes, 0 - No]. Allow SSC users to change meeting settings.
  • SSCPhoto: Boolean [1 - Yes, 0 - No]. Allow SSC users to upload their XMPP photo.
  • SSCPassword: Boolean [1 - Yes, 0 - No]. Allow SSC users to change their password.
  • SSCLogs: Boolean [1 - Yes, 0 - No]. Allow SSC users to view their enhanced traces.
  • Active: Boolean [1 - active, 0 - inactive].

Request:

                
                  POST /api/customer/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                        "ID": "5",
                        "CustomerNumber": "1677701234",
                        "Company": "Sunwire Inc.",
                        "FirstName": "Jane",
                        "LastName": "Doe"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Provided API Key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is invalid."
                  }
                
                

/api/customer/add/

This endpoint is used to create a new customer. When a new customer is created, a default MOH class is also created. If the SSCServerID field is specified, a new SolSwitch Connect Group is created and applied to the customer. New customers are created with Active = 1; the Active flag is not exposed as an editable field by this endpoint.

If SSCGroup matches a group already assigned to another customer, the SSCMaxUsers, SSCMaxPresence and SSCMaxCollab values are shared across all customers in that group. Supplying empty values will inherit the existing group's limits; supplying non-empty values will update every customer in the group to use the new limits.

The request must contain the following attributes:

  • CustomerNumber: Number of the customer in customer management.
  • FirstName: Customer first name.
  • LastName: Customer last name.
  • Company: Company name.
  • RouteGroupID: The ID of the default route group to assign.
  • MaxSIPAccounts: Maximum SIP accounts for the customer. Set to 0 for unlimited.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The request may contain any of the following attributes.

  • StreetNumber, StreetName, Unit, City, Province, Country, PostalCode, Phone, Fax: Address and contact details.
  • MaxTrunks: Maximum trunks for the customer. Set to 0 for unlimited.
  • TollPlanID: Toll plan ID for calls.
  • ServiceTollPlan: Toll plan ID for PPU (pay per use) services.
  • EmailRecordingFiles: Boolean [1 - attach MP3, 0 - send URL].
  • Timezone: IANA timezone string (e.g. America/Toronto).
  • Language: Recording language.
  • PrimaryRoutingID: Server ID for SBC primary routing on load-balanced systems.
  • MCQEnabled: Boolean [1 - Yes, 0 - No]. Enable or disable multi-channel queueing.
  • AIFeatures: Boolean [1 - Yes, 0 - No]. Enable or disable AI powered features (STT, TTS, Smart IVRs).
  • CallSummary: Boolean [1 - Yes, 0 - No]. Provide call transcript summary.
  • MFAEnable, MFAPhoneCID, MFAPhoneDID, MFASMSDID: SolSwitch MFA settings. Only honoured when MFA is globally enabled.
  • SSCServerID: SolSwitch Connect server ID. 0 to disable.
  • SSCGroup: SSC group name. Must match domain-name regex. Must be set if SSCServerID is set.
  • SSCMaxUsers, SSCMaxPresence, SSCMaxCollab: Numeric user limits for the SSC group.
  • SSCDevices, SSCMeetings, SSCPhoto, SSCPassword, SSCLogs: Boolean toggles for SSC portal permissions.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • CustomerID: The internal ID of the newly created customer.

Request:

                
                  POST /api/customer/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "CustomerNumber": "1677701234",
                    "FirstName": "Jane",
                    "LastName": "Doe",
                    "Company": "Sunwire Inc.",
                    "RouteGroupID": "1",
                    "MaxSIPAccounts": "10"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "CustomerID": 42
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Missing required field 'CustomerNumber'"
                  }
                
                

/api/customer/edit/

This endpoint is used to edit an existing customer.

The same SolSwitch Connect group-sharing behaviour as /api/customer/add/ applies: if SSCGroup is changed to a value matching a group already assigned to another customer, the SSCMaxUsers, SSCMaxPresence and SSCMaxCollab values are shared across all customers in that group. Empty values will inherit the existing group's limits; non-empty values will update every customer in the group to use the new limits.

The request must contain the following attributes:

  • ID: The internal ID of the customer to update.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The request may contain any of the following attributes. Any field omitted will keep its current value.

  • CustomerNumber: Number of the customer in customer management.
  • FirstName: Customer first name.
  • LastName: Customer last name.
  • Company: Company name.
  • RouteGroupID: The ID of the default route group to assign.
  • MaxSIPAccounts: Maximum SIP accounts for the customer. Set to 0 for unlimited.
  • StreetNumber, StreetName, Unit, City, Province, Country, PostalCode, Phone, Fax: Address and contact details.
  • MaxTrunks: Maximum trunks for the customer. Set to 0 for unlimited.
  • TollPlanID: Toll plan ID for calls.
  • ServiceTollPlan: Toll plan ID for PPU (pay per use) services.
  • EmailRecordingFiles: Boolean [1 - attach MP3, 0 - send URL].
  • Timezone: IANA timezone string (e.g. America/Toronto).
  • Language: Recording language.
  • PrimaryRoutingID: Server ID for SBC primary routing on load-balanced systems.
  • MCQEnabled: Boolean [1 - Yes, 0 - No]. Enable or disable multi-channel queueing.
  • AIFeatures: Boolean [1 - Yes, 0 - No]. Enable or disable AI powered features (STT, TTS, Smart IVRs).
  • CallSummary: Boolean [1 - Yes, 0 - No]. Provide call transcript summary.
  • MFAEnable, MFAPhoneCID, MFAPhoneDID, MFASMSDID: SolSwitch MFA settings. Only honoured when MFA is globally enabled.
  • SSCServerID: SolSwitch Connect server ID. 0 to disable.
  • SSCGroup: SSC group name. Must match domain-name regex. Must be set if SSCServerID is set.
  • SSCMaxUsers, SSCMaxPresence, SSCMaxCollab: Numeric user limits for the SSC group.
  • SSCDevices, SSCMeetings, SSCPhoto, SSCPassword, SSCLogs: Boolean toggles for SSC portal permissions.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/customer/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "42",
                    "Company": "Sunwire Inc. (Renamed)"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find customer with ID 42"
                  }
                
                

/api/customer/delete/

This endpoint is used to delete a customer and all associated data. This will have the same effect as deleting a customer in Customer Management.

The request must contain the following attributes:

  • ID: The internal ID of the customer to delete.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/customer/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "42"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find customer with ID 42"
                  }
                
                

Extension Management

This endpoint is used to create, view, edit and delete extensions on the system. An extension consists of the extension record and its internal routing entry. It references an existing SIP account by ID and does not create or delete SIP accounts, voicemail boxes or provisioning devices (use the existing Create Extension API for full turn-key provisioning).

Access is limited by the customer assigned to the API key. If the API key is tied to a specific customer, all requests are limited to that customer's extensions. If the API key is global it may act on any customer's extensions.

The Customer field identifies which customer to act on. It is required when adding an extension with a global key. For edit and delete, a global key does not need it (the extension is identified by its globally unique ID). A customer-scoped key must always supply its own customer number. An extension's customer is set at creation and cannot be changed through edit.

The RouteGroupID field is an administrative field. It can only be set or changed by a global API key. A customer-scoped key cannot set RouteGroupID - the request will return an error if it is supplied.

/api/extension/view/

This endpoint lists extensions for the target customer, with optional filtering by ID or ExtensionNumber, and a ViewType to control how much data is returned.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Required for customer-scoped API keys (must match the key's customer). A global key does not need it; if supplied it targets that customer, otherwise it defaults to customer 1.
  • ID: Defaults to all extensions. The ID of the specific extension to view.
  • ExtensionNumber: Defaults to all extensions. The extension number to filter by.
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will include every extension field plus the routing details and linked SIP account username.
    • Partial: Each listing will include ID, ExtensionNumber, Name and Active.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array with each row containing the following:
  • ID: ID of the extension. To be used with other endpoints.
  • ExtensionNumber: The extension number.
  • Name: The given name of the extension.
  • Active: Boolean [1 - Yes, 0 - No].

When ViewType is set to Full, each row additionally contains the following:

  • CIDName: Caller ID name.
  • CIDNum: Caller ID number.
  • E911_CIDNum: E911 caller ID number.
  • CIDInternalOverride: Internal caller ID override.
  • DisplayCallerId: Boolean [1 - Yes, 0 - No].
  • DefaultNPA: Default area code applied to 7-digit external numbers.
  • SIPAccountsID: ID of the associated SIP account.
  • Fwd: Internal routing ID for unconditional forwarding (0 for off).
  • FwdExternal: External number to forward to.
  • FwdBusy, FwdNA, FwdOffline, FwdBusy_Internal, FwdNA_Internal, FwdOffline_Internal: Internal routing IDs for conditional forwarding.
  • FwdAfterSeconds, FwdAfterSeconds_Internal: Seconds before no-answer forwarding triggers.
  • Record: Recording mode for the extension.
  • DoNotRecord: Boolean [1 - Yes, 0 - No].
  • ExtEmail: Email address for recording delivery.
  • CallWaiting: Boolean [1 - Yes, 0 - No].
  • RoamingCode: Numeric roaming passcode.
  • LDPasscode: Numeric long distance passcode.
  • CanMonitor: Boolean [1 - Yes, 0 - No].
  • MonitorType: Monitoring type. Only applies when CanMonitor is enabled.
  • DistinctiveRingDirect: Boolean [1 - Yes, 0 - No].
  • Wraptime: Numeric wrap-up time in seconds.
  • AlwaysUseCID: Boolean [1 - Yes, 0 - No].
  • RouteGroupID: Default route group ID.
  • InDirectory: Boolean [1 - Yes, 0 - No].
  • BounceTo: Internal routing ID to transfer to on no answer.
  • GlobalSDID: Global speed dial profile ID.
  • ParkingGroup: Parking group ID.
  • XMPP: XMPP account address.
  • PausedPresence: Boolean [1 - Yes, 0 - No].
  • BlockInternalCalls: Boolean [1 - Yes, 0 - No].
  • PrivateCID: Boolean [1 - Yes, 0 - No].
  • Language: Recording language for the extension.
  • JoinMessageID: Message library ID played when joining.
  • EmailTranscriptFlag: Boolean [1 - Yes, 0 - No].
  • TranscriptionStrategy: Transcription strategy.
  • MultimediaEnabled, FillLimit, PhoneLoad, MaxLoad: Multimedia queue handling settings.
  • RuleListID: Time rule ID applied to the routing entry.
  • ClosedInternalRoutingID: Internal routing ID used when the time rule is closed.
  • SIPUsername: Username of the linked SIP account.

Request:

                
                  POST /api/extension/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                        "ID": "5",
                        "ExtensionNumber": "101",
                        "Name": "Reception",
                        "Active": "1"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Provided API Key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is invalid."
                  }
                
                

/api/extension/add/

This endpoint adds a new extension. The extension record and its internal routing entry are created together. The extension references an existing SIP account through the optional SIPAccountsID field.

The request must contain the following attributes:

  • Customer: ID of the customer the extension belongs to, validated to exist. Required for global API keys. Customer-scoped keys must supply their own customer ID and cannot add extensions for other customers.
  • ExtensionNumber: The extension number. Must be 10 to 49, or 3 to 5 digits in length, and not already in use for the customer.
  • Name: The name of the extension.
  • CIDNum: Caller ID number. Must follow proper numbering conventions (NPA NXX XXXX).

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • CIDName: Caller ID name.
  • E911_CIDNum: E911 caller ID number. Must follow proper numbering conventions (NPA NXX XXXX).
  • CIDInternalOverride: Defaults to an empty string. Internal caller ID override. Digits only, 3 to 10 characters.
  • DisplayCallerId: Boolean [1 - Yes, 0 - No].
  • DefaultNPA: Default area code applied to 7-digit external numbers.
  • SIPAccountsID: ID of the SIP account to associate with this extension.
  • Active: Boolean [1 - Yes, 0 - No].
  • Fwd: Defaults to 0. Internal routing ID to forward unconditionally to (0 for off).
  • FwdExternal: Defaults to an empty string. External number to forward to.
  • FwdBusy, FwdNA, FwdOffline: Defaults to 0. Internal routing IDs for conditional forwarding.
  • FwdBusy_Internal, FwdNA_Internal, FwdOffline_Internal: Internal routing IDs for conditional forwarding of internal calls.
  • FwdAfterSeconds, FwdAfterSeconds_Internal: Seconds before no-answer forwarding triggers.
  • Record: Recording mode for the extension.
  • DoNotRecord: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • ExtEmail: Email address for recording delivery.
  • CallWaiting: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • RoamingCode: Defaults to an empty string. Numeric roaming passcode, up to 50 digits.
  • LDPasscode: Defaults to an empty string. Numeric long distance passcode, up to 10 digits. Must be unique per customer.
  • CanMonitor: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • MonitorType: Defaults to 0. Monitoring type. Only applies when CanMonitor is enabled.
  • DistinctiveRingDirect: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • Wraptime: Defaults to 0. Numeric wrap-up time in seconds.
  • AlwaysUseCID: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • RouteGroupID: Defaults to 0. Default route group ID. Admin only. Customer-scoped API keys cannot set it and will receive an error if it is supplied.
  • InDirectory: Defaults to 1. Boolean [1 - Yes, 0 - No]. Whether the extension appears in the directory.
  • BounceTo: Defaults to 0. Internal routing ID to transfer to on no answer.
  • GlobalSDID: Defaults to 0. Global speed dial profile ID.
  • ParkingGroup: Parking group ID.
  • XMPP: XMPP account address (example@example.ca).
  • PausedPresence: Boolean [1 - Yes, 0 - No].
  • BlockInternalCalls: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • PrivateCID: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • Language: Defaults to 'default'. Recording language for the extension.
  • JoinMessageID: Defaults to 0. Message library ID played when joining.
  • EmailTranscriptFlag: Boolean [1 - Yes, 0 - No].
  • TranscriptionStrategy: Defaults to 'dynamic'. Transcription strategy.
  • RuleListID: Time rule ID applied to the routing entry.
  • ClosedInternalRoutingID: Internal routing ID used when the time rule is closed.
  • MultimediaEnabled, FillLimit: Defaults to 0. Multimedia queue handling settings.
  • PhoneLoad, MaxLoad: Defaults to 10. Multimedia queue handling settings.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • ID: The ID of the newly created extension.

Request:

                
                  POST /api/extension/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ExtensionNumber": "101",
                    "Name": "Front Desk",
                    "CIDNum": "7055551234",
                    "SIPAccountsID": "12"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "ID": 88
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Extension is already in use."
                  }
                
                

/api/extension/edit/

This endpoint updates an existing extension. Only the fields supplied in the request are changed. Any field omitted will keep its current database value. A global key may edit any extension by its ID. A customer-scoped key may only edit extensions belonging to its own customer. The extension's customer cannot be changed through edit.

The request must contain the following attributes:

  • ID: The ID of the extension to be edited.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Required for customer-scoped API keys (must match the key's customer). A global key does not need it for edit, as the extension is identified by its ID.
  • ExtensionNumber: The extension number. Not required on edit. Must be 10 to 49, or 3 to 5 digits in length, and not already in use for the customer.
  • Name: The name of the extension. Not required on edit.
  • CIDNum: Caller ID number. Not required on edit. Must follow proper numbering conventions (NPA NXX XXXX).
  • CIDName: Caller ID name.
  • E911_CIDNum: E911 caller ID number. Must follow proper numbering conventions (NPA NXX XXXX).
  • CIDInternalOverride: Internal caller ID override. Digits only, 3 to 10 characters.
  • DisplayCallerId: Boolean [1 - Yes, 0 - No].
  • DefaultNPA: Default area code applied to 7-digit external numbers.
  • SIPAccountsID: ID of the SIP account to associate with this extension.
  • Active: Boolean [1 - Yes, 0 - No].
  • Fwd: Internal routing ID to forward unconditionally to (0 for off).
  • FwdExternal: External number to forward to.
  • FwdBusy, FwdNA, FwdOffline, FwdBusy_Internal, FwdNA_Internal, FwdOffline_Internal: Internal routing IDs for conditional forwarding.
  • FwdAfterSeconds, FwdAfterSeconds_Internal: Seconds before no-answer forwarding triggers.
  • Record: Recording mode for the extension.
  • DoNotRecord: Boolean [1 - Yes, 0 - No].
  • ExtEmail: Email address for recording delivery.
  • CallWaiting: Boolean [1 - Yes, 0 - No].
  • RoamingCode: Numeric roaming passcode, up to 50 digits.
  • LDPasscode: Numeric long distance passcode, up to 10 digits. Must be unique per customer.
  • CanMonitor: Boolean [1 - Yes, 0 - No].
  • MonitorType: Monitoring type. Only applies when CanMonitor is enabled.
  • DistinctiveRingDirect: Boolean [1 - Yes, 0 - No].
  • Wraptime: Numeric wrap-up time in seconds.
  • AlwaysUseCID: Boolean [1 - Yes, 0 - No].
  • RouteGroupID: Default route group ID. Admin only. Customer-scoped API keys cannot set it and will receive an error if it is supplied.
  • InDirectory: Boolean [1 - Yes, 0 - No]. Whether the extension appears in the directory.
  • BounceTo: Internal routing ID to transfer to on no answer.
  • GlobalSDID: Global speed dial profile ID.
  • ParkingGroup: Parking group ID.
  • XMPP: XMPP account address (example@example.ca).
  • PausedPresence: Boolean [1 - Yes, 0 - No].
  • BlockInternalCalls: Boolean [1 - Yes, 0 - No].
  • PrivateCID: Boolean [1 - Yes, 0 - No].
  • Language: Recording language for the extension.
  • JoinMessageID: Message library ID played when joining.
  • EmailTranscriptFlag: Boolean [1 - Yes, 0 - No].
  • TranscriptionStrategy: Transcription strategy.
  • RuleListID: Time rule ID applied to the routing entry.
  • ClosedInternalRoutingID: Internal routing ID used when the time rule is closed.
  • MultimediaEnabled, FillLimit, PhoneLoad, MaxLoad: Multimedia queue handling settings.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                
                  POST /api/extension/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "88",
                    "Name": "Reception - Renamed"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find extension with ID 88"
                  }
                
                

/api/extension/delete/

This endpoint deletes an extension and its associated routing and linked records (voicemail notifications, ring group memberships, intercom group memberships, multimedia integrations, skills, monitoring records, etc.). The linked SIP account, voicemail box and provisioning device are not deleted. A global key may delete any extension by its ID. A customer-scoped key may only delete extensions belonging to its own customer.

The request must contain the following attributes:

  • ID: The ID of the extension to be deleted.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Required for customer-scoped API keys (must match the key's customer). A global key does not need it for delete, as the extension is identified by its ID.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/extension/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "88"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find extension with ID 88"
                  }
                
                

SIP Account Management Suite

/api/sipaccount/view/

This endpoint will list the available SIP accounts on the system. There will also be an optional ID value that will display information about just the requested SIP account.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • ID: Defaults to all SIP accounts. The ID of the specific SIP account to view (Overrides the ViewType option below to Full).
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will be provided with as much information as possible.
    • Partial: Each listing will be provided with an ID, Username and Description.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array with each row containing the following:
    • ID: ID of the SIP account. To be used with other endpoints.
    • CustID: The Customer ID for the SIP account.
    • Description: The given description of the SIP account.
    • Username: SIP account username for static and dynamic SIP accounts.
    • Host: SIP account host for static SIP accounts.
    • NAT: Boolean [1 - Yes, 0 - No].
    • Type: [static, dynamic, register].
    • DTMFMode: [rfc2833, inband].
    • Port: SIP port, typically 5060.
    • DeleteBlock: Boolean [1 - Yes, 0 - No].
    • NotifyEmail: Email address.
    • FaxCodec: Boolean [1 - Yes, 0 - No].
    • VoiceCodec: Boolean [1 - Yes, 0 - No].
    • VoiceCodec1: Boolean [1 - Yes, 0 - No].
    • VoiceCodec2: Boolean [1 - Yes, 0 - No].
    • VoiceCodec3: Boolean [1 - Yes, 0 - No].
    • VoiceCodec4: Boolean [1 - Yes, 0 - No].
    • Debug: Boolean [1 - Yes, 0 - No].
    • RegisterUsername: Username for Register type.
    • RegisterName: Name / BTN for register type.
    • RegisterDomain: Domain for register type.
    • TransportType: TCP, UDP, SRTP.
    • G722Codec: Boolean [1 - Yes, 0 - No].
    • G729Codec: Boolean [1 - Yes, 0 - No].
    • DynamicFeatures: Boolean [1 - Yes, 0 - No].
    • SIPPostAPI: Boolean [1 - Yes, 0 - No].
    • ACLAllow: String containing the ACL allow list.
    • ACLDeny: String containing the ACL Deny list.
    • AllowInternational: Boolean [1 - Yes, 0 - No].
    • SIPNotifyAPI: Boolean [1 - Yes, 0 - No].
    • StayInAudioPath: Boolean [1 - Yes, 0 - No].
    • Active: Boolean [1 - Yes, 0 - No].

Request:

                
                  POST /api/sipaccount/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                        "Type": "dynamic",
                        "ID": "5",
                        "CustID": "1",
                        "Description": "Test Desc",
                        "Username": "testuser"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/sipaccount/add/

This endpoint will add a new SIP account.

The request must contain the following attributes:

  • CustID: The Customer ID for the SIP account.
  • Description: The given description of the SIP account.
  • Username: SIP account username for static and dynamic SIP accounts.
  • Type: [static, dynamic, register].

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

If Type is set to static the following attributes are required:

  • Password: Password for static and dynamic SIP accounts.
  • Host: SIP account host for static SIP accounts.

If Type is set to dynamic the following attributes are required:

  • Password: Password for static and dynamic SIP accounts.

If Type is set to register the following attributes are required:

  • RegisterUsername: Username for Register type.
  • RegisterPassword: Password for Register type.
  • RegisterName: Name / BTN for register type.
  • RegisterDomain: Domain for register type.

The request may contain the following attributes:

  • NAT: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • DTMFMode: Defaults to rfc2833. Either rfc2833 or inband.
  • Port: Defaults to 5060. SIP port.
  • DeleteBlock: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • NotifyEmail: Email address.
  • FaxCodec: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • VoiceCodec: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • VoiceCodec1: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • VoiceCodec2: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • VoiceCodec3: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • VoiceCodec4: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • Debug: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • TransportType: Defaults to UDP. Either TCP, UDP, or SRTP.
  • G722Codec: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • G729Codec: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • DynamicFeatures: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • SIPPostAPI: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • ACLAllow: String containing the ACL allow list.
  • ACLDeny: String containing the ACL Deny list.
  • AllowInternational: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • SIPNotifyAPI: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • StayInAudioPath: Defaults to 1. Boolean [1 - Yes, 0 - No].
  • Active: Defaults to 1. Boolean [1 - Yes, 0 - No].

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • ID: The ID of the newly created SIP Account.

Request:

                
                  POST /api/sipaccount/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "Description": "Test SIP",
                    "CustID": "1",
                    "Username": "TestSIPAcc",
                    "Type": "dynamic"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "ID": "4"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/sipaccount/edit/

This endpoint will edit an existing SIP account. Only the fields supplied in the request are changed. Any field omitted will keep its current value.

The request must contain the following attributes:

  • ID: The ID of the SIP account to be edited.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • CustID: The Customer ID for the SIP account.
  • Description: The given description of the SIP account.
  • Username: SIP account username for static and dynamic SIP accounts.
  • Password: Password for static and dynamic SIP accounts.
  • Host: SIP account host for static SIP accounts.
  • NAT: Boolean [1 - Yes, 0 - No].
  • Type: [static, dynamic, register].
  • DTMFMode: [rfc2833, inband].
  • Port: SIP port, typically 5060.
  • DeleteBlock: Boolean [1 - Yes, 0 - No].
  • NotifyEmail: Email address.
  • FaxCodec: Boolean [1 - Yes, 0 - No].
  • VoiceCodec: Boolean [1 - Yes, 0 - No].
  • VoiceCodec1: Boolean [1 - Yes, 0 - No].
  • VoiceCodec2: Boolean [1 - Yes, 0 - No].
  • VoiceCodec3: Boolean [1 - Yes, 0 - No].
  • VoiceCodec4: Boolean [1 - Yes, 0 - No].
  • Debug: Boolean [1 - Yes, 0 - No].
  • RegisterUsername: Username for Register type.
  • RegisterPassword: Password for Register type.
  • RegisterName: Name / BTN for register type.
  • RegisterDomain: Domain for register type.
  • TransportType: TCP, UDP, SRTP.
  • G722Codec: Boolean [1 - Yes, 0 - No].
  • G729Codec: Boolean [1 - Yes, 0 - No].
  • DynamicFeatures: Boolean [1 - Yes, 0 - No].
  • SIPPostAPI: Boolean [1 - Yes, 0 - No].
  • ACLAllow: String containing the ACL allow list.
  • ACLDeny: String containing the ACL Deny list.
  • AllowInternational: Boolean [1 - Yes, 0 - No].
  • SIPNotifyAPI: Boolean [1 - Yes, 0 - No].
  • StayInAudioPath: Boolean [1 - Yes, 0 - No].
  • Active: Boolean [1 - Yes, 0 - No].

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/sipaccount/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "4",
                    "Description": "Test SIP Renamed"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/sipaccount/delete/

This endpoint will allow deletion of existing SIP accounts.

The request must contain the following attributes:

  • ID: The ID of the SIP account to be deleted.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/sipaccount/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "4"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

Toggle Monitoring

The toggle monitoring function allows event monitoring to be turned on or off for extensions. Monitoring can also be enabled/disabled for extensions directly through the SolSwitch web interface.

When enabled, notifications will be sent to the notification URL (Configured in SolSwitch settings) when the extension receives an incoming or outgoing call. The SolSwitch portal allows for greater customization of what events are sent to the notification URL.

Toggle Monitoring URL: solswitch/api/monitor/

The request must contain the following attributes:

  • Extension: The extension number to adjust monitoring for. Extensions are numeric values, 3 to 5 digits in length.
  • Enabled: Whether monitoring should be enabled or disabled. Accepted values are 1 and 0, where 1 = Enabled and 0 = Disabled.

The request may contain the following attributes:

  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.

Request:

                
                  POST /api/monitor/ HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 107
                  {
                    "Extension": "123",
                    "Enabled": "1",
                    "Customer": "4",
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Unknown Extension Number"
                  }
                
                

Toll Billing Info

This is used to sync two SolSwitch's toll billing rates and related toll settings. This is generally used when deploying multiple independent sets of SolSwitch systems which will be using the same billing settings.

Only a SolSwitch can use this API call as it involves accessing the database tables and comparing entries. For more information see the Advanced Tools > Toll Management > Toll Sync on the SolSwitch web portal.

Toll Rates

List the current toll rate locations for a certain toll plan.

Toll Rates URL: solswitch/api/tollrates/

The request must contain the following attributes:

  • tollPlanID: The ID of the toll rate list to search on.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • tollPrefix: Filters returned rates to the single entry whose prefix matches the given value. If omitted, all rates for the toll plan are returned.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Prefix: The matching prefix. Only returned when tollPrefix is provided.
  • Area: The area name for the rate. Only returned when tollPrefix is provided.
  • Value: The rate value. Only returned when tollPrefix is provided.
  • When tollPrefix is not provided, the response is an array of objects each containing Prefix, Area, and Value.

Request:

                
                  POST /api/tollrates/
                  HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 124
                  {
                    "Key": "FzeKKeEKSIUXa7ZRMx3FciZwXG2FW8jd",
                    "tollPlanID": "11"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Please use a numerical value"
                  }
                
                

Toll Reporting

Load a report of tolls for the specified time period - either as a per-customer summary, or as a per-call breakdown for a single customer.

If API permissions are set to allow access to a single customer, the report will always pull the single customer breakdown for that customer.

Toll Reporting URL: solswitch/api/tollreport/

The request must contain the following attributes:

  • DateStart: This will limit the returned data to be within DateStart and DateEnd. Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS.
  • DateEnd: This will limit the returned data to be within DateStart and DateEnd. Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Defaults to 1. ID of the customer the function should run on, should be a numeric value.
  • CustNum: Customer Number (as configured in customer settings). When left empty, report will run as a per-customer summary if access is granted to all customers. When provided, report will be a per-call breakdown for the specified customer.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Reason: Reason for fail status (Only if status is FAIL). A list of error messages and explanations can be found at the end of this document.
  • Records: Array of toll report records.

Example 1:

Request:

                
                  POST /api/tollreport/
                  HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 162
                  {
                    "Key": "1234",
                    "DateStart": "2024-07-01",
                    "DateEnd": "2024-08-01"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "0": {
                      "CustNum": "5678",
                      "Company": "Main",
                      "Area": "Canada - AB",
                      "RateCost": "0.0300",
                      "CallCost": "0.32"
                    },
                    "1": {
                      "CustNum": "5678",
                      "Company": "Main",
                      "Area": "Canada - BC",
                      "RateCost": "0.0300",
                      "CallCost": "0.08"
                    }
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "IP address not allowed"
                  }
                
                

Example 2

Request:

                
                  POST /api/tollreport/
                  HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 179
                  {
                    "Key": "1234",
                    "DateStart": "2024-07-01",
                    "DateEnd": "2024-08-01",
                    "CustNum": "5678"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "0": {
                      "Company": "Main",
                      "Area": "Toll Free",
                      "RateCost": "0.0500",
                      "CallCost": "0.06",
                      "CallID": "3753672",
                      "StartTime": "2024-07-16 10:43:35",
                      "Length": "68",
                      "SrcNumber": "4167769547",
                      "DstNumber": "18004614219"
                    },
                    "1": {
                      "Company": "Main",
                      "Area": "Toll Free",
                      "RateCost": "0.0500",
                      "CallCost": "0.03",
                      "CallID": "3754222",
                      "StartTime": "2024-07-16 10:45:07",
                      "Length": "30",
                      "SrcNumber": "4167769547",
                      "DstNumber": "18004614219"
                    }
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "IP address not allowed"
                  }
                
                

Trunk Management Suite

/api/trunk/view/

This endpoint will list the available trunks on the system. There will also be an optional ID value that will display information about just the requested trunk.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • ID: Defaults to all trunks. The ID of the specific trunk to view (Overrides the ViewType option below to Full)
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will be provided with as much information as possible.
    • Partial: Each listing will be provided with an ID, Name and Description.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array with each row containing the following:
    • ID: ID of the trunk. To be used with other endpoints.
    • Name: Name of the trunk.
    • Description: Description of the trunk.
    • TrunkType: 1 - SIP Account, 2 - Line Card.
    • SIPAccountsID: ID of the SIP Account tied to this trunk.
    • UseDIDTable: Boolean [1 - Yes, 0 - No].
    • UseRouteGroup: Boolean [1 - Yes, 0 - No].
    • RouteGroupID: The ID of the route group to be assigned.
    • AddPrefix: Prefix to be added to calls.
    • StripDigit: Number of digits to strip from DIDs.
    • CallLimit: 0 - Unlimited, # - Max calls on trunk.
    • UseLocalRouting: Boolean [1 - Yes, 0 - No].
    • AccessibleSID: Boolean [1 - Yes, 0 - No].
    • Record: Boolean [1 - Yes, 0 - No].
    • ApplyToll: Boolean [1 - Yes, 0 - No].
    • UseE164: Boolean [1 - Yes, 0 - No].
    • CanConf: Boolean [1 - Yes, 0 - No].
    • UnlimitedOutbound: Boolean [1 - Yes, 0 - No].
    • AutoLearnRoutes: Boolean [1 - Yes, 0 - No].
    • AutoLearnAPIKey: Blank string or API key.
    • AutoLearnWeight: Integer value for the weight of this trunk for auto learning.
    • AutoLearnValidated: Boolean [1 - Yes, 0 - No].

Request:

                
                  POST /api/trunk/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "5"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                      "ID": "5",
                      "Name": "Test name",
                      "Description": "Test Desc"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/trunk/add/

This endpoint will add a new trunk.

The request must contain the following attributes:

  • Name: Name of the trunk.
  • Description: Description of the trunk.
  • TrunkType: 1 - SIP Account, 2 - Line Card.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • SIPAccountsID: Defaults to 0. ID of the SIP Account tied to this trunk.
  • UseDIDTable: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • UseRouteGroup: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • RouteGroupID: Defaults to an empty string. The ID of the route group to be assigned.
  • AddPrefix: Defaults to an empty string. Prefix to be added to calls.
  • StripDigit: Defaults to 0. Number of digits to strip from DIDs.
  • CallLimit: Defaults to 0. Max calls on trunk, or 0 for unlimited.
  • UseLocalRouting: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • AccessibleSID: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • Record: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • ApplyToll: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • UseE164: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • CanConf: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • UnlimitedOutbound: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • AutoLearnRoutes: Defaults to 0. Boolean [1 - Yes, 0 - No].
  • AutoLearnAPIKey: Defaults to an empty string. API key or blank string.
  • AutoLearnWeight: Defaults to 23. Integer value for the weight of this trunk for auto learning.
  • AutoLearnValidated: Defaults to 0. Boolean [1 - Yes, 0 - No].

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • ID: The ID of the newly created trunk.

Request:

                
                  POST /api/trunk/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "Name": "Main Trunk",
                    "Description": "Main outbound trunk",
                    "SIPAccountsID": "4",
                    "TrunkType": "1"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "ID": "7"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/trunk/edit/

This endpoint will edit an existing trunk. Only the fields supplied in the request are changed. Any field omitted will keep its current value.

The request must contain the following attributes:

  • ID: The ID of the trunk to be edited.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The request may contain the following attributes:

Note: For edit requests, defaults remain unchanged when omitted.

  • Name: Name of the trunk.
  • Description: Description of the trunk.
  • TrunkType: 1 - SIP Account, 2 - Line Card.
  • SIPAccountsID: ID of the SIP Account tied to this trunk.
  • UseDIDTable: Boolean [1 - Yes, 0 - No].
  • UseRouteGroup: Boolean [1 - Yes, 0 - No].
  • RouteGroupID: The ID of the route group to be assigned.
  • AddPrefix: Blank string or prefix to be added to calls.
  • StripDigit: Number of digits to strip from DIDs.
  • CallLimit: 0 - Unlimited, # - Max calls on trunk.
  • UseLocalRouting: Boolean [1 - Yes, 0 - No].
  • AccessibleSID: Boolean [1 - Yes, 0 - No].
  • Record: Boolean [1 - Yes, 0 - No].
  • ApplyToll: Boolean [1 - Yes, 0 - No].
  • UseE164: Boolean [1 - Yes, 0 - No].
  • CanConf: Boolean [1 - Yes, 0 - No].
  • UnlimitedOutbound: Boolean [1 - Yes, 0 - No].
  • AutoLearnRoutes: Boolean [1 - Yes, 0 - No].
  • AutoLearnAPIKey: Blank string or API key.
  • AutoLearnWeight: Integer value for the weight of this trunk for auto learning.
  • AutoLearnValidated: Boolean [1 - Yes, 0 - No].

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/trunk/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "4",
                    "Name": "Test Trunk Renamed"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

/api/trunk/delete/

This endpoint will allow deletion of existing trunks.

The request must contain the following attributes:

  • ID: The ID of the trunk to be deleted.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/trunk/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "4"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "No Records Found."
                  }
                
                

Voicemail Management

This endpoint is used to create, view, edit and delete voicemail boxes on the system. Notify or Distribution Extensions can be managed through the optional NotifyExtensions array on add and edit.

If API permissions are set to allow access to a single customer, all requests are limited to that customer's voicemail boxes. If API permissions allow access to all customers, requests may act on any customer's voicemail boxes and the Customer field selects which one.

The Customer field identifies which customer to act on. It is required on add when API permissions allow access to all customers. For edit and delete the voicemail box is identified by its globally unique ID and the Customer field is not required when API permissions allow access to all customers. When API permissions are restricted to a single customer, the request must always supply that customer number. A voicemail box's customer is set at creation and cannot be changed through edit.

/api/voicemail/view/

This endpoint lists voicemail boxes for the target customer, with optional filtering by ID or ExtensionNumber, and a ViewType to control how much data is returned.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: ID of the customer the function should run on. Only honoured when API permissions allow access to all customers. When API permissions are restricted to a single customer, requests are always limited to that customer.
  • ID: Defaults to all voicemail boxes. The ID of the specific voicemail box to view.
  • ExtensionNumber: Defaults to all voicemail boxes. The extension number to filter by.
  • ViewType: Defaults to Partial. Can be set to Full or Partial to control how much data will be returned:
    • Full: Each listing will include every voicemail box field plus a NotifyExtensions array of extension IDs configured as notify or distribution targets.
    • Partial: Each listing will include ID, ExtensionNumber, GivenID, Name and Email.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • Results: An array with each row containing the following:
  • ID: ID of the voicemail box. To be used with other endpoints.
  • ExtensionNumber: The extension number assigned to the voicemail box.
  • GivenID: The mailbox ID number (used when transferring voicemail and in greetings).
  • Name: The given name of the voicemail box.
  • Email: The email address (or comma separated addresses) configured for delivery.

When ViewType is set to Full, each row additionally contains the following:

  • ExitIRID: Routing destination ID used when a caller dials '0' during the greeting. 0 means disabled.
  • EmailOnlyFlag: Boolean [1 - Yes, 0 - No]. When enabled, messages are not stored locally after being emailed.
  • EmailTranscriptFlag: Transcript delivery mode. 0 - Off, 1 - Transcript and File, 2 - Transcript Only.
  • TranscriptionStrategy: Transcription strategy [priority, dynamic].
  • DayLimit: Number of days a message is retained before automatic deletion. 0 means manual deletion only.
  • SayCallerID: Boolean [1 - Yes, 0 - No].
  • SayDateTime: Boolean [1 - Yes, 0 - No].
  • DistributionList: Boolean [1 - Yes, 0 - No].
  • resetflag: Boolean [1 - Yes, 0 - No].
  • NotifyExtensions: Array of extension IDs configured as notify or distribution targets.

The voicemail Password is never returned by view. It can be set or updated through /api/voicemail/add/ and /api/voicemail/edit/.

Request:

                
                  POST /api/voicemail/view/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "12"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "Results": [
                      {
                        "ID": "12",
                        "ExtensionNumber": "101",
                        "GivenID": "101",
                        "Name": "Front Desk",
                        "Email": "reception@example.com"
                      }
                    ]
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Provided API Key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is invalid."
                  }
                
                

/api/voicemail/add/

This endpoint adds a new voicemail box and assigns it an extension number. The mailbox folder under /ss/shared/voicemail/cust<CustomerID>/mailbox<NewID> is also created so that messages can be recorded.

The request must contain the following attributes:

  • Customer: ID of the customer the voicemail box belongs to. Required when API permissions allow access to all customers, and validated to exist. When API permissions are restricted to a single customer, the new voicemail box always belongs to that customer.
  • ExtensionNumber: The extension number. Must be 10 to 49, or 3 to 5 digits in length, and not already in use for the customer.
  • Name: The name of the voicemail box.
  • Password: The voicemail passcode. Must be a 3 to 7 digit number.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • GivenID: Mailbox ID used in greetings and for transferring voicemail between mailboxes. Must be a 3 to 6 digit number and unique per customer. Default matches ExtensionNumber.
  • Email: Email address (or comma separated addresses) for voicemail delivery.
  • EmailOnlyFlag: Defaults to 0. Boolean [1 - Yes, 0 - No]. When enabled, messages are not stored locally after being emailed.
  • EmailTranscriptFlag: Transcript delivery mode. 0 - Off, 1 - Transcript and File, 2 - Transcript Only. Transcription (Speech to Text) must be enabled for the customer to use a value other than 0.
  • TranscriptionStrategy: Transcription strategy [priority, dynamic]. Default priority.
  • ExitIRID: This is where a call will be routed if someone dials '0' during the playback of the voicemail greeting. Must be the numeric ID of an existing routing destination belonging to the same customer. Use 0 to disable the option.
  • DayLimit: Defaults to 0. Number of days a message is retained before automatic deletion. 0 means manual deletion only.
  • SayCallerID: Defaults to 0. Boolean [1 - Yes, 0 - No]. Whether the system announces the caller ID before playback.
  • SayDateTime: Defaults to 0. Boolean [1 - Yes, 0 - No]. Whether the system announces the date and time before playback.
  • DistributionList: Defaults to 0. Boolean [1 - Yes, 0 - No]. When enabled, NotifyExtensions receive their own copy of the message instead of being notified.
  • resetflag: Boolean [1 - Yes, 0 - No]. Forces the user to change their passcode the next time they log in.
  • NotifyExtensions: Array of extension IDs that should be notified (or receive distributed copies if DistributionList is enabled) when a message is left. Each ID must belong to the same customer as the voicemail box.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"
  • ID: The ID of the newly created voicemail box.

Request:

                
                  POST /api/voicemail/add/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "Customer": "5",
                    "ExtensionNumber": "101",
                    "Name": "Front Desk",
                    "Password": "1234",
                    "Email": "reception@example.com",
                    "NotifyExtensions": [88, 92]
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK",
                    "ID": 47
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Extension is already in use."
                  }
                
                

/api/voicemail/edit/

This endpoint updates an existing voicemail box. Only the fields supplied in the request are changed. Any field omitted will keep its current value. When API permissions allow access to all customers, any voicemail box may be edited by its ID. When API permissions are restricted to a single customer, only voicemail boxes belonging to that customer may be edited. The voicemail box's customer cannot be changed through edit.

If ExtensionNumber changes, the new number is applied across the system and any auto-updating phone directory entries that referenced the old extension are updated to the new value and name. Supplying NotifyExtensions replaces the existing set of notify or distribution targets for this voicemail box.

The request must contain the following attributes:

  • ID: The ID of the voicemail box to be edited.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Required when API permissions are restricted to a single customer (and must match that customer). Not required when API permissions allow access to all customers, as the voicemail box is identified by its ID.
  • ExtensionNumber: The extension number. Not required on edit. Must be 10 to 49, or 3 to 5 digits in length, and not already in use for the customer.
  • Name: The name of the voicemail box. Not required on edit.
  • Password: The voicemail passcode. Not required on edit. Must be a 3 to 7 digit number. An empty value keeps the existing passcode.
  • GivenID: Mailbox ID used in greetings and for transferring voicemail between mailboxes. Must be a 3 to 6 digit number and unique per customer.
  • Email: Email address (or comma separated addresses) for voicemail delivery.
  • EmailOnlyFlag: Boolean [1 - Yes, 0 - No]. When enabled, messages are not stored locally after being emailed.
  • EmailTranscriptFlag: Transcript delivery mode. 0 - Off, 1 - Transcript and File, 2 - Transcript Only. Transcription (Speech to Text) must be enabled for the customer to use a value other than 0.
  • TranscriptionStrategy: Transcription strategy [priority, dynamic].
  • ExitIRID: This is where a call will be routed if someone dials '0' during the playback of the voicemail greeting. Must be the numeric ID of an existing routing destination belonging to the same customer. Use 0 to disable the option.
  • DayLimit: Number of days a message is retained before automatic deletion. 0 means manual deletion only.
  • SayCallerID: Boolean [1 - Yes, 0 - No]. Whether the system announces the caller ID before playback.
  • SayDateTime: Boolean [1 - Yes, 0 - No]. Whether the system announces the date and time before playback.
  • DistributionList: Boolean [1 - Yes, 0 - No]. When enabled, NotifyExtensions receive their own copy of the message instead of being notified.
  • resetflag: Boolean [1 - Yes, 0 - No]. Forces the user to change their passcode the next time they log in.
  • NotifyExtensions: Array of extension IDs that should be notified (or receive distributed copies if DistributionList is enabled) when a message is left. Each ID must belong to the same customer as the voicemail box. Supplying this replaces the existing set.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/voicemail/edit/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "47",
                    "Name": "Front Desk - Renamed",
                    "NotifyExtensions": [88]
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find voicemail box with ID 47"
                  }
                
                

/api/voicemail/delete/

This endpoint deletes a voicemail box, its assigned extension number, and any notify or distribution extensions linked to it. When API permissions allow access to all customers, any voicemail box may be deleted by its ID. When API permissions are restricted to a single customer, only voicemail boxes belonging to that customer may be deleted.

The request must contain the following attributes:

  • ID: The ID of the voicemail box to be deleted.

The request may contain the following attributes:

  • Key: API key for connection to the system. Required field if an API key has been enabled.
  • Customer: Required when API permissions are restricted to a single customer (and must match that customer). Not required when API permissions allow access to all customers, as the voicemail box is identified by its ID.

The response will contain the following attributes:

  • Status: "OK" or "FAIL"

Request:

                
                  POST /api/voicemail/delete/ HTTP/1.1
                  Content-Type: application/json
                  {
                    "Key": "YGLbZZaJWVMJfOXHCTIEADFGIRLbHZAd",
                    "ID": "47"
                  }
                
                

Response (SUCCESS)

                
                  {
                    "Status": "OK"
                  }
                
                

Response (FAIL)

                
                  {
                    "Status": "FAIL",
                    "Reason": "Could not find voicemail box with ID 47"
                  }
                
                

Error Messages

Below are error messages that can be received from the API, and their reasons.

API

  • Invalid API function: The function being called does not exist.

CallID

  • Invalid CallID: The call ID provided is not valid (must be a positive integer value).
  • Unknown CallID: The provided call ID does not match any calls on record.

Call

  • Call did not start: New call unable to start or unable to retrieve call information.

Channel

  • Invalid Channel: The channel field isn't set.
  • Unknown Channel: The provided channel does not match any active calls.

Customer

  • Invalid Customer ID: The customer ID provided is not valid (must be a positive integer value).
  • Unknown Customer ID: No customer exists with the given ID.
  • No access to customer number #: Your IP/API Key does not have access rights to the given customer ID.

Date

  • No matching end time: Start time provided but no end time.
  • Invalid date format: Provided format does not match the required.

Destination

  • Invalid Destination: The destination number isn't set or isn't numeric.

DID

  • Invalid DID provided: The DID is not a numeric entry. Must not contain "(", ")" or "-".

Enabled

  • Invalid Enabled Value: Enabled value not set or is an invalid character. Accepted inputs are 1 or 0.

Extension

  • Invalid Extension Number: The extension number isn't set or isn't numeric.
  • Unknown Extension Number: The provided extension number does not exist on the specified customer.

Fax

  • Cannot send fax, no destination number: The To variable was not set, or was not set to a valid number.
  • Cannot send fax, no source number: The From variable was not set, or was not set to a valid number.
  • From phone number provided is not a valid fax to email account: The From variable does not point to a valid FaxToEmail account.

File

  • You must upload a file to fax: No File variable was passed to the function.
  • Error converting file for faxing. If this problem persists, please contact the system administrator: Error in the converting process of the .pdf. Make sure no non-standard encoding is being used when rendering the .pdf.
  • Only PDFs are accepted, type Detected: <FileType>: The uploaded file is not a PDF. The detected file extension is appended to the error message.

IP

  • IP does not have access: The IP being used to connect does not have permission to connect to the API function.

Key

  • Error with Key: The API key provided is invalid or does not have access to the specified API function.

Recording

  • Call not recorded: The requested call was not recorded. This could be due to recording not being set up for the involved parties, or one of the involved parties having privacy enabled.
  • Recording not generated: The requested call was recorded, but the system is still working on generating the recording. This will generally be completed within a couple minutes of the call ending.

Time Rules

  • Time rule not found: There is no time rule with the supplied ID on the requested customer.

Tone

  • Invalid Tone: Tone not set or contains invalid characters. Accepted characters are: *, #, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Unknown

  • Missing required field: <Field>: A required parameter was not passed to the API. Check documentation on the function you're trying to use.
  • No results to display: No data was returned from a function that should always return data (Eg /api/getcustomerinformation/).

Route Types

Below is a table describing the route types for SourceType and DestinationType values

ID: RouteType

  • 1: Queue
  • 2: FaxToEmail
  • 3: Voicemail
  • 4: VirtualExtension
  • 5: RingGroup
  • 6: IVR
  • 7: Extension
  • 8: Recording
  • 9: MeetMe
  • 10: PageGroup
  • 11: RouteGroup
  • 12: FollowMe
  • 13: ParkingLot
  • 14: VoIP Line
  • 15: Trunk
  • 16: QueueCallback
  • 17: TimeRule
  • 18: Sol-Cast
  • 19: NotifyQueue
  • 20: ScheduledRouting
  • 21: FaxSwitch
  • 22: DV
  • 23: Hold

Example API Calls

Below are some example calls of how to use and access SolSwitch API.

Command Line cURL Example

JSON file contents:

                
                  {
                    "Customer":"1",
                    "Key":"YOUR_KEY_HERE"
                  }
                
                

cURL command to run:

                
                  curl -s --header 'Content-Type: application/json' --request POST --data-binary "@./YOUR_JSON_FILE.json" http://SS_IP_HERE/api/listactivecalls/ | jq
                
                

Results:

                
                  {
                    "Status":"OK",
                    "Calls":
                    [{
                      "CallID":"25169817",
                      "SourceNumber":"490",
                      ........
                      "Duration":"00:00:12"
                    }]
                  }
                
                

PHP Example

Request:

                
                  $array = array(
                    "Key" => "YOUR_KEY_HERE",
                    "DateStart" => "2021-02-16",
                    "DateEnd" => "2021-02-16");
                  $json = json_encode($array, 128);
                  $url = "http://SS_IP_HERE/api/cdrexport/";
                  
                  $curl = curl_init();
                  curl_setopt($curl, CURLOPT_POST, 1);
                  curl_setopt($curl, CURLOPT_URL, $url);
                  curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
                  curl_setopt($curl, CURLOPT_HTTPHEADER, Array('Content-Type: application/json'));
                  curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
                  
                  $result = curl_exec($curl);
                  curl_close($curl);
                  
                  print $result;
                
                

Response:

                
                  {
                    "LegID":"6166",
                    "StartTime":"2021-08-04 10:43:18",
                    "ConnectTime":"",
                    "EndTime":"2021-08-04 10:43:20",
                    "SourceName":"test-ext2",
                    "SourceNumber":"9697",
                    "DestinationName":"test-mitel-ext",
                    "DestinationNumber":"9696",
                    "Disposition":"NOANSWER",
                    "DialedNumber":"9696",
                    "SourceType":"7",
                    "DestinationType":"7",
                    "CallCode":""
                  }
                
                

Python Example

Request:

                
                  import requests
                  url = "http://SS_IP_HERE/api/scheduledrouting/"
                  headers = {"Content-Type":"application/json","Content-Length": "74"}
                  jsonBody = {
                    "Customer":"1",
                    "Key":"YOUR KEY HERE",
                    "ID":"2"
                  }
                  response = requests.request("POST", url, headers=headers, json=jsonBody)
                  if response.status_code == 200:
                  print(response.text)
                  elif response.status_code == 404:
                  print('**Not found.**')
                
                

Response:

                
                  {
                    "Status": "OK",
                    "Name": "Test 2",
                    "Extension": "102",
                    "RouteExt": "9991",
                    "RouteType": "12",
                    "IRID": "5",
                    "RouteName": "test-ext"
                  }