한국어

소프트스위치

온누리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;
};
...
조회 수 :
90681
등록일 :
2017.12.09
16:33:33 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3312374&act=trackback&key=3b4
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3312374
List of Articles
번호 제목 글쓴이 날짜sort 조회 수
51 2017 08 31 opensips 2.32 install debian8.8 module install compile err modules admin 2017-09-04 41879
50 opensips command /sbin/opensipsctl detail admin 2017-09-04 124406
49 compile only the textops module make modules=modules/textops modules admin 2017-09-05 18800
48 Installing RTPEngine on Ubuntu 14.04 admin 2017-09-05 31897
47 rtpengine install and config admin 2017-09-05 58132
46 OpenSIPS basic configuration script 기본 컨피그 admin 2017-09-05 104674
45 WebSocket Transport using OpenSIPS configuration 웹 소켓 컨피그레이션 기본 admin 2017-09-06 20662
44 rtpengine config basic and opensips configuration and command admin 2017-09-06 53085
43 오픈소스 (사내)메신저 서버 구축, 오픈 파이어(openfire) 설치방법과 세팅(리눅스 기준) admin 2017-09-09 71834
42 PUSH SERVER 푸시서버 안드로이드 애플 admin 2017-09-11 207773
41 Advanced SIP scenarios with Event-based-Routing admin 2017-09-11 32846
40 opensips.cfg. sample admin 2017-09-12 23817
39 Fail2Ban Freeswitch How to secure admin 2017-09-12 60939
38 OpenSIPS command line tricks admin 2017-09-13 44648
37 SIP to XMPP Gateway + SIP Presence Server opensips admin 2017-09-13 51780
36 How to setup a Jabber / XMPP server on Debian 8 (jessie) using ejabberd admin 2017-09-13 123523
35 opensips tls cfg admin 2017-09-14 29479
34 Using TLS in OpenSIPS v2.2.x admin 2017-09-14 44425
33 Documentation -> Tutorials -> TLS opensips.cfg admin 2017-09-14 24313
32 openssl 을 이용한 인증서 생성 절차를 정리한다. 개인키 CSR SSL 인증서 파일 생성 admin 2017-09-14 23307
31 opensips configuration config explain easy basic 오픈쉽스 컨피그레이션 기본 설명 file admin 2017-12-07 21482
30 OpenSIPS Module Interface admin 2017-12-07 41769
29 opensips push notification How to admin 2017-12-07 21047
28 opensips exec module admin 2017-12-08 18233
27 in opensips what is has_totag() admin 2017-12-09 21562
26 in opensips db_does_uri_exist() what is admin 2017-12-09 17782
» in opensips what is lookup(domain [, flags [, aor]]) admin 2017-12-09 90681
24 what is loose_route() in opensips ? file admin 2017-12-09 23278
23 what is record_route() in opensips ? admin 2017-12-09 23903
22 dictionary.opensips radius admin 2017-12-09 94543