Closed Dagnabit99 closed 1 month ago
You seem to be receiving Flowroute webhooks in a different format than what the module expects. When I receive from flowroute, the log looks like this, and this is the JSON structure the module is expecting:
[2024-10-19 01:21:23] [freepbx.INFO]: Webhook (flowroute) in: {"data": {"attributes": {"amount_display": "$0.0070", "amount_nanodollars": "7000000", "body": "Greetings on Friday evening!", "direction": "inbound", "from": "1NXXNXXXXXX", "is_mms": false, "message_callback_url": "https://my-lab-server/smsconn/provider.php?provider=flowroute", "message_encoding": 0, "message_type": "longcode", "status": "delivered", "timestamp": "2024-10-19T01:21:21.980000Z", "to": "1NYYNYYYYYY"}, "type": "message", "id": "mdr2-4e5435f325d9431f9e64118b20895b08"}} [] []
[2024-10-19 01:21:23] [freepbx.INFO]: Webhook (flowroute): Return Code 202 [] []
I suspect you're on v2.0 of the API rather than v2.1. Check in Flowroute: Preferences -> API Control:
Ahh. That is likely it! Thank you. I’m still on v2.0 of the API because I have live scripts that are using that version on another server that I have not been able to upgrade yet. I’ll either have to upgrade them or create a new account that runs 2.1 or 2.2. Or hack your provider*.php script and make it 2.0 compatible. Thanks again. Cheers!
On Oct 18, 2024, at 7:29 PM, billsimon @.***> wrote:
You seem to be receiving Flowroute webhooks in a different format than what the module expects. When I receive from flowroute, the log looks like this, and this is the JSON structure the module is expecting:
[2024-10-19 01:21:23] [freepbx.INFO]: Webhook (flowroute) in: {"data": {"attributes": {"amount_display": "$0.0070", "amount_nanodollars": "7000000", "body": "Greetings on Friday evening!", "direction": "inbound", "from": "1NXXNXXXXXX", "is_mms": false, "message_callback_url": "https://my-lab-server/smsconn/provider.php?provider=flowroute", "message_encoding": 0, "message_type": "longcode", "status": "delivered", "timestamp": "2024-10-19T01:21:21.980000Z", "to": "1NYYNYYYYYY"}, "type": "message", "id": "mdr2-4e5435f325d9431f9e64118b20895b08"}} [] [] [2024-10-19 01:21:23] [freepbx.INFO]: Webhook (flowroute): Return Code 202 [] []
I suspect you're on v2.0 of the API rather than v2.1. Check in Flowroute: Preferences -> API Control:
image.png (view on web)https://github.com/user-attachments/assets/1f8ac29e-67f5-435c-82f5-0edec0352b9b
— Reply to this email directly, view it on GitHubhttps://github.com/simontelephonics/smsconnector/issues/59#issuecomment-2423429447, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BMHVMPBWQS4JRVGXCL7QQGLZ4GYWFAVCNFSM6AAAAABQGUMA2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTGQZDSNBUG4. You are receiving this because you authored the thread.Message ID: @.***>
You're welcome.
Having issues with incoming SMS from flowroute. They show up in the freepbx.log, but don't make it to the UCP or the database.
Using SMS Connector 16.0.17.1 FreePBX 17.0.19.17 PHP 8.2.24
From freepbx.log: Webhook (flowroute) in: {"body": "bla bla bla", "to": "18778X9XXXX", "from": "18015X2XXXX", "id": "mdr2-6f8ec400c40f460d8b10b96d2de2XXXX"} [] [] Webhook (flowroute): Return Code 202 [] []
So it shouldn't be a firewall issue or it wouldn't hit the log file.
Outbound SMS works beautifully.
Any thoughts?
Thanks!