한국어

소프트스위치

온누리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;
};
...
조회 수 :
93514
등록일 :
2017.12.09
16:33:33 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3312374&act=trackback&key=551
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3312374
List of Articles
번호 제목 글쓴이 날짜sort 조회 수
82 Opensips TM module enables stateful processing of SIP transactions admin 2014-10-04 46173
81 Script Function , Module Index v1.11 함수 모듈 opensips admin 2014-10-14 36446
80 A Survey of Open Source Products for Building a SIP Communication Platform admin 2014-10-18 40678
79 Jitsi Videobridge meets WebRTC admin 2014-10-18 45859
78 A2Billing and OpenSIPS config admin 2014-10-20 38812
77 opensips.cfg for Asterisk admin 2014-10-20 37990
76 SIP Signaling-Messages OpenSIPS Running On Multicore Server file admin 2014-11-02 42676
75 Service Provision Using Asterisk & OpenSIPS - AstriCon 2014 admin 2015-02-25 34166
74 OpenSIPS 2.1 (rc) is available, download now! admin 2015-03-22 25670
73 WebSocket Support in OpenSIPS 2.1 admin 2015-04-04 32284
72 WebRTC with OpenSIPS WebSocket is a protocol provides full-duplex admin 2015-04-04 33929
71 Opensips sip capture re designed admin 2017-07-16 21963
70 OpenSIPS Control Panel and Homer integration admin 2017-08-17 43711
69 The timeline for OpenSIPS 2.3 is admin 2017-08-17 23286
68 OpenSIPS 2.3 philosophy admin 2017-08-17 22337
67 A2Billing and OpenSIPS – Part 3 admin 2017-08-29 22113
66 A2Billing and OpenSIPS – Part 2 admin 2017-08-29 34719
65 A2Billing and OpenSIPS – Part 1 admin 2017-08-29 32653
64 WebSocket Transport using OpenSIPS admin 2017-09-01 25118
63 JsSIP: The JavaScript SIP Library admin 2017-09-01 21650
62 OpenSIPS 2.3 install admin 2017-09-01 25269
61 Opensips 2.32 download admin 2017-09-01 19624
60 How to Install OpenSIPS 2.1.2 Server on Ubuntu 15.04 admin 2017-09-01 27761
59 You can install CDRTool in the following ways: admin 2017-09-01 21735
58 How to 2.3 download , OpenSIPS new apt repository. DEBs for Debian / Ubuntu admin 2017-09-02 20226
57 Using TLS in OpenSIPS v2.2.x configuration admin 2017-09-04 48425
56 How to install Mediaproxy 2.5.2 on CentOS 6 64 bit admin 2017-09-04 145270
55 ubuntu 安装配置opensips,rtpproxy,mediaproxy admin 2017-09-04 24985
54 What is new in 2.3.0 opensips admin 2017-09-04 247347
53 Build-Depends debian 8.8 opensips 2.3 admin 2017-09-04 65738