traccar-sms-gateway icon indicating copy to clipboard operation
traccar-sms-gateway copied to clipboard

MMS Support

Open benjamin-kirkbride opened this issue 10 months ago • 10 comments

Is there any way to send an MMS?

benjamin-kirkbride avatar Sep 19 '23 02:09 benjamin-kirkbride

@tananaev I have enabled the "send long messages as MMS" in the app, but they do not seem to be sent, and if I get over 160 it is not sent, not even split:

https://github.com/traccar/traccar-sms-gateway/pull/10

This seems to fix this, but apparently not happening for me at least.

gregjotau avatar Nov 03 '23 16:11 gregjotau

Are you talking about API calls or messages you send from the app itself?

tananaev avatar Nov 03 '23 17:11 tananaev

Are you talking about API calls or messages you send from the app itself?

API calls

gregjotau avatar Nov 03 '23 17:11 gregjotau

API calls are different. App settings are only applied to what you send from the app itself.

tananaev avatar Nov 03 '23 17:11 tananaev

API calls are different. App settings are only applied to what you send from the app itself.

OK, is there another parameter or payload I can use to make SMS work with the API?

Ref. https://www.traccar.org/http-sms-api/ has no docs on it. Sorry for being lazy not checking the source code :p

gregjotau avatar Nov 03 '23 17:11 gregjotau

I think I might have found the issue, will test later and get back to this thread if I solve it :)

gregjotau avatar Nov 03 '23 17:11 gregjotau

There's no configuration parameter for it currently.

tananaev avatar Nov 03 '23 18:11 tananaev

There's no configuration parameter for it currently.

OK, so it is expected not to work? - I tested manually in the app and it works to send MMS, but it fails with the API 🥲

gregjotau avatar Nov 04 '23 08:11 gregjotau

I might make a PR if it does not work, is that something you want @tananaev?

Have to use:

https://github.com/traccar/traccar-sms-gateway/blob/9a860e3938d8a6c518c49300ea598668edfd6553/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/MessagingUtils.kt#L136C19-L136C19

In the API code somewhere, the GateWayService:

https://github.com/traccar/traccar-sms-gateway/blob/9a860e3938d8a6c518c49300ea598668edfd6553/app/src/traccar/kotlin/org/traccar/gateway/GatewayService.kt#L76

gregjotau avatar Nov 04 '23 08:11 gregjotau

Sure, feel free to send a PR.

tananaev avatar Nov 04 '23 12:11 tananaev