I think it is still the case that you need custom configuration. That will, in part, be because very few providers support SIP MESSAGE, so any extension to trunk use, is likely to involve a protocol conversion.
Yes they will need a custom configuration but not because of the provider. The OP is trying to send messages between extensions. What is happening is due to the fact that there is nothing configured to handle the MESSAGE in the dialplan.
@ali1001 You need to define the context in which MESSAGEs will go to in your extensions under the Advanced settings. If you don’t the system uses the endpoints default context, which doesn’t handle these requests. On top of that you will need to create said context to handle the messages as you see fit.
Since there’s no proper handling of the incoming MESSAGE request, the system ends up just calling the destination because it’s treating it like a call.
The reference to the provider was speculation as to why the code isn’t included as standard, namely that it might give false expectations that it would work over the PSTN.
How it goes over the PSTN is between the carrier and the other carriers. No inter-carrier traffic is going to use SIP MESSAGE for this. How it goes between the carrier and the users is completely different. It is true that many carriers don’t support SIP MESSAGEs as they prefer using RESTful APIs to handle SMS/MMS delivery but some like VoIP.ms and others do support it between them and their users.
You’re also ignoring scenarios in which the phone sends a MESSAGE to the PBX and the PBX processes that MESSAGE but then uses AGI or System to send it over RESTful calls to the carrier. Or receiving RESTful calls and pushing them into the dialplan to send a MESSAGE to the endpoint.
Either way, a “trunk” or “extension” endpoint needs proper dialplan in either their primary context or they need to set message_context for a dialplan context that handles the MESSAGE requests.