I streamed audio.mp3 file by using gst-launch-1.0 to cisco ip phone.
gst-launch-1.0 -v filesrc location=~/Videos/audio.mp3 ! mad ! audioconvert ! audio/x-raw, channels=1 ! audioresample ! audio/x-raw, channels=1, rate=8000 ! alawenc ! rtppcmapay ! application/x-rtp, mtu=160, min-ptime=20000000 ! udpsink host=172.20.0.186 port=20500
cisco ip phone supports g711 codec.
I used WebRtcEndpoint and Rtpendpoint to stream from webbrowser to cisco ip phone and updated hello world app.
kurentoClient.create('MediaPipeline', function(error, pipeline) {
pipeline.create('WebRtcEndpoint', function(error, webRtc){
webRtc.processOffer(sdpOffer, function(error, sdpAnswer){
pipeline.create('RtpEndpoint', function(error, Rtp){
sdp_rtp = '';
sdp_rtp += 'v=0\n';
sdp_rtp += 'o=- 2 2 IN IP4 172.20.0.186\n';
sdp_rtp += 's=-\n';
sdp_rtp += 'c=IN IP4 172.20.0.186\n';
sdp_rtp += 't=0 0\n';
sdp_rtp += 'm=audio 20500 RTP 0 8 3 101\n';
sdp_rtp += 'b=AS:10\n';
sdp_rtp += 'a=rtpmap:0 pcmu/8000\n';
sdp_rtp += 'a=rtpmap:8 pcma/8000\n';
sdp_rtp += 'a=rtpmap:3 gsm/8000\n'
sdp_rtp += 'a=rtpmap:101 telephone-event/8000\n';
sdp_rtp += 'a=fmtp:101 0-16\n';
sdp_rtp += 'a=ptime:20\n';
sdp_rtp += 'a=recvonly\n';
Rtp.processOffer(sdp_rtp, function(error, sdpAnswer){
webRtc.connect(Rtp, function(error){
console.log("Loopback established...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
});
Rtp.connect(webRtc, function(error){
console.log("Loopback established2......");
});
});
});
});
});
but I failed.
Thank you.
ye.