Sip Accounts

Table of Contents

Overview

This is where you, you guessed it, manage your sip accounts. You can create, list, modify and delete them here.

Controller: /sipaccounts
Full Url: https://apiv1.teleapi.net/sipaccounts

Functions

/create

Full Url: https://apiv1.teleapi.net/sipaccounts/create

Arguments:

Info: This will create a sip account for you. account_type needs to be either "server" or "device", depending on if you intend to have a sip server (e.g. Asterisk) connect, or a device (e.g. soft phone) connect.

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully created sip account"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Missing variable: account_type"
}

/list

Full Url: https://apiv1.teleapi.net/sipaccounts/list

Arguments:

Info: Get a list of all of you sip accounts you have with us

Example Success
{
    "code": 200,
    "status": "success",
    "data": [
        {
            "id": 42,
            "account_type": "device",
            "domain": "blarg.xy13.siprr.net",
            "username": "blarg",
            "password": "asdf"
        },
        {
            "id": 43,
            "account_type": "server",
            "domain": "blarg.xy13.siprr.net",
            "username": "wonka",
            "password": "chocolateFactory"
        }
    ]
}
Example Error
{
    "code": 200,
    "status": "success",
    "data": []
}

/update

Full Url: https://apiv1.teleapi.net/sipaccounts/update

Arguments:

Info: Update a sip account with us. All fields are required, so if they're not changing just send back what is already there.

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully updated sip account"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid sip account id"
}

/remove

Full Url: https://apiv1.teleapi.net/sipaccounts/remove

Info: Remove a sip account. Please not that once done, any call flow that routes to this sip account will fail to work until it is updated

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully deleted sip account"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid sip account id"
}