I’m trying to make my asteirsk server webrtc friendly ,
i want to be able to connect to an endpoint using webrtc or using a sip phone .
so i add webrtc=true on endpoints .
i have a strange behavior or somehing i can not understand .
i have extenson 100 and extension 200
100 is connected over webrtc client
200 is connected using a regular sip phone .
when i initiate a call from 100 (webrtc connected ) to 200 (sip connected) i get (Incompatible SDP) .
but i can send calls from 200 to 100 and everything is fine .
these are my templates :
i think it’s a conflict in media encryption but how can i make one endpoint compatible with both media encryption (if this is really the issue ) as i have seen it in someplace before .
so what do you guys think ?
You can also transcode the media, but you will need a service like RTPengine for this.
When configured correctly, it will sit in between the endpoint and the server, but it will need to part of the signalling. It can be tricky to set up, if you are interested in this let me know.
i found it working in a paid solution built over asterisk , and i went through every configuration file that exists and done the same but getting Incompatible SDP .
i can register using webrtc from one endpoint and a sip phone from the other and call is arriving .
and when i switch endpoints i can also make calls and it’s arriving .
the only difference is that the call in the setup they are doing to going inside agi script .
is there any agi functions or any asterisk function able to switch the encryption or something like that ?
is there any agi functions or any asterisk function able to switch the encryption or something like that ?
Nope.
But the solution you appear to be reverse engineering is very simple. The basic concept is that you leave the Asterisk configuration as-is, as simple UDP transport with RTP media, and then either on the same box or another box, run a proxy. This proxy accept WebSocket Connections, and has code to relay SIP messages to Asterisk, but when it come to the media, it terminates the stream with something called RTPengine, and transcodes it to regular RTP and of course relays it to the asterisk server.
If you have regular desk phone, must connect directly to the Asterisk box, if you are using WebRTC, must connect to the proxy. It will be a largely transparent process. The desk phone and the Webphone can even be registered at the same time, should your config support multiple contacts.
Not at all , that is what confusing ,
both endpoins are registering on the same uri .
and there is no RTPengines handling the media, it’s totally inside asterisk
The agi function is kind of like using an external script like php or python or compiled code, rather than using the dialplan inside Asterisk. The set of functions is well defined in the documentation. The advantage would be that you can send commands to the channel - in much the same way that you can issue functions in the dial pan. It knows only about the attributes of the channel but does not directly access the media stream. If its executing compiled code, there is no way to know what it’s actually doing as a secondary action.
thank you for taking the time to clarify , i know what agi is , i have a cc built over remote agi.
what i mean is that he might be using an agi function or like may be dial the sip phone from the agi and merge the channels together , that way it’s not an RTP issue .
so there are two legs , one from the webrtc asterisk and agi park the call , another call is sent to the destination sip phone and on answer a channel merge is happening .
i don’t know
I would be speculating how their service works, but Asterisk is a B2BUA, so yes, it can be used to encrypted DTLS-SRTP media on one side and have regular unencrypted RTP media on the other side of a call.