Web service-based smart routing

We explain how to use a third-party web service in smart routing.

Smart Routing with Web Service Integration

Hipcall offers three smart routing strategies:

  • Route to a customer representative
  • Route to the last contacted user
  • Route via a web service

This guide focuses on the web service routing option for developers.


Requirements

To use web service-based routing:

  • Your Hipcall plan must include API access
  • You’ll need the following configuration fields:
    • Web service URL (required)
    • Web service username and password (if authentication is needed)

How It Works

When an incoming call reaches Smart Routing, Hipcall sends the following JSON payload to your web service via HTTP POST:

{
"caller": "905438851111",
"number": "+908508850000",
"timestamp": 1719843672,
"uuid": "564aff1e-2141-4925-9c2e-b7dd28b87c16"
}
  • caller: The customer’s phone number
  • number: Your number registered in Hipcall
  • timestamp: Unix timestamp of the event
  • uuid: Unique identifier for the call
    Your web service should respond with a 200 status code and the following JSON:
{
"extension": "1000"
}

The smart routing system understands from this response that the call should be forwarded to extension 1000.


Failure Conditions

If communication with the web service fails for any reason, the system will route the call to the default destination configured in smart routing.

What qualifies as a failed communication?

  • The HTTP response code is not 200
  • The HTTP request is not answered within 3 seconds
  • Incorrect BASIC AUTH username or password
  • Malformed JSON response
  • The extension field in the JSON is missing or refers to an inactive extension

Technical Support

Our company does not provide support for third-party software.
Instead, you may reach out to the developer community in Turkish or English for assistance.