Can you please post the cli output. Are you aware of the fact that the the MESSAGE(from) doesn’t has always the same format, it depends on the user agent. There is f.i. a difference between Zoiper and Grand Stream Wave.
exten => shams,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},%d%m%Y-%H:%M:%S)}]
Should be
exten => shams,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},%d%m%Y-%H:%M:%S)}] ) ; the closing “)” is missing. I think =" should be =$