한국어

소프트스위치

온누리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;
};
...
조회 수 :
93568
등록일 :
2017.12.09
16:33:33 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3312374&act=trackback&key=c14
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3312374
List of Articles
번호 제목 글쓴이 조회 수sort 추천 수 날짜
142 Kamailio :: A Quick Introduction admin 82815   2013-04-06
 
141 Opensips Installation, How to. admin 76799   2014-03-05
 
140 OpenSIPS configuration for 2 or more FreeSWITCH installs admin 75984   2014-03-12
 
139 오픈소스 (사내)메신저 서버 구축, 오픈 파이어(openfire) 설치방법과 세팅(리눅스 기준) admin 74426   2017-09-09
 
138 Opensips1.6 ebook detail configuration and SIP signal and NAT etc file admin 74217   2017-12-10
 
137 Installation and configuration process record opensips opensips-cp admin 70818   2014-08-13
 
136 OpenSIPS Control Panel (OCP) Installation Guide Good admin 68854   2014-08-13
 
135 opensips 1.11.2 install Good Giide admin 67328   2014-08-09
 
134 ICE: The ultimate way of beating NAT in SIP admin 65833   2014-08-23
 
133 Build-Depends debian 8.8 opensips 2.3 admin 65759   2017-09-04
 
132 2013 2012년 분야별 최고의 오픈소스 소프트웨어 124선 admin 64664   2014-04-05
 
131 Fail2Ban Freeswitch How to secure admin 62862   2017-09-12
 
130 rtpengine install and config admin 59797   2017-09-05
 
129 OfficeSIP Server is freeware VoIP, SIP server for Windows admin 55693   2013-09-11
 
128 100% CPU usage opensips admin 55643   2014-03-05
 
127 Video conference server OpenMCU-ru - Introduction admin 55520   2014-04-01
 
126 rtpengine config basic and opensips configuration and command admin 54738   2017-09-06
 
125 OpenH323 Gatekeeper - The GNU Gatekeeper admin 54589   2011-12-14
 
124 SIP to XMPP Gateway + SIP Presence Server opensips admin 53658   2017-09-13
 
123 Kamailio 3.3.x and Asterisk 10.7.0 Realtime Integration using Asterisk Database admin 53495   2013-04-06
 
122 Using the openSIPS Registrant Module admin 53281   2014-03-09
 
121 Many OPENSIPS Configuration Examples This will Help you admin 49779   2014-08-23
 
120 Problem with presence_xml module Opensips 1.9 admin 48926   2014-03-06
 
119 OpenSIPS routing logic admin 48600   2017-12-12
 
118 Using TLS in OpenSIPS v2.2.x configuration admin 48476   2017-09-04
 
117 OpenSIPS Installation Notes admin 48180   2014-08-09
 
116 Asterisk Installation Asterisk Realtime configuration admin 46891   2013-04-06
 
115 How to install OpenSIPS on CentOS debian module add xcap admin 46862   2014-03-06
 
114 the OpenSIPS Project OpenSIP admin 46611   2011-12-14
 
113 OpenSIPS command line tricks admin 46364   2017-09-13