Whatsapp SIP trunk provider template seems to have broken messaging

perfect-touch

Customer
Joined
Mar 26, 2020
Messages
167
Reaction score
37
So, I have made some kind of progress. This morning I successfully enabled whatsapp messaging to 3cx which worked well.

I then followed the instructions to enable whatsapp SIP trunking.

After importing, the configuration screen for the whatsapp connection in "voice & chat" had changed significantly. I could not get whatsapp calls to work so i deleted the connection and recreated it. Success! Whatsapp calls now come into 3cx over SIP but....

Messages no longer work.

3cx is logging

"Unable to parse message from provider generic. Error: Unknown message received: { "object": "whatsapp_business_account", "entry": [ { "id": "xxx", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "xxx", "phone_number_id": "xxx" }, "contacts": [ { "profile": { "name": "Jonnie" }, "wa_id": "xxx", "user_id": "GB.xxx" } ], "messages": [ { "from": "xxx", "from_user_id": "GB.xxx", "id": "xxx", "timestamp": "1781211347", "text": { "body": "Test" }, "type": "text" } ] }, "field": "messages" } ] } ] }

The "provider generic" bit looks weird to me....
 
OK so the issue seems to be that creation of the the whatsapp messaging in "voice & chat" after importing the new provide template is broken. Specifically, the callback URL is to /sms/generic instead of /sms/whatsapp

To get around this, I deleted the new provider template, recreated the whatsapp messaging connector then created a generic IP trunk in 3cx to receive the calls.

I suspect the whatsapp template needs a little work?

It's also worth noting that the fields for the access token and phone number id are labelled incorrectly in the template too
 
Hello @perfect-touch

Are you running Update 8 or Update 9? The template for sip calls is designed for Update 8 and will be updated for Update9.
If you want to use it in Update 9 then add the WhatsApp messaging trunk from Add Messaging --> Add WhatsApp and then Add the template for SIP Calls but rename it to something else.
1781254157108.png

The way we import templates has changed in Update 9 so the template names are clashing causing issues. We will rename it for Update 9 from our end but for now you can do it manually.

Try it and let me know.
 
Thank you @YiannisH_3CX

You are quite right - I had completely forgotten that I had applied the beta!

As I have got it working using two trunks - one for calls and one for messages, I think I'll leave well alone for now until update 9 is finalised - and the template updated :)
 
  • Like
Reactions: KyriacosS_3CX
You will still need 2 templates in Update9. The messaging one will not change, we will just make a correction to the SIP calls one. Glad to see you have this working.
 
Hello @perfect-touch

Are you running Update 8 or Update 9? The template for sip calls is designed for Update 8 and will be updated for Update9.
If you want to use it in Update 9 then add the WhatsApp messaging trunk from Add Messaging --> Add WhatsApp and then Add the template for SIP Calls but rename it to something else.
View attachment 51837

The way we import templates has changed in Update 9 so the template names are clashing causing issues. We will rename it for Update 9 from our end but for now you can do it manually.

Try it and let me know.
Has this been updated for U9? I'm following the setup guide and on step 5 for creating the trunk, it points us to download the trunk here https://downloads-global.3cx.com/downloads/misc/whatsapp/whatsapp.pv.xml, but we get 404 error, so wondering if the link needs updating to where the new file is
 
Thanks Yiannis!
 

Members Online Now

No members online now.

Forum statistics

Threads
111,831
Messages
589,277
Members
164,660
Latest member
RJenkinsROCK