twilio / twilio-go

A Go package for communicating with the Twilio API.
MIT License
290 stars 40 forks source link

All SSML tags are malformed and do not work with Twilio #220

Open PhilThurston opened 8 months ago

PhilThurston commented 8 months ago

Issue Summary

Currently all SSML tags are malformed. They are either capitalized for example the proper <emphasis> is instead generated as <Emphasis> or <say-as> is generated as <SayAs>. These generate an error code of 12200 XML Validation warning and the call fails.

Steps to Reproduce

Create a twiml with any function that is designed to inject an SSML tag.

Code Snippet

        say := &twiml.VoiceSay{}
    say.InnerElements = []twiml.Element{
        &twiml.VoiceP{Words: "This will generate the wrong SSML"}
    }

    hangup := &twiml.VoiceHangup{}

    return []twiml.Element{say, hangup}

Technical details: