title: process of connecting RTP with SIP via SDP & land lines
body: <p>I have a problem with starting a media session and to combine it with my SIP client. I've designed a recursive SIP client that reuse the same request template to send the next requests to server, according to the acceptable sequences noted in the RFC's, and examples that I read. as far as I could tell the SIP part is working fine registers to server invites, and authenticates. I didn't complete any calls to clients yet because of the content header needs to be filled up (which I didn't yet so I get a 503 from the server which is OK I guess).</p>
  
  <p>for a long time I didn't know where to start with the media session, and slowly learned how to use the JMF and I've constructed an object that handles RTP transmitting, now I'm standing at the cross road, on the one hand I have my SIP signaling but it needs the SDP content header to complete the invite, and on the other I have the RTP which is knows how to p2p.</p>
  
  <p>For me to complete my design I require your help with the following questions:</p>
  
  <ol>
  <li><p>Is there <strong>an easy</strong>//<strong>a simple</strong>//<strong>an implemented</strong> way to convert the Audio/Video format from the JMF into SDP media headers? or even a <em>generator</em> that I would input all the parameters for the content header, and it would generate a content header fast, or do I have to implement this myself?</p></li>
  <li><p>Once I've finished constructing the SDK and the SIP is up and running and I get an OK response from the server (after ringing and all), how do I start the media session? do I connect p2p according to caller details I send in the SIP invite?</p></li>
  <li><p>If 2 is correct, then how does a connection to land lines would be? does land lines knows that once they send an OK back to server they listen/start RTP session on a specific port? </p></li>
  </ol>
  
  <p><strong>Or did I get everything wrong? :-/</strong></p>
  
  <p>I really appreciate any help I could I get, I looked every where for answers but they are not clear, they ignore question 2 as if it was an obvious thing, but for me it just isn't.</p>
  
  <p>Thank in advance,
  Adam Zehavi. </p>
  
  <p><strong>Added:</strong></p>
  
  <p>First thank you for you response and the time you take to help me.</p>
  
  <p>I'll go back to question 2:</p>
  
  <blockquote>
    <p>once you get an Ok response you will know the IP socket(<strong>you mean the ADDRESS:PORT correct?</strong>) that the SIP user agent server (UAS) is listening on and the codecs it accepts and can start sending your RTP.</p>
  </blockquote>
  
  <p>Ok that I understand, I wanted to know another thing, during this conversation time that I send RTP packet to the UAS, the UAS uses as a bridge between both UAC's.</p>
  
  <p>Now... could I instantiate the conversation using SIP, and then send the clients information from one to the other and establish P2P between two computer, without any middleman(UAS), and then dispose of the SIP session?</p>
  
  <p>I hope I explained my self better now...</p>
  
  <p>Thanks,
  Adam.</p>