Solved 3CX Twilio - Send SMS to Queue from Twilio Flow

Status
Not open for further replies.

DavidM84

Free User
Joined
Mar 5, 2022
Messages
96
Reaction score
32
Hi,

I'm trying to send an sms to the 3CX webhook. It works, partially.
Here is the payload I am using in my "Send SMS" widget in Twilio Flow:

{
"ToCountry": "01",
"ToState": "",
"SmsMessageSid": "",
"NumMedia": "0",
"ToCity": "",
"FromZip": "",
"SmsSid": "{{trigger.message.ChannelSid}}",
"FromState": "",
"SmsStatus": "sent",
"FromCity": "",
"Body":"{{trigger.message.Body}}",
"FromCountry": "US",
"To": "{{flow.channel.address}}",
"ToZip": "",
"NumSegments": "1",
"MessageSid": "{{trigger.message.MessageSid}}",
"AccountSid": "XXXXXXXXXXXXXXX",
"From": "{{contact.channel.address}}",
"ApiVersion": "2010-04-01"
}

The problem is that in 3CX the SMS gets sent to my extension each time. I text from my cell phone to my Twilio # that triggers a flow by keywords.
If the keyword is "test" I want it to be sent to a 3CX Queue agents to be dealt with.

So far it only sends to my extension, even though the SMS Message route is set to a different extension.

Please advise, thanks!
 
We don't currently support Twilio Flow as we have never tested it and it was not in the requirements when we built the system, but what I can say to help is that if you set the system to Verbose and send an incoming message, then you can check the Management Console log to see where it was routed and possibly why:
1647936870590.png
 
Here is what I see:

2022/03/22 07:46:31.672|19583|0040|Trc|received from MS: {
"provider_id": 12003,
"type": "message",
"from": "+1530xxxxxxx",
"to": "+1844xxxxxxxx",
"conversation_id": "CONVERSATION-6C63579D-xxxxx-47D8074D-xxxxx",
"message_id": "MESSAGE-xxxxx-51292B7D-xxxxx-5AB15046",
"provider_signature": "",
"provider_timestamp": 1647960391127,
"provider_message_id": SMdbexxxxxxxxxxx",
"provider_conversation_id": "",
"timestamp": 1647960391127,
"message": "this is a test SMS"
}
2022/03/22 07:46:31.673|19583|0040|Dbg|[GS] RequestAsync(ResponseMyMessages. Messages:
ChatMessage: IdConversation=141, Party=+1530xxxxxxxx@+1844xxxxxxx.twilio.sms:100, Id=, Sender=+1530xxxxxxx@+1844xxxxxxx.twilio.sms(David M), IsAnonymousActive=
)
2022/03/22 07:46:31.673|19583|0040|Dbg|[GS] ClientChannelImpl.SendRequest(ResponseMyMessages. Messages:
ChatMessage: IdConversation=141, Party=+1530xxxxxxx@+1844xxxxxxx.twilio.sms:, Id=, Sender=+1530xxxxxxxx@+1844xxxxxxx.twilio.sms(David M), IsAnonymousActive=
) started


What's interesting is that it keeps forwarding to my extension 100 even though nothing is set in 3CX Management Console, for me to receive texts.

I'm sure I'm missing something or doing something wrong.
 
To be clear, this is an untested scenario so I don't know how much help I can be, but, is it possible that you already have a conversation established with Ext 100 that was never marked as "Dealt With"?

If you are not sure an this is a test machine, go to the Dashboard and purge all Chat Logs, then try again:
1648035624800.png

Remember, with Chats especially from SMS, when the first message is received it created a conversation between the External Number and Extension X. Even if you change the routing of incoming messages, if the same External Number sends a message, it will continue to go to Ext X. This will happen until Ext X marks the conversation as "Dealt With" from their WebClient/3CX App.

Other than this, I don't know what else to advise.
 
  • Like
Reactions: DavidM84
To be clear, this is an untested scenario so I don't know how much help I can be, but, is it possible that you already have a conversation established with Ext 100 that was never marked as "Dealt With"?

If you are not sure an this is a test machine, go to the Dashboard and purge all Chat Logs, then try again:
View attachment 28927

Remember, with Chats especially from SMS, when the first message is received it created a conversation between the External Number and Extension X. Even if you change the routing of incoming messages, if the same External Number sends a message, it will continue to go to Ext X. This will happen until Ext X marks the conversation as "Dealt With" from their WebClient/3CX App.

Other than this, I don't know what else to advise.
 
oh, it fixed it! :)

Thank you!
 
You are very welcome! :)
 
Status
Not open for further replies.

Forum statistics

Threads
112,065
Messages
590,578
Members
165,019
Latest member
rsaldin@advancedbrainspin