Skip to content

ConversationRelay.ReportInputDuringAgentSpeech is bool? but TwiML spec requires string enum #829

@BobbyGerace

Description

@BobbyGerace

Describe the bug

The ReportInputDuringAgentSpeech property on Twilio.TwiML.Voice.ConversationRelay is declared as bool? and serialized as bool.ToString().ToLower() (see ConversationRelay.cs). This means the only attribute values the SDK can produce are "true" and "false".

However, the TwiML spec for this attribute defines it as a string enum with allowed values none, dtmf, speech, or any. Neither "true" nor "false" is a valid value, so the SDK cannot produce spec-compliant TwiML for this attribute and consumers have to fall back to SetOption("reportInputDuringAgentSpeech", "...") to bypass the typed property.

Code snippet

using Twilio.TwiML.Voice;

var relay = new ConversationRelay("wss://example.test/ws")
{
    ReportInputDuringAgentSpeech = true,
};

Console.WriteLine(relay.ToString());

Actual behavior

Output

<?xml version="1.0" encoding="utf-8"?>
  <ConversationRelay url="wss://example.test/ws" reportInputDuringAgentSpeech="true"></ConversationRelay>

Expected behavior

Per the TwiML spec for , the reportInputDuringAgentSpeech attribute is a string enum. The SDK should accept and emit those four spec values.

twilio-csharp version

7.13.6

Framework version

net10.0

Logs or error messages

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugbug in the library

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions