한국어

소프트스위치

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


https://voipmagazine.wordpress.com/2014/12/05/strict-and-loose-routing-of-sip-sequential-requests/


http://www.opensips.org/html/docs/modules/1.11.x/rr.html#loose-route-id


sequential-requests-routing1.png


1.5.1.  loose_route()

The function performs routing of SIP requests which contain a route set. The name is a little bit confusing, as this function also routes requests which are in the strict router format.

This function is usually used to route in-dialog requests (like ACK, BYE, reINVITE). Nevertheless also out-of-dialog requests can have a pre-loaded route set and my be routed with loose_route. It also takes care of translating between strict-routers and loose-router.

The loose_route() function analyzes the Route headers in the requests. If there is no Route header, the function returns FALSE and routing should be done exclusivly via RURI. If a Route header is found, the function returns TRUE and behaves as described in section 16.12 of RFC 3261. The only exception is for requests with preload Route headers (intial requests, carrying a Route header): if there is only one Route header indicating the local proxy, then the Route header is removed and the function returns FALSE.

If there is a Route header but other parsing errors occur ( like parsing the TO header to get the TAG ), the function also returns FALSE.

Make sure your loose_routing function can't be used by attackers to bypass proxy authorization.

The loose_routing topic is very complex. See the RFC3261 for more details (grep for route set is a good starting point in this comprehensive RFC).

This function can be used from REQUEST_ROUTE.

Example 1.6. loose_route usage

...
loose_route();
...





Strict Routing of SIP Sequential Requests

Sequential requests within a dialog (like ACK, BYE, reINVITE) must take the path determined by record-routing and represented by Route set. In other words strict routing exactly follows the path represented by the Route set. Each strict router on the routing path, will route the SIP message as following: Rewrite the Request-URI with the topmost Route header field value and forward the message to the new Request URI. The Request-URI always contains the URI of the next hop. The next hop can be another SIP router or destination user agent. Strict Routing is legacy approach. 

Loose Routing of SIP Sequential Requests

Sequential requests within a dialog should take the path determined by record-routing and represented by Route set. Loose routing of the sequential requests leaves the Request-URI and does not change it.

  • The sequential request has “To-tag” (i.e. belongs to a dialog) whereas the initial request does not have “To-tag” (does not belong to any dialog). The initial request (Method: INVITE, or SUBSCRIBE) creates the dialog.
  • The Request-URI of the sequential request contains the URI of the destination user agent (username@FQDN/IP) whereas the initial request has AOR (username@proxyDomain).
  • Taking a simple case where all routers on the routing path are loose routers and the user agents support loose routing (i.e. The user agent will not insert its URI (user@FQDN) in a Record-Route). According to this, we can say:

 The Request-URI of the sequential request will not be changed by any proxy at all because the one who is responsible for the resource associated with this Request-URI is the destination user agent. Whereas the Request-URI of the initial request will be changed once by the proxy which is responsible for the domain in the Request-URI.

 The last Route header field value will be for the last proxy in the routing path.

Upon this, the routing procedure will look like following:

sequential-requests-routing1.png?w=637&h=546

The Pre-loaded Route header field values (Route Set in an initial SIP Request) should not be allowed for security reasons.

Note: Transition from strict routing to loose routing would break the compatibility with the older user agents. Avoiding this problem adds lot of overhead and causes problems.

Routing Path (Route Set) in SIP Message

Assume a set of loose proxies {P1 -> P2 -> P3}.

The Route set which will be included in the SIP sequential requests , will look like this:

Route: <sip:p1.domain.com;lr>,<sip:p2.domain.com;lr>,<sip:p3.domain.com;lr>

lr parameter is added to indicate that the router is a loose router. If the SIP router is strict, then the URI will not have the lr parameter.

In the strict routing,the Request-URI is overwritten so we keep the destination user agent (the contact address) in an additional Route header field value.

OpenSIPS Route Processing

In OpenSIPS, I would like to mention two important functions in “rr” module:

  • The function loose_route() which used in routing SIP requests that contain Route Set. For example to route the sequential requests we call this function as following:

if (has_totag()){

loose_route()

 # route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(relay);

}

If Route set is not empty the loose_route() returns TRUE and the destination uri ($du) is set to the first Route header field value.

  • The function record_route() which used for building the routing path by adding Record-Route header field value upon passing each proxy in a way the initial request follows to reach the destination user agent.



List of Articles
번호 제목 글쓴이 조회 수 추천 수sort 날짜
82 OpenSIPS , default script , Types of Routs , Routing in SIP, Video lecture admin 41544   2014-08-13
 
81 Configuracion de Kamailio 3.3 con NAT Traversal y XCAP. admin 37470   2014-08-12
 
80 OpenSIPS/OpenSER-a versatile SIP Server cfg admin 38476   2014-08-11
 
79 Kamailio Nat Traversal using RTPProxy admin 37427   2014-08-11
 
78 MediaProxy Installation Guide admin 40099   2014-08-10
 
77 RTPProxy 1.2.x Installation & Integration with OpenSIPS 1.5x admin 41991   2014-08-10
 
76 Opensips Installation, How to. Good guide wiki page admin 37300   2014-08-10
 
75 [OpenSIPS-Users] Opensips 1.10 NAT radius aaa admin 37432   2014-08-23
 
74 OpenSIPS Consultancy Pricing module install Server 판매 또는 설치및 컨설팅 가이드 admin 42194   2014-08-23
 
73 ICE: The ultimate way of beating NAT in SIP admin 65999   2014-08-23
 
72 MediaProxy wiki page install configuration admin 43788   2014-08-11
 
71 Under RHEL6.5 install OpenSIPS 1.11.1 tls admin 39372   2014-08-12
 
70 오픈소스 (사내)메신저 서버 구축, 오픈 파이어(openfire) 설치방법과 세팅 admin 103970   2014-08-11
 
69 OpenSIPS Installation Notes admin 48265   2014-08-09
 
68 Installation and configuration process record opensips 1.9.1 admin 96955   2014-08-09
 
67 opensips 1.11.2 install Good Giide admin 67438   2014-08-09
 
66 fusionPBX install debian wheezy admin 39042   2014-08-09
 
65 opensips 1.11.2 install guide good 인스톨 가이드 admin 45214   2014-08-09
 
64 SigIMS IMS Platform admin 39577   2014-05-24
 
63 2013 2012년 분야별 최고의 오픈소스 소프트웨어 124선 admin 65524   2014-04-05
 
62 Video conference server OpenMCU-ru - Introduction admin 56049   2014-04-01
 
61 SIPSorcery admin 45332   2014-03-18
 
60 telepresence: Open Source SIP Telepresence/MCU admin 185365   2014-03-12
 
59 SIP PBX - OpenSIPS and Asterisk configuration admin 166109   2014-03-12
 
58 Conference Support in Kamailio (OpenSER) admin 88327   2014-03-12
 
57 OpenSIPS configuration for 2 or more FreeSWITCH installs admin 76565   2014-03-12
 
56 The Impact of TLS on SIP Server Performance file admin 43765   2014-03-12
 
55 book-opensips-101 / content / 3.2. SIP TLS Secure Calling.mediawiki admin 44310   2014-03-12
 
54 Where to check OpenSIPS does not start? admin 44565   2014-03-09
 
53 Ekiga (formely known as GnomeMeeting) is an open source SoftPhone admin 44140   2014-03-12