[Live-devel] Developing VoIP Application

Sebastian Ley sebastian.ley at mmweg.rwth-aachen.de
Sat Feb 5 23:19:33 PST 2005


Hello,

I am developing a voice oder IP application based on SIP. While the SIP part 
was pretty easy so far, I am having trouble with the negotiated RTP sessions. 
I want to use livemedia for that part as it seem to offer most of the things 
I need.

I can already get an SDP Message from a caller which I can easily feed to 
livemedia, following the playCommon example application. However that does 
not work as expected, and I fail to understand whats wrong. If the caller for 
instance sends this SDP message (kphone):

v=0
o=username 0 0 IN IP4 134.130.118.31
s=The Funky Flow
c=IN IP4 134.130.118.31
t=0 0
m=audio 32772 RTP/AVP 3 97 0
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000

and I use the code grabbed from playCommon...

mediaSessionIncoming = MediaSession::createNew(*env, SDPMessage.latin1());
MediaSubsessionIterator iter(*mediaSessionIncoming);
MediaSubsession* subsession;
while ((subsession = iter.next()) != 0L) 
{
  if (!strcmp(subsession->mediumName(), "audio") == 0)
    continue;
  subsession->sessionId = "foo";
  subsession->initiate(-1);
  int rtpSocketNum = subsession->rtpSource()->RTPgs()->socketNum();
  int receiveBufferSize = increaseReceiveBufferTo(*env, rtpSocketNum, 
100000 );
}
qtOut = QuickTimeFileSink::createNew(*env, *mediaSessionIncoming, 
                                     "/home/sl/out",
                                     20000,
                                     240, 180,
                                     15,
                                     false,
                                     false,
                                     false,
                                     false);
qtOut->startPlaying(SIPMediaHandler::terminateIncomingSessionWrapper, this);
env->taskScheduler().doEventLoop();

...tcpdump keeps telling me, that the rtp client wants to access the stream on 
port 32773:

22:57:22.201194 IP coyote.mmweg.32773 > tester.mmweg.32773: UDP, length: 28
22:57:22.201488 IP tester.mmweg > coyote.mmweg: icmp 64: tester.mmweg udp port 
32773 unreachable

Why does it not use 32772 as specified in the SDP Message?

Another question:
I assume right that livemedia does not encoding and decoding of audio and 
video data, right? I need an additional layer which e.g. GSM encodes my 
microphone stream, which can then be fed to GSMAudioRTPSink? What is with 
decoding in that case, there is no GSM Source in livemedia? What is with 
other codecs like ilbc or g.711?

Thanks in advance and regards,
Sebastian

-- 
PGP-Key: http://www.mmweg.rwth-aachen.de/~sebastian.ley/public.key
Fingerprint: A46A 753F AEDC 2C01 BE6E  F6DB 97E0 3309 9FD6 E3E6



More information about the live-devel mailing list