Telephony/SIP
Configuring Dial-In / Dial-Out
Configure dial in
Configure dial out
Enabling dial-in to a channel
- POST /channels/(string: uuid)/settings/dial/in/(string: state)
If enabled, dial-in numbers can be associated with the channel. Note: use of this option may incur metered charges depending on your organization’s license agreement, so the call can only be made by users who have the “Customer Admin” role. This call can be used to override the default value that was set at creation time based on the dialIn attribute of the return from the “Client Settings” call.
- Parameters:
uuid (string) – The channel ID
state (string) – Can be one of enable/disable
Enabling dial-out from a channel
- POST /channels/(string: uuid)/settings/dial/out/(string: state)
If enabled, meeting hosts are able to place outbound phone calls to a person they wish to add to the meeting. Note: use of this option may incur metered charges depending on your organization’s license agreement, so the call can only be made by users who have the “Customer Admin” role. This call can be used to override the default value that was set at creation time based on the dialOut attribute of the return from the “Client Settings” call.
- Parameters:
uuid (string) – The channel ID
state (string) – Can be one of enable/disable
PIN Management
Delete PIN
Get dial-in pins
- GET /channels/(string: uuid)/dial/pins
Get dial-in pins for given channel. An empty list means anyone can enter the channel.
- Parameters:
uuid (string) – The channel ID
- Response JSON Object:
pin (string) – pin code
organizer (boolean) – [default: false] information if given pin is for meeting organizers(starts meeting)
Set dial-in PIN
- POST /channels/(string: uuid)/dial/pins
Set dial-in PIN for given channel. If set, a PIN is required for dial-in access to the meeting.
- Parameters:
uuid (string) – The channel ID
- Request JSON Object:
pin (string) – pin code
organizer (boolean) – [default: false] information if given pin is for meeting organizers(starts meeting)
Number Assignment
Add number to default list for client
Assign a dial in number
- POST /channels/(string: uuid)/dial/numbers/(string: number)
Make a assignment for a dial in number. That allows participants to dial into channel using selected number
- Parameters:
uuid (string) – The channel ID
number (string) – Number that will be reserved, + is not required to make an assignment
- Response JSON Object:
phone (phonenumber) – Details about phone number
code (option[string]) – Unique channel code for reservation
Cancel assignment for a dial in number
Get available (for reservation) dial in numbers
- GET /channels/available/dial/numbers
Get a list of numbers that can become associated with given channel. Number can be attached directly or using special routing code
- Query Parameters:
limit (string) – How many numbers should be returned for pagination
offset (string) – Ofsset used for pagination
countryCode (string) – Limit listing for a given country code
- Response JSON Object:
number (string) – Phone number
code (string) – Country code
isDefault (option[boolean]) – [default: None] True if this number is default for this client
Get dial in numbers
- GET /numbers/inbound
Get a list of numbers that are available or can be marked as available for a given client context. Enabled numbers can be assigned as dial-in numbers for a channel in this client. When marking number as disabled all existing assignments(to channels) will be removed.
- Query Parameters:
limit (string) – How many numbers should be returned for pagination
offset (string) – Ofsset used for pagination
countryCode (string) – Limit listing for a given country code
- Response JSON Array of Objects:
number (string) – Phone number
code (string) – Country code
isDefault (option[boolean]) – [default: None] True if this number is default for this client
Get reserved/associated dial in numbers
- GET /channels/(string: channel)/dial/numbers
Get a list of reserved/associated dial in numbers for a given channel.
- Parameters:
channel (string) – The channel ID
- Query Parameters:
limit (string) – How many numbers should be returned for pagination
offset (string) – Offset used for pagination
- Response JSON Object:
phone (phonenumber) – Details about phone number
code (option[string]) – Unique channel code for reservation
Make a exclusive number assignment
- POST /channels/(string: uuid)/dial/numbers/(string: number)/exclusive
Make a exclusive assignment for a dial in number. Exclusive assignment meant that the number will be attached only to one channel. That allows participants to dial into channel using selected number
- Parameters:
uuid (string) – The channel ID
number (string) – Number that will be assign, + is not required to make an assignment
- Response JSON Object:
phone (phonenumber) – Details about phone number
code (option[string]) – Unique channel code for reservation
Remove number from default list for client
Runtime Control
Get a cost quote for an outbound call to a number
- GET /channels/(string: uuid)/dial/quote/(string: number)
Get a quote (cost per minute) for a call to the specified number. This function returns the latest quote from our upstream PSTN providers for a call to the specific number. The currency unit is reported and should always be in USD. The format for the number is “+<phone-number>-<dtmf>” where the phone number is the appropriate number of digits (E.164 format) and the DTMF data consists of the digits 0-9 , the hash symbool (#) and the asterisk (). For this function, the DTMF portion is ignored as it has no bearing on the cost of the call
- Parameters:
uuid (string) – The channel ID
number (string) – A number in E164 format with Horn’s DTMF extension
- Response JSON Object:
number (string) – The number for which the pricing is applicable
cost (double) – The cost per minute for making this call
currency (string) – Currency unit for the quoted call costs
country (string) – The country to which this call is being placed
Place an outbound SIP call to a registered user
- POST /channels/(string: uuid)/dial/registered
Place an outbound call to the specified phone number. The user will appear in the channel as the specified user. This call requires that dial-out is enabled for the channel. The format for the number is “+<phone-number>-<dtmf>” where the phone number is the appropriate number of digits (E.164 format) and the DTMF data consists of the digits 0-9 , the hash symbool (#) and the asterisk (). The “,” symbol is used to indicate a delay of 1 second. The DTMF will be transmitted one second after the call has connected if it is present in the number. For example,
+12124425555-445#,123
will dial the number+12124425555
. One second after it connects, it will send the sequence445#
and one second after this, it will send123
as DTMF. The DTMF sequence is limited to 25 characters. Note that the DTMF portion is optional.- Parameters:
uuid (string) – ID of the channel to dial for.
- Request JSON Object:
number (string) – The number to dial
sipUserId (long) – The Horn ID for the user who we are dialling.
whisper (option[boolean]) – If true, the call is started in whisper mode. It defaults to “false” for backwards compatibility
Place an outbound SIP call to an unregistered/temporary user
- POST /channels/(string: uuid)/dial/unregistered
Place an outbound call to the specified phone number. The user will appear in the channel as new user with name given in request. This call requires that dial-out is enabled for the channel. The format for the number is “+<phone-number>-<dtmf>” where the phone number is the appropriate number of digits (E.164 format) and the DTMF data consists of the digits 0-9 , the hash symbool (#) and the asterisk (). The “,” symbol is used to indicate a delay of 1 second. The DTMF will be transmitted one second after the call has connected if it is present in the number. For example,
+12124425555,445#,123
will dial the number+12124425555
. One second after it connects, it will send the sequence445#
and one second after this, it will send123
as DTMF. Note that some heroic efforts will be made by the backend to correctly extract a dialable number. ++1(411) GET-Horn,1234 will be correctly interpreted as “+14114384676”. The DTMF portion (“,1234”) will be sent after the call has been picked up. The DTMF sequence is limited to 25 dialable characters. Note that the DTMF portion is optional.- Parameters:
uuid (string) – ID of the channel to dial for.
- Request JSON Object:
number (string) – The number to dial
name (string) – Name that will be displayed in channel.
whisper (option[boolean]) – If true, the call is started in whisper mode. It defaults to “false” for backwards compatibility
- Response JSON Object:
id (long) – The User id