import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.channels.create(request={
"name": "twilio",
"channel_service": models.ChannelServices.SIP,
"supported_modes": "chat,voice",
"is_system_channel": False,
"config": {
"account_sid": "AC123...",
"auth_token": "sometoken",
"provider_credentials": {
"api_key": "atk123",
"username": "test_username",
},
"telephony": {
"pre_input_timeout": 1.2,
"overall_input_timeout": 20,
"interruptibility": "dtmf_only",
"passive_speech_input_enabled": True,
"passive_input_start": 0.5,
},
},
})
# Handle response
print(res){
"name": "<string>",
"channel_service": "sip",
"id": 123,
"supported_modes": "chat,voice",
"is_system_channel": true,
"config": {
"telephony": {
"interruptibility": "dtmf_only",
"overall_input_timeout": 20,
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 1.2
}
}
}import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.channels.create(request={
"name": "twilio",
"channel_service": models.ChannelServices.SIP,
"supported_modes": "chat,voice",
"is_system_channel": False,
"config": {
"account_sid": "AC123...",
"auth_token": "sometoken",
"provider_credentials": {
"api_key": "atk123",
"username": "test_username",
},
"telephony": {
"pre_input_timeout": 1.2,
"overall_input_timeout": 20,
"interruptibility": "dtmf_only",
"passive_speech_input_enabled": True,
"passive_input_start": 0.5,
},
},
})
# Handle response
print(res){
"name": "<string>",
"channel_service": "sip",
"id": 123,
"supported_modes": "chat,voice",
"is_system_channel": true,
"config": {
"telephony": {
"interruptibility": "dtmf_only",
"overall_input_timeout": 20,
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 1.2
}
}
}Request model to create a channel through the organizations API
The channel name
The service that facilitates communication on the channel
sip, twilio, email, webchat, africastalking The configuration of the channel
Show child attributes
SID of the Twilio account
"AC123..."
The Twilio auth token
"sometoken"
Provider-specific credentials. Initially to be used for AfricasTalking creds.In a future this would be used for Twilio creds too (removing the account_sid and auth_token fields).
Show child attributes
{
"api_key": "atk123",
"username": "test_username"
}Telephony configurations to be applied to the targets under the channel
Show child attributes
Pre input silence threshold
0 <= x <= 10Post speech silence timeout to determine input as ended.
0 <= x <= 10Post dtmf silence timeout to determine input as ended.
0 <= x <= 10Total input timeout
0 <= x <= 300Number of seconds to start listening to user input before assistant speech ends
-5 <= x <= 5Interruptibility setting for user input.Valid values: none, dtmf_only, speech_only, all
Whether passive speech input is enabled (input while assistant is speaking)
Waiting time to start passive input (in seconds) after start of assistant speech
0 <= x <= 5Whether asynchronous mode is enabled for the conversation
{
"interruptibility": "dtmf_only",
"overall_input_timeout": 20,
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 1.2
}The comma-delimited list of supported modes for the channel, which defines the possible communication methods for channel targets linked to it.
"chat,voice"
Whether the channel is a built-in system channel (i.e., is not customizable)
Successful Response
The channel name
The service that facilitates communication on the channel
sip, twilio, email, webchat, africastalking The channel ID
The comma-delimited list of supported modes for the channel, which defines the possible communication methods for channel targets linked to it.
"chat,voice"
Whether the channel is a built-in system channel (i.e., is not customizable)
Configuration for the channel
Show child attributes
Telephony configurations to be applied to targets belonging to the channel. Only applies to voice supported channels.
Show child attributes
Pre input silence threshold
0 <= x <= 10Post speech silence timeout to determine input as ended.
0 <= x <= 10Post dtmf silence timeout to determine input as ended.
0 <= x <= 10Total input timeout
0 <= x <= 300Number of seconds to start listening to user input before assistant speech ends
-5 <= x <= 5Interruptibility setting for user input.Valid values: none, dtmf_only, speech_only, all
Whether passive speech input is enabled (input while assistant is speaking)
Waiting time to start passive input (in seconds) after start of assistant speech
0 <= x <= 5Whether asynchronous mode is enabled for the conversation
{
"interruptibility": "dtmf_only",
"overall_input_timeout": 20,
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 1.2
}{
"telephony": {
"interruptibility": "dtmf_only",
"overall_input_timeout": 20,
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 1.2
}
}