Extension

Overview

In order for your SIP endpoint to receive calls from Voipbin, you need a domain, extension and registration.

Calling a registered SIP endpoint works the same as calling any other SIP URI, only you will now be using the AOR of your registered SIP extension(endpoint).

When calling your registered SIP extension(endpoint), you should use the general SIP domain URI, omitting the Voipbin’s sip URI i.e.:

{extension}@{your voipbin domain}.sip.voipbin.net

Tutorial

Get list of extensions

Gets the list of registered extensions of the given domain.

$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/extensions?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTQzMzE0OTgsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.Gg1WsbrKDnQQh7Pvi5y5CV51NVQBz7pgU_T9TxshXPs&domain_id=cc6a05eb-33a4-444b-bf8a-359de7d95499'

{
    "result": [
        {
            "id": "0e7f8158-c770-4930-a98e-f2165b189c1f",
            "user_id": 1,
            "name": "test domain",
            "detail": "test domain creation",
            "domain_id": "cc6a05eb-33a4-444b-bf8a-359de7d95499",
            "extension": "test11",
            "password": "bad79bd2-71e6-11eb-9577-c756bf092a88",
            "tm_create": "2021-02-18 12:42:27.688282",
            "tm_update": "",
            "tm_delete": ""
        }
    ],
    "next_page_token": "2021-02-18 12:42:27.688282"
}

Get detail of specified extension

Gets the detail of registered extension.

$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/extensions/0e7f8158-c770-4930-a98e-f2165b189c1f?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTQzMzE0OTgsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.Gg1WsbrKDnQQh7Pvi5y5CV51NVQBz7pgU_T9TxshXPs'

{
    "id": "0e7f8158-c770-4930-a98e-f2165b189c1f",
    "user_id": 1,
    "name": "test domain",
    "detail": "test domain creation",
    "domain_id": "cc6a05eb-33a4-444b-bf8a-359de7d95499",
    "extension": "test11",
    "password": "bad79bd2-71e6-11eb-9577-c756bf092a88",
    "tm_create": "2021-02-18 12:42:27.688282",
    "tm_update": "",
    "tm_delete": ""
}

Create a extension

Create a new extension.

$ curl -k --location --request POST 'https://api.voipbin.net/v1.0/extensions?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTQzMzE0OTgsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.Gg1WsbrKDnQQh7Pvi5y5CV51NVQBz7pgU_T9TxshXPs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "test domain",
    "detail": "test domain creation",
    "domain_id": "cc6a05eb-33a4-444b-bf8a-359de7d95499",

    "extension": "test12",
    "password": "27a4d0f2-757c-11eb-bc8f-4f045857b89c"
}'

{
    "id": "6a7934ff-0e1c-4857-857b-23c9e27d267b",
    "user_id": 1,
    "name": "test domain",
    "detail": "test domain creation",
    "domain_id": "cc6a05eb-33a4-444b-bf8a-359de7d95499",
    "extension": "test12",
    "password": "27a4d0f2-757c-11eb-bc8f-4f045857b89c",
    "tm_create": "2021-02-23 02:09:39.701458",
    "tm_update": "",
    "tm_delete": ""
}

Update the extension

Update the existed extension with given info.

$ curl -k --location --request PUT 'https://api.voipbin.net/v1.0/extensions/6a7934ff-0e1c-4857-857b-23c9e27d267b?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTQzMzE0OTgsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.Gg1WsbrKDnQQh7Pvi5y5CV51NVQBz7pgU_T9TxshXPs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "update test extension name",
    "detail": "update test extension detail",
    "password": "5316382a-757c-11eb-9348-bb32547e99c4"
}'

{
    "id": "6a7934ff-0e1c-4857-857b-23c9e27d267b",
    "user_id": 1,
    "name": "update test extension name",
    "detail": "update test extension detail",
    "domain_id": "cc6a05eb-33a4-444b-bf8a-359de7d95499",
    "extension": "test12",
    "password": "5316382a-757c-11eb-9348-bb32547e99c4",
    "tm_create": "2021-02-23 02:09:39.701458",
    "tm_update": "2021-02-23 02:11:03.992067",
    "tm_delete": ""
}

Delete the extension

Delete the existed extension of given id.

$ curl --location --request DELETE 'https://api.voipbin.net/v1.0/extensions/6a7934ff-0e1c-4857-857b-23c9e27d267b?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTQzMzE0OTgsInVzZXIiOnsiaWQiOjEsInBlcm1pc3Npb24iOjEsInVzZXJuYW1lIjoiYWRtaW4ifX0.Gg1WsbrKDnQQh7Pvi5y5CV51NVQBz7pgU_T9TxshXPs'