Routing RTP to an external source over WebRTC

Hi! Greetings!!

Trying to figure out if its possible to route the RTP traffic to an external source using WebRTC ?
If its possible kindly point me to right sections or documents or suggest any alternative setup. TIA.

The use case is “a call manager → Asterisk → custom transcription engine”. Here the call is answered by Asterisk and the RTP should be routed out over WebRTC. Custom transcription engine accept RTP traffic only via WebRTC.

Thank you

I think you need to further define what WebRTC actually means within this question and what all is involved with talking to this custom transcription engine.

In general though, probably not, WebRTC Is only supported over SIP channels.

Could you give the RFC number for how to send RTP over TCP, as I’ve failed to find one, and the RTP packets are not self delimiting in a way that would allow you to just place them back go back.

I think you would have to create your own process to do whatever that RFC says and then use the ARI external media feature to create an RTP stream to send to it.

Normal WebRTC does not send the media over the web socket, but rather sends it as normal SRTP (encryption is mandatory). Separate encryption would be overkill if there were a way of sending it over the web socket.

As always, naming the service would be useful, as it would allow people to read its documentation.

I assume you meant destination, not source.

Hey thanks for replying. I am newbie here, so excuse me here.
Basically the ‘custom transcription engine’ is an inhouse NLP application that does speech analytics based on trained languages. This application currently has a Web socket exposed to receive RTP.

Exploring in Asterisk if its possible to transmit or route the RTP to the custom built application’s web socket

No, because RTP is UDP and web sockets are TCP, so it can’t be true that the application expects RTP to be routed to a web socket. You need to find out what the real interface requirement is.

I’m fairly sure that Asterisk only supports SIP over web sockets as a web sockets server, but might be wrong. (Asterisk is always able to be both SIP UAC and SIP UAS.) That is SIP over web sockets, not RTP. The SRTP is still over UDP.

1 Like

You are correct. It’s strictly as a server.

1 Like

NLP appears to be the generic term “natural language processing”, not the name of a software development system, here.

Thank you for your inputs.

I am exploring External Media: A new way to get media in and out of Asterisk ⋆ Asterisk

with GitHub - asterisk/asterisk-external-media

This repackages the media part of the RTP before sending it to Google, so the RTP does not go beyond the RTP module in this code. You will need to do the same with your server, but you need to find out what your server actually expects, or confirm that it expects the same format as Google does.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.