[Freeswitch-users] issue with ilbc and ptime between a call between webrtc client and freeswitch

Caragea Silviu silviu.cpp at gmail.com
Mon Oct 3 13:40:19 MSD 2016


Hello,

I have a call coming from FS and going via sip to a webrtc compliant
client.
Works fine as time the codec is not ILBC. If codec is ILBC is failing
because
Webrtc consider the codec as being invalid because of the ptime line.

Inside their code:

bool IsILBCRateValid(int rate, int frame_size_samples) {
  if (((frame_size_samples == 240) || (frame_size_samples == 480)) &&
      (rate == 13300)) {
    return true;
  } else if (((frame_size_samples == 160) || (frame_size_samples == 320)) &&
      (rate == 15200)) {
    return true;
  } else {
    return false;
  }
}

This is failing because rate will be 13300 and frame_size_samples will be
160.

frame_size_samples = (8000 / 1000) * 20 which is 160.

How I can make fs to advertise correctly that the codec ILBC is 30 ms one
and not 20 ?

Here is the sdp that's generated:

v=0
o=FreeSWITCH 1475470534 1475470535 IN IP4 91.231.138.218
s=FreeSWITCH
c=IN IP4 91.XXX.XXX.XXX
t=0 0
a=msid-semantic: WMS 5K3pT3kGUXTisXNhdMYGtMP1VGBmzT0v
a=end-of-candidates
m=audio 16430 RTP/SAVPF 102 0 103 101 104
a=rtpmap:102 iLBC/8000
a=fmtp:102 mode=30
a=rtpmap:0 PCMU/8000
a=rtpmap:103 isac/16000
a=fmtp:103 ibitrate=32000;maxbitrate=53400
a=rtpmap:101 telephone-event/8000
a=rtpmap:104 telephone-event/16000
a=fingerprint:sha-256
B9:24:01:90:AD:E6:43:60:10:F9:CA:3A:85:86:26:91:A6:41:A8:77:3B:F0:39:20:3C:50:0F:A3:5E:1F:48:03
a=setup:actpass
a=rtcp-mux
a=rtcp:16430 IN IP4 91.xxx.xxxx.xxx
a=ssrc:4159978388 cname:tTLcMVJxIsF1gi8j
a=ssrc:4159978388 msid:5K3pT3kGUXTisXNhdMYGtMP1VGBmzT0v a0
a=ssrc:4159978388 mslabel:5K3pT3kGUXTisXNhdMYGtMP1VGBmzT0v
a=ssrc:4159978388 label:5K3pT3kGUXTisXNhdMYGtMP1VGBmzT0va0
a=ice-ufrag:VWQeyw6k2xxshnNB
a=ice-pwd:6oDJad6JwBACKzMvlsAKOwUH
a=candidate:8788212768 1 udp 659136 91.XXX.XXX.XXX16430 typ host generation
0
a=candidate:8788212768 2 udp 659136 91.XXX.XXX.XXX16430 typ host generation
0
a=silenceSupp:off - - - -
a=ptime:20

Silviu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161003/6a99caf3/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list