Twilio MMS status is always remains Sent when sent

2019-08-23 09:33发布

问题:

I am building a bot for Twilio (SMS) channel. When I send a Simple plain SMS to a number in US, it gets delivered with status in twilio message log as Delivered.

But when I attach any image to the message to send MMS, the message never gets delivered, and its status in twilio log remains sent always.

Here is how I'm attaching media to MMS.

var msg = new builder.Message(session);
msg.attachmentLayout(builder.AttachmentLayout.list)
msg.attachments([
    new builder.HeroCard(session)
        .title("This is Title")
        .subtitle("This is sub title")
        .text("This is text")
        .images([builder.CardImage.create(session, 'http://www.readersdigest.ca/wp-content/uploads/2011/01/4-ways-cheer-up-depressed-cat.jpg')])
]);

session.send(msg).endDialog();

I have also used another way to build message as:

var msg = new builder.Message(session)
    .text("This is a title - which can be long and multiple line sometimes<br/><br/>The body of the text can be really really long sometimes with different formats with links <http://google.com|Google><br/><br/>some times with a footer with `formats`")
    .addAttachment({
        contentUrl: 'http://www.readersdigest.ca/wp-content/uploads/2011/01/4-ways-cheer-up-depressed-cat.jpg',
        contentType: 'image/png',
        name: 'BotFrameworkOverview.png'
    });

Both messages never get delivered.

But a simple message with no media is successfully delivered as-

var msg = new builder.Message(session)
   .text("This is a title - which can be long and multiple line sometimes<br/><br/>The body of the text can be really really long sometimes with different formats with links <http://google.com|Google><br/><br/>some times with a footer with `formats`")

Twilio Log: