simontelephonics / smsconnector

SMS Connector module for FreePBX 16 and 17
https://simon.tel/open-source/
GNU General Public License v3.0
43 stars 16 forks source link

Flowroute MMS issue #56

Closed techwebhosting closed 2 months ago

techwebhosting commented 2 months ago

Hello,

I have installed the SMS Connector and have it properly working with the Flowroute SMS service. However I am unable to send\recieve MMS messages. Looking in the logs on the freepbx server it looks like I am getting an error Pass null to parameter #3 ($subject).

Please see export below, personal data scrubbed.

[2024-09-16 22:30:00] [freepbx.INFO]: Webhook (flowroute) in: {"data": {"id": "mdr2-96db940aobsecuredid5a23de", "type": "message", "attributes": {"amount_display": "$0.0095", "amount_nanodollars": 9500000, "body": null, "delivery_receipts": [], "direction": "inbound", "from": "fromnumber", "is_mms": true, "message_encoding": 0, "message_type": "longcode", "status": "", "timestamp": "2024-09-16T22:29:50.00Z", "to": "tonumber"}, "relationships": {"media": {"data": [{"id": "96db940aobsercuredid45a23de-1", "type": "media"}]}}}, "included": [{"id": "96db940aobsecuredid45a23de-1", "type": "media", "attributes": {"file_name": "image000000.jpg", "file_size": 85991, "mime_type": "image/jpeg", "url": "https://s3.us-west-2.amazonaws.com/flowroute-messaging-media/96dobsecured0453ba13d9ecf445a23de-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA2Dobsecuredid6K%2F20240916%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20240916T222959Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=fe47bobsecured597eac2b849e5c807702aa6091717999749a6d2eff321753"}, "links": {"self": "https://api.flowroute.com/v2.2/media/96db94obsecuredid23de-1"}}]} [] []   

[2024-09-16 22:30:00] [freepbx.INFO]: Exception Webhook (flowroute): Unable to get message: Unable to Insert Message into DBpreg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated [] []   

Looking for any guidance. Thanks!

billsimon commented 2 months ago

What version of smsconnector and version of FreePBX are you running?

I suspect this is a tightening of code that happened between php 7.4 (FreePBX 16) and php 8.2 (FreePBX 17) but will await your confirmation on the versions.

techwebhosting commented 2 months ago

I am running SMS Connector version 16.0.17, and FreePBX version 17.0.19.11. It is indeed using PHP Version 8.2.20.

Please let me know if you have any further questions.

Thanks!

billsimon commented 2 months ago

Fixed in 16.0.17.1

asasin114 commented 1 month ago

I seem to be running into this issue on the iPhone app using FreePBX 17.0.19.16 and SMS Connector 16.0.17.1 with PHP 8.2.24. Using Telnyx if that makes any difference.

Full error for me is: Unable to store media: Unable to insert Message into DB preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated

billsimon commented 1 month ago

@asasin114 opened #62 related to handling sending of messages (this ticket is for receiving).