Browsers (at least modern browsers) in which WebRTC apps execute require, in order to allow sharing audio and video devices, connections with servers to be done in a secure way. In web, you could use of WSS. Asterisk and Kamailio support WSS (WebSockets Secure) as transport for SIP.
It is possible (I have done it) to configure chan_pjsip in Asterisk to use WSS as transport (chan_sip also can be configured in that way, but I have not yet experience in WSS with chan_sip). Kamailio has the WebSocket module that also allows it to manage WSS SIP connections. I have used a fork of JsSIP (SIP.js), but it is completely arguable and you may have your own selection criteria.
Thus, you can connect
Web app WebRTC -> WSS -> Asterisk
or
Web app WebRTC -> WSS -> Kamailio -> UDP -> Asterisk
or, of course, whatever architecture you feel comfortable with. The only thing to have into account is that connections between browser and SIP Proxy are to be done in a secure way (you could use also DTLS-SRTP because Asterisk and Kamailio support it and both are natively supported by WebRTC, but, once again, I have not tested it myself).