Create a new phone number
Register a new phone number. For Twilio, provide account credentials. For SIP, choose between 'registration' mode (Somleng registers TO your PBX) or 'ip_allowlist' mode (your PBX IP is allowlisted). SIP numbers support outbound proxy and auth user options in registration mode.
API key in the format: Bearer YOUR_API_KEY
In: header
"twilio""twilio" | "sip" | "voximplant" | "jambonz"SIP trunk mode. Use 'registration' for username/password auth, 'ip_allowlist' for IP-based allowlisting. Only applicable when provider is 'sip'.
"registration""registration" | "ip_allowlist"uuidRequired if provider is 'twilio'
Required if provider is 'twilio'
Required if provider is 'sip' and sipMode is 'registration'
length <= 60Required if provider is 'sip' and sipMode is 'registration'
SIP registrar host (e.g. 'pbx.example.com'). Required if provider is 'sip' and sipMode is 'registration'. In registration mode, this is the host Somleng registers TO.
length <= 100Optional SIP outbound proxy. Used when SIP traffic needs to route through a proxy instead of directly to the host. Only used in registration mode.
length <= 100Optional SIP authentication username, if different from sipUsername. Only used in registration mode.
length <= 60IP address of your PBX/SBC. Required if provider is 'sip' and sipMode is 'ip_allowlist'.
length <= 255SIP port number. Used in both 'registration' and 'ip_allowlist' modes.
50601 <= value <= 65535SIP transport protocol. Used when sipMode is 'ip_allowlist'.
"udp""udp" | "tcp" | "tls"SIP registration transport protocol. Used when sipMode is 'registration'.
"udp""udp" | "tcp" | "tls"Response Body
application/json
application/json
curl -X POST "https://api.chorus-ai.co/v1/phone-numbers" \ -H "Content-Type: application/json" \ -d '{ "number": "string" }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"number": "string",
"provider": "twilio",
"sipMode": "registration",
"agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"details": [
{}
]
}Last updated on