<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">That's right. All calls were working
      well before I add these lines. I noticed, that when I erase these
      lines  <br>
      <b>if (is_method("PUBLISH|SUBSCRIBE")) {
      </b><b><br>
      </b><b>    route(handle_presence);
      </b><b><br>
      </b><b>    exit;
      </b><b><br>
      </b><b>     }<br>
        <br>
      </b>problem is gone, and all calls goes smoothly.<b><br>
      </b></div>
    <blockquote
      cite="mid:cabdb26a-837d-8164-6312-79d130ff47d1@opensips.org"
      type="cite">Were your calls properly working before adding the BLF
      and presence scripting ?
      <br>
      <br>
      Regards,
      <br>
      <br>
      Bogdan-Andrei Iancu
      <br>
      OpenSIPS Founder and Developer
      <br>
      <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
      <br>
      <br>
      On 03.01.2017 15:00, maatohewetbi wrote:
      <br>
      <blockquote type="cite">It doesn't work. If I call number B, it
        rings, and BLF LED is blinking, but
        <br>
        after picking up the phone, call is without audio and LED is
        still blinking
        <br>
        event I disconnect call. Then If I try to call again, call
        freezes like if
        <br>
        it's routing in loop, and B side doesn't ring at all. I heve to
        restart
        <br>
        Opensips. Here is my config:
        <br>
        <br>
        .................
        <br>
        Modules, general config
        <br>
        ..................
        <br>
        <br>
        <br>
        # -------------------------  request routing logic
        -------------------
        <br>
        route{
        <br>
             if (!mf_process_maxfwd_header("10")) {
        <br>
            sl_send_reply("483","Too Many Hops");
        <br>
            exit;
        <br>
             };
        <br>
                  if (msg:len >=  2048 ) {
        <br>
            sl_send_reply("513", "Message too big");
        <br>
            exit;
        <br>
             };
        <br>
        <br>
             if (nat_uac_test("3")) {
        <br>
            if (is_method("REGISTER") || !is_present_hf("Record-Route"))
        {
        <br>
                log("LOG:Someone trying to register from private IP,
        rewriting\n");
        <br>
                fix_nated_contact();
        <br>
                if ( is_method("INVITE") ) {
        <br>
                fix_nated_sdp("1");
        <br>
                        };
        <br>
                force_rport();
        <br>
                setbflag(6);
        <br>
                setbflag(8);
        <br>
            };
        <br>
             };
        <br>
        <br>
             if (loose_route()) {
        <br>
            append_hf("P-hint: rr-enforced\r\n");
        <br>
            
        <br>
                if(src_ip == 'YYY.YYY.YYY.YYY'){
        <br>
                route(1);
        <br>
                }else{
        <br>
                route(2);
        <br>
                }
        <br>
            
        <br>
            exit;
        <br>
             };
        <br>
        <br>
             if (!is_method("REGISTER"))
        <br>
            record_route();
        <br>
        <br>
             if (!uri==myself) {
        <br>
            append_hf("P-hint: outbound\r\n");
        <br>
            
        <br>
            if(src_ip == 'YYY.YYY.YYY.YYY'){
        <br>
            route(1);
        <br>
            }else{
        <br>
            route(2);
        <br>
            }
        <br>
            
        <br>
            exit;
        <br>
             };
        <br>
        <br>
             if (uri==myself) {
        <br>
        <br>
            if (is_method("REGISTER")) {
        <br>
                if (!www_authorize("", "subscriber")) {
        <br>
                www_challenge("", "0");
        <br>
                return;
        <br>
                };
        <br>
                save("location");
        <br>
                exit;
        <br>
            };
        <br>
        <br>
            lookup("aliases");
        <br>
            if (!uri==myself) {
        <br>
                append_hf("P-hint: outbound alias\r\n");
        <br>
            
        <br>
                if(src_ip == 'YYY.YYY.YYY.YYY'){
        <br>
                route(1);
        <br>
                }else{
        <br>
                route(2);
        <br>
                }    <br>
            
        <br>
                exit;
        <br>
            };
        <br>
            alias_db_lookup("dbaliases","d");
        <br>
            if (!lookup("location")) {
        <br>
                route(2);
        <br>
                exit;
        <br>
            };
        <br>
             };
        <br>
        <br>
            
        <br>
            if (is_method("INVITE")) {
        <br>
                create_dialog();
        <br>
                dialoginfo_set();
        <br>
             }
        <br>
            if (is_method("PUBLISH|SUBSCRIBE")) {
        <br>
            route(handle_presence);
        <br>
            exit;
        <br>
             }
        <br>
        <br>
            
        <br>
        <br>
             append_hf("P-hint: usrloc applied\r\n");
        <br>
             if(src_ip == 'YYY.YYY.YYY.YYY'){
        <br>
             route(1);
        <br>
             }else{
        <br>
             route(2);
        <br>
             }
        <br>
                  }
        <br>
        <br>
            
        <br>
        route[handle_presence]
        <br>
        {
        <br>
             if(!t_newtran()){
        <br>
            sl_reply_error();
        <br>
            exit;
        <br>
             }
        <br>
        <br>
             if (is_method("PUBLISH")) {
        <br>
            handle_publish();
        <br>
             } else
        <br>
        <br>
             if (is_method("SUBSCRIBE")) {
        <br>
            handle_subscribe();
        <br>
             }
        <br>
        <br>
             exit;
        <br>
        }
        <br>
        <br>
            
        <br>
        <br>
        route[1]
        <br>
        {
        <br>
             if
        (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)">"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"</a>
        &&
        <br>
        !search("^Route:")){
        <br>
            sl_send_reply("479", "We don't forward to private IP
        addresses");
        <br>
            exit;
        <br>
             };
        <br>
        <br>
             if (isbflagset(6)) {
        <br>
            force_rtp_proxy();
        <br>
             };
        <br>
        <br>
             t_on_reply("1");
        <br>
        <br>
             if (!t_relay()) {
        <br>
            sl_reply_error();
        <br>
             };
        <br>
        }
        <br>
        <br>
        route[2] {
        <br>
             force_rtp_proxy();
        <br>
             rewritehostport ("YYY.YYY.YYY.YYY:xx");
        <br>
             t_relay();
        <br>
        }
        <br>
        <br>
        onreply_route[1] {
        <br>
             if (isbflagset(6) && status =~ "(183)|2[0-9][0-9]")
        {
        <br>
            fix_nated_contact();
        <br>
            force_rtp_proxy();
        <br>
             } else if (nat_uac_test("1")) {
        <br>
            fix_nated_contact();
        <br>
             };
        <br>
        }
        <br>
        <br>
        <br>
        <br>
        <br>
        --
        <br>
        View this message in context:
<a class="moz-txt-link-freetext" href="http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605416.html">http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605416.html</a><br>
        Sent from the OpenSIPS - Users mailing list archive at
        Nabble.com.
        <br>
        <br>
        _______________________________________________
        <br>
        Users mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
        <br>
      </blockquote>
      <br>
      <br>
      _______________________________________________
      <br>
      Users mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Z poważaniem
Marcin Zieliński

easyCALL.PL S.A.
ul. Pianistów 2
02-403 Warszawa</pre>
  </body>
</html>