title: Asterisk RTP data to Node.JS app
body: <p>I've successfully set up Asterisk on my server using the res_pjsip Hello World configuration from their wiki, and I want to be able to forward the RTP data to a Node.JS app, which can interpret RTP. I've heard about <code>directmedia</code> and <code>directrtpsetup</code> (see <a href="https://stackoverflow.com/questions/35497913/direct-media-and-direct-rtp-setup-in-asteisk#35516620">this stackoverflow</a>) but I'm not sure if that's what I want. So my question is this:</p>
  
  <p>Should I use <code>directmedia</code> / <code>directrtpsetup</code> to send voice data to my Node.JS app, or should I use some sort of Asterisk functionality to forward RTP packets? If the latter, how can Asterisk forward just the voice data?</p>
  
  <p>I can clarify if needed, but hopefully this is more specific than my last questions. Thanks!</p>
  
  <p>UPDATE: Having poked around Asterisk docs and messing with Wireshark, I think I have two options.</p>
  
  <ol>
  <li>Figure out if there's a channel driver for Asterisk that just sends RTP, without any signaling, or</li>
  <li>Capture the RTP stream with Wireshark or something and send the packets to the Node.JS app, and inject the return packets into the RTP stream.</li>
  </ol>