On 08/08/2019 16:23, Sean Devoy wrote:
How can to stop the default handling of an inbound SMS message?
Hi Sean, after some long time trying to do that, then giving up, and coming back to it, various times, I finally went for the source code with a comb and it seems I finally found a way to do it: Please see. https://github.com/Rhizomatica/rccn/commit/db08b977711da1e09e3326db1723f6774... Hmm, when making that commit, I referenced: https://docs.freeswitch.org/switch__loadable__module_8c.html#a6389148319476a... Which is where I found in this comment: /* The event was handled by an extension in the chatplan, * so the event will be duplicated, modified and queued again, * but it won't be processed by the chatplan again. * So this copy of the event can be destroyed by the caller. */ This is the condition for skipping the default handling: if (switch_true <https://docs.freeswitch.org/switch__utils_8h.html#a890e4243bd6e31e6c68a83832da023a7>(switch_event_get_header <https://docs.freeswitch.org/group__events.html#ga5c3108ab2e8d73d8ef8e6c41224059aa>(message_event, "final_delivery"))) { do_skip = 1; } so you need the final_delivery event header. Not sure how you add that in an XML dialplan, or in your implementation. Maybe the python in github can give you some clues. and no, stop and all that does not work - It only prevents the chatplan from execing applications. (IIUC) Cheers Keith.