Changes between Version 48 and Version 49 of FAQ


Ignore:
Timestamp:
Jun 30, 2008 9:25:28 AM (16 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v48 v49  
    582582 
    583583 
     584=== How can I use TCP transport to send/receive SIP messages? === #tcp 
     585 
     586Follow these steps to use SIP TCP transport: 
     587 1. First you must instantiate SIP TCP transport in your application. The TCP transport is enabled by default on pjsua so you can skip this test if you're using pjsua. 
     588 1. Then when sending outgoing requests, you need to tell PJSIP that the request is to be sent with TCP, by adding "{{{;transport=tcp}}}" parameter in the destination URI. This can be accomplished in two ways: 
     589   - the most convenient way is to add a route-set entry (with proxy or outbound proxy setting) with TCP transport (e.g. with "{{{--proxy sip:myproxy;lr;transport=tcp}}}" arguments in pjsua). This way all requests will be sent with TCP via the proxy, and we don't need to change the URI for the registrar and all buddies in the buddy list. 
     590   - if you don't want to configure route set entry, then you must add "{{{;transport=tcp}}}" parameter to all outgoing URIs (the registrar URI, the buddy URI, the target URI when making call, the target URI when sending MESSAGE, etc.). 
     591 
     592With PJSUA-LIB, when making or receiving calls with TCP, the local Contact header will automatically be adjusted to use the TCP transport. 
     593 
     594The client registration session also will keep the TCP connection active throughout the registration session, and server may send inbound requests using this TCP connection if it wants to.  
     595 
     596 
    584597=== I cannot login/REGISTER to my server. It complains about authentication error. === #authentication 
    585598 
     
    625638 
    626639=== With ICE enabled, INVITE packet can exceed MTU/1500 bytes. How can I reduce the message size? === #sip-msg-size 
     640 
     641If MTU is an issue, the best solution is to use TCP or TLS transport rather than UDP transport where MTU will not be a problem. The following information is provided as a guideline to reduce message size. 
    627642 
    628643Please see ticket #342 for info. Basically there are few settings to configure to make PJSIP sends smaller packet: 
     
    632647 1. Disable RTCP (advertisement) in SDP, by setting {{{PJMEDIA_ADVERTISE_RTCP}}} macro to 0 in {{{config_site.h}}}. When RTCP is disabled, no RTCP packets will be sent or received, and this will cause some RTCP TX statistics (including RTT report) to be unavailable. Other RTCP statistics such as RX statistics, as well as number of TX packets, will still be available since these values are generated locally. Disabling RTCP will reduce SIP message size by approximately 235 bytes for ICE with three candidates. 
    633648 1. Last resort, disable some unused network interfaces in the system to reduce the number of ICE candidates advertised in SDP. On Windows for example, it's quite common to have some Loopback network interface, and disabling it doesn't seem to cause (too much) harm. 
     649 1. In pjsua, you can use {{{--use-compact-form}}} option to reduce the message size. 
    634650 
    635651 
     
    811827 - On the SIP side, PJSIP supports Symmetric Response Routing ({{{rport}}}) and STUN. 
    812828 - On the media side, application can choose the normal UDP media transport (with STUN support) or the ICE media transport. 
     829 - The UDP media transport uses symmetric socket, and by default it will switch transmission to the source address of the RTP/RTCP packet if these addresses are different than the destination address. Application may disable this feature if it doesn't want it. 
    813830 - For the media, the [http://www.pjsip.org/pjmedia/docs/html/group__PJMED__STRM.htm media stream] will periodically transmit RTP packets during silence period, to keep NAT binding open. Also it will disable VAD for the first few hundred milliseconds after it is started, to ''hole-punch'' any NATs in between the endpoints. Please see [http://www.pjsip.org/pjmedia/docs/html/group__PJMEDIA__CONFIG.htm#g691ce80f0b4f2844cb9270af4665cdc8 PJMEDIA_CODEC_MAX_SILENCE_PERIOD] and [http://www.pjsip.org/pjmedia/docs/html/group__PJMEDIA__CONFIG.htm#gced8a0865fc8087f217067202b575f7f PJMEDIA_STREAM_VAD_SUSPEND_MSEC] settings on how to fine tune this behavior. 
    814831 - With ICE media transport, the transport periodically sends STUN keep-alive requests to keep NAT binding open, throughout the life of the application. The transport will also update its mapped address should the binding has changed. Note that this feature is not available for UDP media transport. 
     
    817834=== Which STUN-bis draft does PJNATH support? === #stunbis-std 
    818835 
    819 At the time of this writing, {{{draft-ietf-behave-rfc3489bis-10}}}. But since STUN-bis (rfc3489bis) is updated often, please look at [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
     836We support [http://tools.ietf.org/html/draft-ietf-behave-rfc3489bis-15 draft-ietf-behave-rfc3489bis-15]. But since STUN-bis (rfc3489bis) is updated often, please look at [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
    820837 
    821838=== Which ICE draft does PJNATH support? === #ice-std 
    822839 
    823 At the time of this writing, {{{draft-ietf-mmusic-ice-18}}}. But since ICE is updated often, please look at [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
     840We support [http://tools.ietf.org/html/draft-ietf-mmusic-ice-19 draft-ietf-mmusic-ice-19]. But since ICE is updated often, please look at [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
    824841 
    825842=== Which TURN draft does PJNATH support? === #ice-std 
    826843 
    827 At the time of this writing, {{{draft-ietf-behave-turn-03}}}. But since TURN is updated often, please look at [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
     844At the time of this writing, http://tools.ietf.org/html/draft-ietf-behave-turn-07 draft-ietf-behave-turn-07]. But since TURN is updated often, please look at [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH documentation] for the most up to date information. 
    828845 
    829846=== What STUN-bis features does PJNATH support? === #stun-features 
    830847 
    831 Currently everything in RFC3489bis, including {{{MESSAGE-INTEGRITY}}} and {{{FINGERPRINT}}}. However PJNATH currently does not support STUN over TCP. 
    832  
    833 === Is there any simple STUN/TURN client which I can use to test my STUN/TURN implementation? === #simple-stun-client 
    834  
    835 Yes. There is a simple STUN/TURN client implementation in {{{pjnath/src/pjstun-client}}} directory, which will be built by default by the {{{make}}} command. If you use Visual Studio, you can build this application from within {{{pjnath/build/pjnath.dsw}}} workspace. 
     848Currently everything in RFC3489bis, including {{{MESSAGE-INTEGRITY}}} and {{{FINGERPRINT}}}. STUN over TCP is also supported, and it is used by the TURN client. 
     849 
     850=== Is there any simple TURN client which I can use to test my TURN implementation? === #simple-turn-client 
     851 
     852Yes. There is a simple TURN client implementation in {{{pjnath/src/pjturn-client}}} directory, which will be built by default by the {{{make}}} command. If you use Visual Studio, you can build this application from within {{{pjnath/build/pjnath.dsw}}} workspace. 
    836853 
    837854This is a simple command line program to perform as STUN or TURN client. It supports STUN, TURN, short-term or long term credential, as well as FINGERPRINT mechanism. 
    838855 
    839 === Is there any simple STUN/TURN server in the samples? === #simple-stun-client 
    840  
    841 Yes. There is a simple STUN/TURN '''server''' implementation in {{{pjnath/src/pjstun-srv-test}}} directory, which will be built by default by the {{{make}}} command. If you use Visual Studio, you can build this application from within {{{pjnath/build/pjnath.dsw}}} workspace. 
    842  
    843 This is a simple command line program to perform as STUN or TURN server. It supports STUN, TURN, short-term or long term credential, as well as FINGERPRINT mechanism. 
     856=== Is there any simple TURN server in the samples? === #simple-turn-client 
     857 
     858Yes. There is a simple TURN '''server''' implementation in {{{pjnath/src/pjturn-srv}}} directory, which will be built by default by the {{{make}}} command. If you use Visual Studio, you can build this application from within {{{pjnath/build/pjnath.dsw}}} workspace. 
     859 
     860This is a simple command line program to perform as STUN or TURN server. It supports STUN, TURN, and long term credential, as well as FINGERPRINT mechanism. 
    844861 
    845862