Skip to Content
Cloud One
  • Products

    Business Communication Suite & Phone System


      By Edition

      ​Cloud

      Software

      Appliance

    By Deployment

    ​On-premise

    Hosted by Cloud One

    Self-hosted

    By Management

    ​Managed By Cloud One

    Semi-Managed by Cloud One

    Self-Managed


    Simu Connect UC Clients


    Simu Connect Web Client Simu Connect Mobile Client Simu Connect Desktop ClientSimu Connect Chrome ExtensionSimu Connect TAPI Integration

    SIP Trunks


    Business SIPPay As You Go SIP Country Presence SIPVirtual Phone NumbersGolden Phone NumbersToll Free NumbersBring Your Own Carrier (BYOC)Calling RatesTalktime Top-up

    Get a Proof of Concept Now!


    Simu Connect POC Application Managed Business Communication Suite Self Managed Business Communication SuiteSIP Trunk POCOdoo Phone POC
  • Solutions

    Business Needs


    Work from Anywhere Hosted UCaaS Self hosted UCaaSVideo ConferencingAppliance PBXAI-powered Cloud PBXWhite-label Solution

    Industry


    Call Center Healthcare HospitalityFinanceEducationLogisticsRetail BusinessGovernment Agency

    Ecosystem


    IP Phones SIP Trunks IntegrationHeadsetsVirtual Phone Numbers

    By Integration


    Odoo Phone System Zoho Phone System Salesforce Phone SystemMicrosoft Dynamics Phone SystemZendesk Phone SystemFreshdesk Phone SystemBitrix24 Phone SystemHubSpot Phone System
  • Resources

    Downloads

    Download user guides and more documents

    Book a Meeting

    Schedule a meeting at your convenience

    Developer Guide

    Read API Documentation for Cloud One BCS API

    Business Communication Suite

    Experience our user-friendly business communication suite today. Explore robust telephony features that enhance your client connections efficiently.  

    See More Details
  • Devices

    Yealink IP Phones


    Yealink T3 Series IP Phones Yealink T4 Series IP Phones Yealink T5 Series IP PhonesYealink T7 Series IP PhonesYealink T8 Series IP Phones Yealink DECT IP Phones

    Voice Conferencing Solutions


    VC Room Systems BYOD Solutions Video Phone Video Conferencing Accessories

    Microsoft Solutions


    MS Teams Rooms Systems Microsoft Phones Conference Phones HeadsetsYealink MeetingBoardYealink MeetingBoard Pro

    Zoom Rooms


    Zoom Rooms Systems Zoom Phones Zoom Cameras BYOD Solutions
  • Help

    Ticketing System


    Submit a Helpdesk TicketReport an Issue

    Training


    User TrainingOperator TrainingCall Center Agent TrainingSupervisor Training

    Frequently Asked Questions


    General FAQBCS FAQSIP Trunks FAQLocal Phone Numbers FAQ

    Contact Us


    WhatsApp Icon


  • Support Helpdesk Contact
  • +254 20 790 0100
  • support@cloudone.co

  • Accounts Helpdesk Contact
  • +254 20 790 0000
  • finance@cloudone.co
  • Visit our Office


    Cloud One Ltd

    Saachi Plaza - Unit A3, Argwings Kodhek Road, Nairobi, Kenya
    P.O.Box 76484-00508 Yaya Centre

    +254 20 790 0000

    hello@cloudone.co


    Kindly do not email multiple contacts as it creates multiple tickets on our CRM


  • Contact Us
  • Blog
    ​​
  • Sign in
  • 0
  • 0
  • Deploy in hours Certified Experts Zero Setup / License Fees*
  • Follow us
    Click here to setup your social networks
    Click here to setup your social networks
Cloud One
  • 0
  • 0
    • Products
    • Solutions
    • Resources
    • Devices
    • Help
    • Contact Us
    • Blog
  • Deploy in hours Certified Experts Zero Setup / License Fees*
  • Follow us
    Click here to setup your social networks
    Click here to setup your social networks
  • Sign in
  • ​​

Add a SIP Trunk

Add and configure a SIP trunk.

Request URL

POST {base_url}/{api_path}/trunk/create?access_token={access_token}

Request parameters

Send different request parameters according to different types of SIP trunk.

  • Add a Register trunk
  • Add a Peer trunk
  • Add an Account trunk

Add a Register trunk

ParameterRequiredTypeDescription
nameYesStringTrunk name.
enableNoIntegerWhether to enable the trunk.

Valid value:

  • 0: Disable

  • 1: Enable

countryYesStringThe country of the ITSP.Note:You can query the desired ITSP using Query ITSP of SIP Trunks.
itspNoStringThe name of the ITSP.Note:You can query the desired ITSP using Query ITSP of SIP Trunks.
typeYesStringTrunk type.

Valid value: register

transportYesStringTransport protocol.Valid value:
  • udp
  • tcp
  • tls
  • dnsnaptr
hostnameYesStringThe domain or IP address of the ITSP.
portYesIntegerThe registration port of the SIP trunk.
domainYesStringThe domain or IP address of the ITSP.
usernameYesStringThe username of the SIP account that is provided by the ITSP.
passwordYesStringThe password of the SIP account.
auth_nameYesStringThe authentication name that is provided by the ITSP.
enb_outbound_proxyNoIntegerWhether to enable an outbound proxy.

Valid value:

  • 0: Disable

  • 1: Enable

outbound_proxy_serverNoStringThe domain name or IP address of the outbound proxy server.
outbound_proxy_portNoIntegerThe port of the outbound proxy server.
codec_selYesStringCodec settings of the trunk.Valid value:
  • ulaw
  • alaw
  • g729
  • gsm
  • h264
  • h263
  • h263p
  • ilbc
  • g722
  • g726
  • speex
  • adpcm
  • mpeg4
  • vp8
  • opus
def_outbound_cidNoStringDefault outbound caller ID.
def_outbound_cid_nameNoStringDefault outbound caller ID name.
outbound_cid_listNoArray <OutCaller_Info>

The information of customized outbound caller ID for specific extensions.

did_listNoArray <DID_List>DID information associated with the trunk.
transparent_trans_180_msgNoInteger

Whether to forward the 180 message following the peer's SDP presence.

Valid value:

  • 0: Disable

  • 1: Enable

setting_of_sip_and_sdp_ipNoStringWhether to use the default or a custom IP address in 'Contact'(SIP) and 'Connection'(SIP) fields.

Valid value:

  • default

  • custom

sip_and_sdp_ip_addrNoStringThe custom IP address to be used in 'Contact'(SIP) and 'Connection(SIP)' fields.
Note:This parameter is required when setting_of_sip_and_sdp_ip is set to custom.
ignore_100_responseNoIntegerWhether to ignore the 100 Trying response.

Valid value:

  • 0: Disable.
  • 1: Enable.
force_sip_uri_schemeNoIntegerWhether to forcibly use sip: URI scheme instead of sips: in registration requests to change SIP transport from encrypted to unencrypted.
Note: This parameter is only available for register trunk when transport is set to tls or dnsnaptr.Valid value:
  • 0: Disable.
  • 1: Enable.
enb_send_302_on_cf_externalNoIntegerWhether to return a "302 Moved Temporarily" response to the caller when forwarding an inbound call to an external number.Valid value:
  • 0: Disable.
  • 1: Enable.
refer_to_supportNoIntegerWhether the PBX can process the SIP REFER requests received via the trunk.Valid value:
  • 0: Disable.
  • 1: Enable.
refer_to_mode_listNoArray<String>The allowed destination types for blind transfers triggered by REFER requests.

Valid value:

  • external_number
  • internal_number
  • This parameter is required and only available when refer_to_support is set to 1.
  • Use a comma to separate multiple destination types.z
Note:
refer_to_prefixNoString

The prefix of the outbound route for blind transfers triggered by REFER requests.

The PBX will prepend the prefix to the target number in the REFER request when transferring the call.

Note:
  • This parameter is only available when refer_to_support is set to 1, and refer_to_mode_list includes external_number.
  • Numbers, and characters * # ( ) . - + are allowed, and the maximum character length is 7.
outbound_failover_sip_codeNoStringSpecify which SIP response codes trigger automatic failover to the next trunk within the same outbound route and re-initiation of the call.

Valid value:

  • default: The default SIP codes (408, 500, 502, 503, 513, 555, and 580) trigger the trunk failover.
  • custom: The custom SIP codes trigger the trunk failover.
sip_codesNoStringCustom SIP response codes that trigger automatic failover to the next trunk within the same outbound route and re-initiation of the call.
Note:
  • This parameter is required when outbound_failover_sip_code is set to custom.
  • The maximum character length is 127, allowing up to 32 SIP response codes separated by ;.
  • Only SIP codes between 300 – 699 take effect.

OutCaller_Info

ParameterRequiredTypeDescription
outbound_cid_optionYesStringThe type of outbound caller ID.Valid value:
  • range
  • shared
outbound_cid_short_codeNoStringThe short code of the outbound caller ID.This code can be used together with the DOD prefix feature code to perform specific operations, such as setting a specific DOD to default, or selecting a DOD to call out without changing the default DOD.
Note: This parameter is only available when outbound_cid_option is set to shared, and the code MUST be unique within the system.
outbound_cidYesStringThe outbound caller ID.Note:
  • Only digits, uppercase and lowercase letters, and the characters -, +, *, # are allowed. The maximum length is 31 characters.
  • When outbound_cid_option is set to range, the format must be +XXX-+XXX or XXX-XXX. E.g. 5503301-5503305, and the start and end numbers must have the same length.
outbound_cid_nameNoStringThe outbound caller ID name.
outbound_cid_to_ext_rangeNoStringThe extension range corresponding to the outbound caller ID range.

The format should be XXX-XXX. E.g. 5000-5005.

Note: This parameter is required when outbound_cid_option is set to range.
ext_listNoArray <Extension_Info>The information of the associated extensions.
Note: This parameter is required when outbound_cid_option is set to shared.
outbound_cid_labelNoStringThe default label of the outbound caller ID.

Extension_Info

ParameterRequiredTypeDescription
typeNoStringWhether this is an extension or an extension group.

Valid value:

  • extension
  • ext_group
ext_numberNoStringThe number of an extension or the name of an extension group.
ext_nameNoStringThe name of an extension or an extension group.
idYesIntegerThe unique ID of an extension or an extension group.

DID_List

ParameterRequiredTypeDescription
didYesStringThe DID number associated with the trunk.
did_nameNoStringThe DID name associated with the trunk.

Add a Peer trunk

ParameterRequiredTypeDescription
nameYesStringTrunk name.
enableNoIntegerWhether to enable the trunk.

Valid value:

  • 0: Disable

  • 1: Enable

countryYesStringThe country of the ITSP.Note:You can query the desired ITSP using Query ITSP of SIP Trunks.
itspNoStringThe name of the ITSP.Note:You can query the desired ITSP using Query ITSP of SIP Trunks.
typeYesStringTrunk type.Valid value:
  • peer
transportYesStringTransport protocol.Valid value:
  • udp
  • tcp
  • tls
  • dnsnaptr
hostnameYesStringThe domain or IP address of the ITSP.
portYesIntegerThe registration port of the SIP trunk.
domainYesStringThe domain or IP address of the ITSP.
codec_selYesStringCodec settings of the trunk.Valid value:
  • ulaw
  • alaw
  • g729
  • gsm
  • h264
  • h263
  • h263p
  • ilbc
  • g722
  • g726
  • speex
  • adpcm
  • vp8
  • opus
def_outbound_cidNoStringDefault outbound caller ID.
def_outbound_cid_nameNoStringDefault outbound caller ID name.
outbound_cid_listNoArray <OutCaller_Info>

The information of customized outbound caller ID for specific extensions.

did_listNoArray <DID_List>DID information associated with the trunk.
transparent_trans_180_msgNoInteger

Whether to forward the 180 message following the peer's SDP presence.

Valid value:

  • 0: Disable

  • 1: Enable

setting_of_sip_and_sdp_ipNoStringWhether to use the default or a custom IP address in 'Contact'(SIP) and 'Connection'(SIP) fields.

Valid value:

  • default

  • custom

sip_and_sdp_ip_addrNoStringThe custom IP address to be used in 'Contact'(SIP) and 'Connection(SIP)' fields.
Note: This parameter is required when setting_of_sip_and_sdp_ip is set to custom.
enb_send_302_on_cf_externalNoIntegerWhether to return a "302 Moved Temporarily" response to the caller when forwarding an inbound call to an external number.
Valid value:
  • 0: Disable.
  • 1: Enable.
refer_to_supportNoIntegerWhether the PBX can process the SIP REFER requests received via the trunk.Valid value:
  • 0: Disable.
  • 1: Enable.
refer_to_mode_listNoArray<String>The allowed destination types for blind transfers triggered by REFER requests.

Valid value:

  • external_number
  • internal_number
  • This parameter is required and only available when refer_to_support is set to 1.
  • Use a comma to separate multiple destination types.z
Note:
refer_to_prefixNoString

The prefix of the outbound route for blind transfers triggered by REFER requests.

The PBX will prepend the prefix to the target number in the REFER request when transferring the call.

Note:
  • This parameter is only available when refer_to_support is set to 1, and refer_to_mode_list includes external_number.
  • Numbers, and characters * # ( ) . - + are allowed, and the maximum character length is 7.
outbound_failover_sip_codeNoStringSpecify which SIP response codes trigger automatic failover to the next trunk within the same outbound route and re-initiation of the call.

Valid value:

  • default: The default SIP codes (408, 500, 502, 503, 513, 555, and 580) trigger the trunk failover.
  • custom: The custom SIP codes trigger the trunk failover.
sip_codesNoStringCustom SIP response codes that trigger automatic failover to the next trunk within the same outbound route and re-initiation of the call.
Note:
  • This parameter is required when outbound_failover_sip_code is set to custom.
  • The maximum character length is 127, allowing up to 32 SIP response codes separated by ;.
  • Only SIP codes between 300 – 699 take effect.

OutCaller_Info

ParameterRequiredTypeDescription
outbound_cid_optionYesStringThe type of outbound Caller ID.
Valid value:
  • range
  • shared
outbound_cid_short_codeNoStringThe short code of the outbound caller ID. This code can be used together with the DOD prefix feature code to perform specific operations, such as setting a specific DOD to default, or selecting a DOD to call out without changing the default DOD.
Note: This parameter is only available when outbound_cid_option is set to shared, and the code MUST be unique within the system.
outbound_cidYesStringThe outbound caller ID.
Note:
  • Only digits, uppercase and lowercase letters, and the characters -, +, *, # are allowed. The maximum length is 31 characters.
  • When outbound_cid_option is set to range, the format must be +XXX-+XXX or XXX-XXX. E.g. 5503301-5503305, and the start and end numbers must have the same length.
outbound_cid_nameNoStringThe outbound Caller ID name.
outbound_cid_to_ext_rangeNoStringThe extension range corresponding to the outbound caller ID range.

The format should be XXX-XXX. E.g. 5000-5005.

Note: This parameter is required when outbound_cid_option is set to range.
ext_listNoArray <Extension_Info>The information of the associated extensions.
Note: This parameter is required when outbound_cid_option is set to shared.
outbound_cid_labelNoStringThe default label of the outbound caller ID.

Extension_Info

ParameterRequiredTypeDescription
typeNoStringWhether this is an extension or an extension group.

Valid value:

  • extension
  • ext_group
ext_numberNoStringThe number of an extension or the name of an extension group.
ext_nameNoStringThe name of an extension or an extension group.
idYesIntegerThe unique ID of an extension or an extension group.

DID_List

ParameterRequiredTypeDescription
didYesStringThe DID number associated with the trunk.
did_nameNoStringThe DID name associated with the trunk.

Add an Account trunk

ParameterRequiredTypeDescription
nameYesStringTrunk name.
enableNoIntegerWhether to enable the trunk.

Valid value:

  • 0: Disable

  • 1: Enable

countryYesStringThe country of the ITSP.
Note: You can query the desired ITSP using Query ITSP of SIP Trunks.
itspNoStringThe name of the ITSP.Note:You can query the desired ITSP using Query ITSP of SIP Trunks.
typeYesStringTrunk type.

Valid value: account

transportYesStringTransport protocol.Valid value:
  • udp
  • tcp
  • tls
usernameYesStringThe user name of the SIP account trunk.
passwordYesStringThe password associated with the user name.
auth_nameYesStringThe authentication name for a third-party device to register with.
codec_selYesStringCodec settings of the trunk.
Valid value:
  • ulaw
  • alaw
  • g729
  • gsm
  • h264
  • h263
  • h263p
  • ilbc
  • g722
  • g726
  • speex
  • adpcm
  • mpeg4
  • vp8
  • opus
def_outbound_cidNoStringDefault outbound caller ID.
def_outbound_cid_nameNoStringDefault outbound caller ID name.
outbound_cid_listNoArray <OutCaller_Info>

The information of customized outbound caller ID for specific extensions.

transparent_trans_180_msgNoInteger

Whether to forward the 180 message following the peer's SDP presence.

Valid value:

  • 0: Disable

  • 1: Enable

ignore_100_responseNoIntegerWhether to ignore the 100 Trying response.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_send_302_on_cf_externalNoIntegerWhether to return a "302 Moved Temporarily" response to the caller when forwarding an inbound call to an external number.
Valid value:
  • 0: Disable.
  • 1: Enable.
refer_to_supportNoIntegerWhether the PBX can process the SIP REFER requests received via the trunk.
Valid value:
  • 0: Disable.
  • 1: Enable.
refer_to_mode_listNoArray<String>The allowed destination types for blind transfers triggered by REFER requests.

Valid value:

  • external_number
  • internal_number
  • This parameter is required and only available when refer_to_support is set to 1.
  • Use a comma to separate multiple destination types.z
Note:
refer_to_prefixNoString

The prefix of the outbound route for blind transfers triggered by REFER requests.

The PBX will prepend the prefix to the target number in the REFER request when transferring the call.

Note:
  • This parameter is only available when refer_to_support is set to 1, and refer_to_mode_list includes external_number.
  • Numbers, and characters * # ( ) . - + are allowed, and the maximum character length is 7.
outbound_failover_sip_codeNoStringSpecify which SIP response codes trigger automatic failover to the next trunk within the same outbound route and re-initiation of the call.

Valid value:

  • default: The default SIP codes (408, 500, 502, 503, 513, 555, and 580) trigger the trunk failover.
  • custom: The custom SIP codes trigger the trunk failover.
sip_codesNoStringCustom SIP response codes that trigger automatic failover to the next trunk within the same outbound route and re-initiation of the call.
Note:
  • This parameter is required when outbound_failover_sip_code is set to custom.
  • The maximum character length is 127, allowing up to 32 SIP response codes separated by ;.
  • Only SIP codes between 300 – 699 take effect.

OutCaller_Info

ParameterRequiredTypeDescription
outbound_cid_optionYesStringThe type of outbound caller ID.
Valid value:
  • range
  • shared
outbound_cid_short_codeNoStringThe short code of the outbound caller ID. This code can be used together with the DOD prefix feature code to perform specific operations, such as setting a specific DOD to default, or selecting a DOD to call out without changing the default DOD.
Note: This parameter is only available when outbound_cid_option is set to shared, and the code MUST be unique within the system.
outbound_cidYesStringThe outbound caller ID.
Note:
  • Only digits, uppercase and lowercase letters, and the characters -, +, *, # are allowed. The maximum length is 31 characters.
  • When outbound_cid_option is set to range, the format must be +XXX-+XXX or XXX-XXX. E.g. 5503301-5503305, and the start and end numbers must have the same length.
outbound_cid_nameNoStringThe outbound caller ID name.
outbound_cid_to_ext_rangeNoStringThe extension range corresponding to the outbound caller ID range.

The format should be XXX-XXX. E.g. 5000-5005.

Note: This parameter is required when outbound_cid_option is set to range.
ext_listNoArray <Extension_Info>The information of the associated extensions.
Note: This parameter is required when outbound_cid_option is set to shared.
outbound_cid_labelNoStringThe default label of the outbound caller ID.

Extension_Info

ParameterRequiredTypeDescription
typeNoStringWhether this is an extension or an extension group.

Valid value:

  • extension
  • ext_group
ext_numberNoStringThe number of an extension or the name of an extension group.
ext_nameNoStringThe name of an extension or an extension group.
idYesIntegerThe unique ID of an extension or an extension group.

Response parameters

ParameterTypeDescription
errcodeIntegerReturned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note:You can check the error code and error message in Error Code and Error Message.
errmsgStringReturned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
idIntegerThe unique ID of the trunk.

Examples

Request example

Add a register trunk.

POST /openapi/v1.0/trunk/create?access_token=LLTQiARUCJPsBrhTR22RBVCvBJ5xAiFI HTTP/1.1 
Host: 192.168.5.150:8088
Content-Type: application/json
{
        "name": "test_Calls",
        "country": "general",
        "type": "register",
        "transport": "dnsnaptr",
        "hostname": "abc.provider.com",
        "port": 5060,
        "domain": "abc.provider.com",
        "username": "6701",
        "password": "aAc1653249",
        "auth_name": "mubJwYEWs9",
        "codec_sel": "ulaw,alaw,g729",
        "def_outbound_cid": "5503300",
        "def_outbound_cid_name": "Cloud One",
        "outbound_cid_list": [
            {
                "outbound_cid_option": "shared",
                "outbound_cid_short_code": "123"
                "outbound_cid": "5503301",
                "outbound_cid_name": "Cloud One Sales",
                "ext_list": [
                    {
                        "ext_number": "Cloud One Sales",
                        "ext_name": "Cloud One Sales",
                        "type": "ext_group"
                    }
                ],
                "outbound_cid_label":"Cloud One Sales"
            }
        ],
        "did_list": [
            {
                "did": "5503308",
                "did_name": "Cloud One"
            }
        ],
         "transparent_trans_180_msg": 0,
        "setting_of_sip_and_sdp_ip": "default",
        "sip_and_sdp_ip_addr": "",
        
        "ignore_100_response": 1,
         "force_sip_uri_scheme": 0,
         "enb_send_302_on_cf_external": 0s,
        "refer_to_support": 1,
        "refer_to_mode_list": [
            "external_number",
            "internal_number"
        ],
        "refer_to_prefix": "55",
        "outbound_failover_sip_code": "custom",
        "sip_codes": "408;480;500;502;503;513;555;580"
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "id": 19
}
Useful Links
  • Home
  • About us
  • Products
  • Services
  • Shipping
  • Return Policy
  • Warranty
  • Contact us
Legal
  • Terms
  • Privacy
  • Shared Responsibility
    Service Level Agreement
  • Certifications
About us

Cloud One Limited is a leading Kenyan local telephony service provider. Established in 2017, we offer reliable and secure cloud and on premise business communication solutions, including SIP trunks, Yealink IP phones, and VPS hosting in our Tier 3 data center.


Our mission is to revolutionize cloud communications by providing unparalleled reliability, cutting-edge innovation, and substantial cost savings. We deliver a stress-free, always-available service experience that empowers businesses to thrive in the digital age.

DUNS Registration Number: 561230946
Company Registration Number: PVT-5JUEYMA
Licensed & Regulated by the Communications Authority of Kenya


Follow us
Connect with us
  • Contact us
  • hello@cloudone.co
  • +254 20 7900000
  • Saachi Plaza, UNIT A3 - Argwings Kodhek Rd
Download Simu Connect

    Get the app on the playstore

    Download desktop app for Windows​

    Download app from the appstore

    Download MacOS app