Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For 1, I don't know anything about JMF so can't answer directly but SDP is not actually a complicated standard, unlike SIP which is, so constructing an SDP packet shouldn't be that difficult. The minimum you need to build an SDP packet are the codecs you're offering and the IP socket you're accepting the RTP on.</p> <p>For 2, once you get an Ok response you will know the IP socket that the SIP user agent server (UAS) is listening on and the codecs it accepts and can start sending your RTP. At the same time you should start receiving RTP from the UAS as it will start sending at the same time it sends the Ok. Of course you will also need to send a SIP ACK request in response to the Ok response otherwise some UAS's will assume the response did not get through and after some time will terminate the call. If you're just starting to write your own SIP stack there's still a long way to go!</p> <p>For 3, yes, although by landlines you really mean a SIP-to-PSTN gateway (the PSTN side will be something like ISDN, SSL or analogue). The SIP side of the PSTN gateway is the same as any other SIP UAS and once it accepts an INVITE request it will start sending RTP tp the socket specified in the request and likewise will start listening for RTP on the socket it has placed in the Ok response that will be sent back to your SIP client.</p> <p><strong>Update</strong></p> <blockquote> <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> </blockquote> <p>The answer is yes but you are confusing the terminology a little bit. An established SIP call is known as a session and is always between a User Agent Client (UAC) and a User Agent Server (UAS). Every SIP agent is supposed to be capable of acting in either role as a UAC or UAS and the main difference between the two roles is that a UAC intiates the call and the UAS answers it. A particular SIP device will be in a UAC role for calls it initiates and a UAS role for calls it answers.</p> <p>Why is this UAC and UAS description relevant? Because all SIP communications are peer-to-peer. SIP is NOT a client/server protocol. It's a peer-to-peer protocol. Now it does get confusing because you'll have VoIP providers that operate SIP Proxy <strong>Servers</strong> or SIP PSTN <strong>Gateways</strong> which make it seem as if SIP does operate on a client-server model but it doesn't.</p> <p>So I think the question you are actually wanting to ask is can a SIP call between a UAC-to-B2BUA-to-UAS (which is actually two separate calls or SIP sessions: UAC-to-UAS/UAC-to-UAS) have the media bypass the B2BUA and instead travel directly between the UAC and UAS at either end. The answer to that question is yes. A B2BUA like Asterisk has a SIP configuration option called canreinvite which if set to yes will result in it sending re-INVITEs to either end of the call once it's answered to get the RTP to flow directly between the call endpoints rather than being bridged through itself, of course if codec transcoding, recording or an equivalent feature is required it will not attempt the re-INVITE. A different approach is a traditional SIP Proxy approach such as used by OpenSER where it's not designed to bridge media at all and all calls through it will always result in the RTP being directly between the SIP devices at either end of the call. The way that works is OpenSER will simply forward the request it receives from the UAC through to the UAS and apart from adding and/or modifying an extra SIP header or two the INVITE request is exactly as if the UAC had sent it directly to the UAS.</p> <p>All clear as mud? Here's some links to further reading that will help you.</p> <p><a href="http://www.tech-invite.com/" rel="nofollow noreferrer">Tech-invite</a> - very good examples of SIP scenarios,</p> <p><a href="http://tools.ietf.org/html/rfc5359" rel="nofollow noreferrer">RFC5359 Session Initiation Protocol Service Examples</a> - more examples,</p> <p><a href="http://forum.sipsorcery.com/index.php" rel="nofollow noreferrer">SIP Sorcery forums</a> - forum site for a public service I run which is frequented by a few people knowledgeable on SIP matters if you should have more in depth SIP questions. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. CO>1 I've already started to build my own JMF => SDP converter. >2 so the RTP session is done p2p with the pbx server? something in this form: (uac1 <==> uas0 && uas0 <==> phoneX||uac2) >3 again if 2 is correct then I don't really care how the second part of the expression is handled as long as it does. >4 is it possible to connect to Computer UAC's via p2p after SIP protocol is done... in other words send both user informations to the other via sip, and initiate a p2p connection in case both ends are same program that would know the other side would supply its address?
      singulars
    2. COThere are two common approaches for RTP, in the case of a B2BUA such as Asterisk there are two dialogues and 4 RTP streams UAC<->Asterisk<->UAS. In the case of a SIP Proxy such as OpenSER the RTP will be directly between the end points UAC<->UAS. Both are feasible with the biggest shortcoming of the second approach being if both UA's are behind a NAT.
      singulars
    3. COFirst thank you again for your answer, everything I learned was from the sites you mentioned. After reading your answer and understanding some, I think my best solution for the time would be some trial and error method of learning... I have my SIP client fully designed, and the JMF media session Object working properly.. I guess I would just experiment a bit and see the results... perhaps you could help me with the last question I have that prevents me from testing yet, the SDP header media format: http://stackoverflow.com/questions/2930288/sdp-media-field-format
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload