Do we need to use STUN server everytime when we want to send a media message to other device or just use it in the first time?
Because after we send first message, we've known our public IP address.
I mean if we just need STUN server for the first time (to get Public Ip Address) so we don't care anything if STUN server down during we transfer the message.
I guess you mean WebRTC connection is established when you say "sending first message", if that's the case then no, STUN server is needed only when you are generating ICE candidates, it provides the public IP of your peer, and it not involved in text/media communication between peers once the connection is established.