한국어

소프트스위치

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

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


1.4.3.  lookup(domain [, flags [, aor]])

The functions extracts username from Request-URI and tries to find all contacts for the username in usrloc. If there are no such contacts, -1 will be returned. If there are such contacts, Request-URI will be overwritten with the contact that has the highest q value and optionally the rest will be appended to the message (depending on append_branches parameter value).

If the method_filtering option is enabled, the lookup function will return only the contacts that support the method of the processed request.

Meaning of the parameters is as follows:

  • domain - Name of table that should be used for the lookup.

  • flags(optional)

    • 'b' (no Branches) - this flag controls how lookup function processes multiple contacts. If there are multiple contacts for the given username in usrloc and this flag is not set, Request-URI will be overwritten with the highest-q rated contact and the rest will be appended to sip_msg structure and can be later used by tm for forking. If the flag is set, only Request-URI will be overwritten with the highest-q rated contact and the rest will be left unprocessed.

    • 'r' (bRanch lookup) - this flag enables searching through existing branches for aor's and expanding them to contacts. For example, you have got AOR A in your ruri but you also want to forward your calls to AOR B. In order to do this, you must put AOR B in a branch, and if this flag enabled, the function will also expand AOR B to contacts, which will be put back into the branches. The AOR's that were in branches before the function call shall be removed.

      WARNING: if you want this flag activated, the 'b' (no Branches) flag must not be set, because by setting that flag you won't allow lookup to write in a branch.

    • 'm' (Method filtering) - this flag tells if the contact filtering based on supported methods should be performed during lookup.

    • 'u' (User-Agent filtering) - this flag enables regexp filtering by user-agent. It's useful with enabled append_branches parameter. Regexp must follow the 'u' flag and must use format like 'u/regexp/'.

    • 'i' (Case insensitive search) - this flag enables case insensitive filtering for the 'u' flag.

    • 'e' (Use extended regexp) - this flag enables using of extended regexp format for the 'u' flag.

  • AOR (optional)- AOR to lookup for; if missing, the RURI is used as AOR; This must be a variable.

Return codes:

  • 1 - contacts found and returned.

    -1 - no contact found.

    -2 - contacts found, but method not supported.

    -3 - internal error during processing.

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.

Example 1.19. lookup usage

...
lookup("location");  # simple lookup
   #or
lookup("location","m"); # lookup with method filtering
   #or
lookup("location","r"); #lookup with aor branch search;
						#all contacts except the first one shall be put
						#in the branches
   #or
lookup("location","u/phone/i"); # lookup with user-agent filtering
   #or
lookup("location","","$var(aor)"); # simple lookup with AOR from PV
switch ($retcode) {
    case -1:
    case -3:
        sl_send_reply("404", "Not Found");
        exit;
    case -2:
        sl_send_reply("405", "Not Found");
        exit;
};
...
조회 수 :
94110
등록일 :
2017.12.09
16:33:33 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3312374&act=trackback&key=1b8
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3312374
List of Articles
번호 제목 글쓴이 조회 수sort 추천 수 날짜
82 OpenSIPS , default script , Types of Routs , Routing in SIP, Video lecture admin 41596   2014-08-13
 
81 A lightweight RPC library based on XML and HTTP admin 41090   2014-08-18
 
80 Real-time Charging System for Telecom & ISP environments admin 41069   2014-08-23
 
79 MediaProxy 2.3.x & OpenSIPS 1.5.x Integration admin 41009   2014-08-24
 
78 A Survey of Open Source Products for Building a SIP Communication Platform admin 40947   2014-10-18
 
77 rtpproxy Module admin 40384   2014-03-06
 
76 [Sipdroid] SIP data collection study tour admin 40343   2014-08-23
 
75 UAC Registrant Module admin 40283   2014-09-28
 
74 Opensips install debian admin 40206   2014-03-03
 
73 MediaProxy Installation Guide admin 40159   2014-08-10
 
72 OpenSER_from_an_asterisk_POV file admin 39985   2013-04-06
 
71 CANCEL MESSAGE not handled correctly admin 39917   2014-08-23
 
70 OpenSIPS Kick Start‎: VIDEO admin 39842   2013-02-20
 
69 SigIMS IMS Platform admin 39761   2014-05-24
 
68 Under RHEL6.5 install OpenSIPS 1.11.1 tls admin 39442   2014-08-12
 
67 opensips-1.10.0_src.tar.gz experimental source code documentation admin 39364   2014-03-09
 
66 OPENSIPS EBOOK admin 39214   2014-08-21
 
65 A2Billing and OpenSIPS config admin 39169   2014-10-20
 
64 fusionPBX install debian wheezy admin 39076   2014-08-09
 
63 Multimedia Service Platform admin 39010   2014-03-06
 
62 opensips.cfg for Asterisk admin 38558   2014-10-20
 
61 OpenSIPS/OpenSER-a versatile SIP Server cfg admin 38517   2014-08-11
 
60 opensips Nat script with RTPPROXY - English Good perfect admin 38226   2014-08-15
 
59 opensips NAT Traversal Module admin 38201   2014-10-02
 
58 OPENSIP Training VIDEO admin 38141   2013-02-20
 
57 kamailio.cfg configuration Example admin 37931   2014-10-04
 
56 OpenSIPS as Homer Capture server admin 37689   2014-08-13
 
55 Configuracion de Kamailio 3.3 con NAT Traversal y XCAP. admin 37528   2014-08-12
 
54 [OpenSIPS-Users] Opensips 1.10 NAT radius aaa admin 37505   2014-08-23
 
53 Kamailio Nat Traversal using RTPProxy admin 37482   2014-08-11