한국어

소프트스위치

온누리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;
};
...
조회 수 :
94841
등록일 :
2017.12.09
16:33:33 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3312374&act=trackback&key=a62
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3312374
List of Articles
번호 제목 글쓴이 조회 수 추천 수sort 날짜
142 My new toy: Bluebox-ng admin 93443   2013-04-06
 
141 Using SIP Devices behind NAT OPensip Asterisk IPPhone SIP Telephony file admin 230508   2013-03-31
 
140 Opensips_1.9 install guide this is great I like this admin 110853   2014-03-04
 
139 Opensips install debian admin 40835   2014-03-03
 
138 A2Billing and OpenSIPS admin 44379   2014-03-04
 
137 100% CPU usage opensips admin 57192   2014-03-05
 
136 Opensips Installation, How to. admin 77842   2014-03-05
 
135 How to install OpenSIPS on CentOS Debian etc admin 47620   2014-03-05
 
134 Multimedia Service Platform admin 39602   2014-03-06
 
133 Building Telephony Systems with OpenSIPS 1.6 books file admin 45020   2014-03-06
 
132 Problem with presence_xml module Opensips 1.9 admin 50373   2014-03-06
 
131 How to install OpenSIPS on CentOS debian module add xcap admin 48348   2014-03-06
 
130 MediaProxy Installation Guide admin 185326   2014-03-06
 
129 rtpproxy Module admin 41172   2014-03-06
 
128 OpenSIPS Control Panel install guide admin 99512   2014-03-06
 
127 OpenSIPS Control Panel (OCP) Installation Guide admin 283274   2014-03-06
 
126 Installing RTPproxy Start RTPproxy in Bridged mode very good admin 106517   2014-03-07
 
125 Building Telephony Systems with OpenSIPS 1.6 RTPProxy + OpenSIPS 1.7 admin 43044   2014-03-07
 
124 RTPproxy Frequentry Asked Questions (FAQ) ¶ admin 178727   2014-03-07
 
123 Using the openSIPS Registrant Module admin 54693   2014-03-09
 
122 Kamailo OpenSIPs installation on Debian admin 86006   2014-03-09
 
121 opensips-1.10.0_src.tar.gz experimental source code documentation admin 40268   2014-03-09
 
120 Ekiga (formely known as GnomeMeeting) is an open source SoftPhone admin 44823   2014-03-12
 
119 Where to check OpenSIPS does not start? admin 45576   2014-03-09
 
118 book-opensips-101 / content / 3.2. SIP TLS Secure Calling.mediawiki admin 45041   2014-03-12
 
117 The Impact of TLS on SIP Server Performance file admin 44812   2014-03-12
 
116 OpenSIPS configuration for 2 or more FreeSWITCH installs admin 77411   2014-03-12
 
115 Conference Support in Kamailio (OpenSER) admin 89745   2014-03-12
 
114 SIP PBX - OpenSIPS and Asterisk configuration admin 167790   2014-03-12
 
113 telepresence: Open Source SIP Telepresence/MCU admin 187044   2014-03-12