Outplan

Overview

The VoIPBIN’s outplan API provides a powerful tool for managing and customizing dialing strategies for outdial operations. The outplan defines how the system should handle dialing attempts and retries when making outbound calls to various destinations.

With the outplan API, users can create and configure multiple outplans, each with its own unique dialing strategy. The outplan allows users to set parameters such as dial timeout, try interval, and maximum try counts for different dialing attempts.

The outplan API is commonly used in conjunction with the outdial API to manage the dialing behavior of outbound calling campaigns. Users can apply specific outplans to different outdials, allowing for targeted and customized dialing strategies for different destinations or scenarios.

By utilizing the outplan API, businesses and developers can optimize their outbound calling operations, increase the success rate of dialing attempts, and effectively manage retries and timeouts. This flexibility and customization provided by the outplan API make it a valuable tool for organizations looking to streamline their outbound communication processes and enhance their customer engagement efforts.

Key features

The outplan API offers several key features that allow users to finely tune the dialing behavior of their outbound calling campaigns:

  • Dial Timeout: Users can specify the maximum duration that the system will wait for a call to be answered before considering it a timeout and marking it as such.

  • Try Interval: The outplan API allows users to define the interval between consecutive dialing attempts. This feature gives users control over how often the system should retry dialing a destination if the call is not successful on the first attempt.

  • Maximum Try Counts: Users can set the maximum number of times the system should try to connect to a destination. This parameter enables users to customize the level of persistence in attempting to establish a successful call.

Outplan

Outplan

{
    "id": "<string>",
    "name": "<string>",
    "detail": "<string>",
    "source": {
        ...
    },
    "dial_timeout": 30000,
    "try_interval": 60000,
    "max_try_count_0": <number>,
    "max_try_count_1": <number>,
    "max_try_count_2": <number>,
    "max_try_count_3": <number>,
    "max_try_count_4": <number>,

    "tm_create": "<string>",
    "tm_update": "<string>",
    "tm_delete": "<string>"
}
  • id: Outplan’s id.

  • name: Outplan’s name.

  • detail: Outplan’s detail.

  • source: Source address. See detail here.

  • dial_timeout: Timeout for dialing. milliseconds

  • try_interval: Delay time for retry. milliseconds

  • max_try_count_0: Maximum try count for destination 0.

  • max_try_count_1: Maximum try count for destination 1.

  • max_try_count_2: Maximum try count for destination 2.

  • max_try_count_3: Maximum try count for destination 3.

  • max_try_count_4: Maximum try count for destination 4.

example

{
    "id": "d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e",
    "name": "test outplan",
    "detail": "outplan for test use.",
    "source": {
        "type": "tel",
        "target": "+821021656521",
        "target_name": "",
        "name": "",
        "detail": ""
    },
    "dial_timeout": 30000,
    "try_interval": 60000,
    "max_try_count_0": 5,
    "max_try_count_1": 5,
    "max_try_count_2": 5,
    "max_try_count_3": 5,
    "max_try_count_4": 5,
    "tm_create": "2022-04-28 01:50:23.414000",
    "tm_update": "2022-04-30 12:01:13.780469",
    "tm_delete": "9999-01-01 00:00:00.000000"
}

Try interval

When the VoIPBIN makes a retry dialing, it waits try interval after the previous call’s end.

_images/outplan_struct_try_interval.png

Max try count

The max try count configs max try count for the given destination.

_images/outplan_struct_max_try_count.png

Tutorial

Get list of outplans

Example

$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/outplans?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTUwNTQxMjYsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.uV26jlo9kdV-qxxj32cjNa99JRcD96HkFF0h_cuEXLA'

{
    "result": [
        {
            "id": "d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e",
            "name": "test outplan",
            "detail": "outplan for test use.",
            "source": {
                "type": "tel",
                "target": "+821021656521",
                "target_name": "",
                "name": "",
                "detail": ""
            },
            "dial_timeout": 30000,
            "try_interval": 60000,
            "max_try_count_0": 5,
            "max_try_count_1": 5,
            "max_try_count_2": 5,
            "max_try_count_3": 5,
            "max_try_count_4": 5,
            "tm_create": "2022-04-28 01:50:23.414000",
            "tm_update": "2022-04-30 12:01:13.780469",
            "tm_delete": "9999-01-01 00:00:00.000000"
        }
    ],
    "next_page_token": "2022-04-28 01:50:23.414000"
}

Get detail of outplan

Example

$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/outplans/d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTUwNTQxMjYsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.uV26jlo9kdV-qxxj32cjNa99JRcD96HkFF0h_cuEXLA'

{
    "id": "d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e",
    "name": "test outplan",
    "detail": "outplan for test use.",
    "source": {
        "type": "tel",
        "target": "+821021656521",
        "target_name": "",
        "name": "",
        "detail": ""
    },
    "dial_timeout": 30000,
    "try_interval": 60000,
    "max_try_count_0": 5,
    "max_try_count_1": 5,
    "max_try_count_2": 5,
    "max_try_count_3": 5,
    "max_try_count_4": 5,
    "tm_create": "2022-04-28 01:50:23.414000",
    "tm_update": "2022-04-30 12:01:13.780469",
    "tm_delete": "9999-01-01 00:00:00.000000"
}

Create a new outplan

Example

$ curl --location --request POST 'https://api.voipbin.net/v1.0/outplans?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lciI6IntcImlkXCI6XCI1ZTRhMDY4MC04MDRlLTExZWMtODQ3Ny0yZmVhNTk2OGQ4NWJcIixcInVzZXJuYW1lXCI6XCJhZG1pblwiLFwibmFtZVwiOlwiYWRtaW5cIixcImRldGFpbFwiOlwiYWRtaW4gYWNjb3VudFwiLFwid2ViaG9va19tZXRob2RcIjpcIlBPU1RcIixcIndlYmhvb2tfdXJpXCI6XCJodHRwczovL2VueDM4NTN6M2pnMnEueC5waXBlZHJlYW0ubmV0L1wiLFwicGVybWlzc2lvbl9pZHNcIjpbXCIwMzc5NmUxNC03Y2I0LTExZWMtOWRiYS1lNzIwMjNlZmQxYzZcIl0sXCJ0bV9jcmVhdGVcIjpcIjIwMjItMDItMDEgMDA6MDA6MDAuMDAwMDAwXCIsXCJ0bV91cGRhdGVcIjpcIjIwMjItMDQtMTQgMDE6Mjg6NDYuNDU0ODk3XCIsXCJ0bV9kZWxldGVcIjpcIjk5OTktMDEtMDEgMDA6MDA6MDAuMDAwMDAwXCJ9IiwiZXhwIjoxNjUxNTU2OTA2fQ.hQ1WXO7Ionnw7FL9_keqZ2Np__Djm3lkIH5BJl1QSMs' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "test outplan",
        "detail": "outplan for test use.",
        "source": {
            "type": "tel",
            "target": "+821021656521"
        },
        "dial_timeout": 30000,
        "try_interval": 600000,
        "max_try_count_0": 5,
        "max_try_count_1": 5,
        "max_try_count_2": 5,
        "max_try_count_3": 5,
        "max_try_count_4": 5
    }'

Update outplan’s dial info

Example

$ curl --location --request PUT 'https://api.voipbin.net/v1.0/outplans/d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e/dial_info?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lciI6IntcImlkXCI6XCI1ZTRhMDY4MC04MDRlLTExZWMtODQ3Ny0yZmVhNTk2OGQ4NWJcIixcInVzZXJuYW1lXCI6XCJhZG1pblwiLFwibmFtZVwiOlwiYWRtaW5cIixcImRldGFpbFwiOlwiYWRtaW4gYWNjb3VudFwiLFwid2ViaG9va19tZXRob2RcIjpcIlBPU1RcIixcIndlYmhvb2tfdXJpXCI6XCJodHRwczovL2VueDM4NTN6M2pnMnEueC5waXBlZHJlYW0ubmV0L1wiLFwicGVybWlzc2lvbl9pZHNcIjpbXCIwMzc5NmUxNC03Y2I0LTExZWMtOWRiYS1lNzIwMjNlZmQxYzZcIl0sXCJ0bV9jcmVhdGVcIjpcIjIwMjItMDItMDEgMDA6MDA6MDAuMDAwMDAwXCIsXCJ0bV91cGRhdGVcIjpcIjIwMjItMDQtMTQgMDE6Mjg6NDYuNDU0ODk3XCIsXCJ0bV9kZWxldGVcIjpcIjk5OTktMDEtMDEgMDA6MDA6MDAuMDAwMDAwXCJ9IiwiZXhwIjoxNjUxNTU2OTA2fQ.hQ1WXO7Ionnw7FL9_keqZ2Np__Djm3lkIH5BJl1QSMs' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "source": {
            "type": "tel",
            "target": "+821021656521"
        },
        "dial_timeout": 30000,
        "try_interval": 60000,
        "max_try_count_0": 5,
        "max_try_count_1": 5,
        "max_try_count_2": 5,
        "max_try_count_3": 5,
        "max_try_count_4": 5
    }'

Delete outplan

Example

$ curl --location --request DELETE 'https://api.voipbin.net/v1.0/outplans/88334a03-bc6b-40b6-878f-46df2d9865db?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lciI6IntcImlkXCI6XCI1ZTRhMDY4MC04MDRlLTExZWMtODQ3Ny0yZmVhNTk2OGQ4NWJcIixcInVzZXJuYW1lXCI6XCJhZG1pblwiLFwibmFtZVwiOlwiYWRtaW5cIixcImRldGFpbFwiOlwiYWRtaW4gYWNjb3VudFwiLFwid2ViaG9va19tZXRob2RcIjpcIlBPU1RcIixcIndlYmhvb2tfdXJpXCI6XCJodHRwczovL2VueDM4NTN6M2pnMnEueC5waXBlZHJlYW0ubmV0L1wiLFwicGVybWlzc2lvbl9pZHNcIjpbXCIwMzc5NmUxNC03Y2I0LTExZWMtOWRiYS1lNzIwMjNlZmQxYzZcIl0sXCJ0bV9jcmVhdGVcIjpcIjIwMjItMDItMDEgMDA6MDA6MDAuMDAwMDAwXCIsXCJ0bV91cGRhdGVcIjpcIjIwMjItMDQtMTQgMDE6Mjg6NDYuNDU0ODk3XCIsXCJ0bV9kZWxldGVcIjpcIjk5OTktMDEtMDEgMDA6MDA6MDAuMDAwMDAwXCJ9IiwiZXhwIjoxNjUxNTU2OTA2fQ.hQ1WXO7Ionnw7FL9_keqZ2Np__Djm3lkIH5BJl1QSMs'

Update outplan’s basic info

Example

$ curl --location --request PUT 'https://api.voipbin.net/v1.0/outplans/d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lciI6IntcImlkXCI6XCI1ZTRhMDY4MC04MDRlLTExZWMtODQ3Ny0yZmVhNTk2OGQ4NWJcIixcInVzZXJuYW1lXCI6XCJhZG1pblwiLFwibmFtZVwiOlwiYWRtaW5cIixcImRldGFpbFwiOlwiYWRtaW4gYWNjb3VudFwiLFwid2ViaG9va19tZXRob2RcIjpcIlBPU1RcIixcIndlYmhvb2tfdXJpXCI6XCJodHRwczovL2VueDM4NTN6M2pnMnEueC5waXBlZHJlYW0ubmV0L1wiLFwicGVybWlzc2lvbl9pZHNcIjpbXCIwMzc5NmUxNC03Y2I0LTExZWMtOWRiYS1lNzIwMjNlZmQxYzZcIl0sXCJ0bV9jcmVhdGVcIjpcIjIwMjItMDItMDEgMDA6MDA6MDAuMDAwMDAwXCIsXCJ0bV91cGRhdGVcIjpcIjIwMjItMDQtMTQgMDE6Mjg6NDYuNDU0ODk3XCIsXCJ0bV9kZWxldGVcIjpcIjk5OTktMDEtMDEgMDA6MDA6MDAuMDAwMDAwXCJ9IiwiZXhwIjoxNjUxNTU2OTA2fQ.hQ1WXO7Ionnw7FL9_keqZ2Np__Djm3lkIH5BJl1QSMs' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "test outplan",
        "detail": "outplan for test use"
    }'

{
    "id": "d5fb7357-7ddb-4f2d-87b5-8ccbfd6c039e",
    "name": "test outplan",
    "detail": "outplan for test use",
    "source": {
        "type": "tel",
        "target": "+821021656521",
        "target_name": "",
        "name": "",
        "detail": ""
    },
    "dial_timeout": 30000,
    "try_interval": 60000,
    "max_try_count_0": 5,
    "max_try_count_1": 5,
    "max_try_count_2": 5,
    "max_try_count_3": 5,
    "max_try_count_4": 5,
    "tm_create": "2022-04-28 01:50:23.414000",
    "tm_update": "2022-05-02 05:59:44.290658",
    "tm_delete": "9999-01-01 00:00:00.000000"
}