Sends a CoAP message with custom transmission parameters. If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be `nullptr` pointers. If Message ID was not set in the header (equal to 0), this method will assign unique Message ID to the message.