<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hi,<br>
        <br>
        I see you added the missing "exit" after the sl_send_reply() and
        you do create the dialog for each INVITE (hopefully only for the
        initial ones :) ). <br>
        <br>
        What seems to be the exact problem now ?<br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 15.07.2014 05:21, jing wrote:<br>
    </div>
    <blockquote cite="mid:tencent_6BBDD6C6338F7B911A4403D3@qq.com"
      type="cite">
      <div>hi,Schneur.</div>
      <div>Thanks for your advice.</div>
      <div>But I did put the check before  create_dialog("B")  in the
        original oprnsips.cfg:</div>
      <div> </div>
      <div>if (is_method("INVITE")) {<br>
                        xlog("active dialog is $stat(active_dialogs)");</div>
      <div>                if ($stat(active_dialogs)&gt;=1){<br>
                        sl_send_reply("503", "Service Unavailable");<br>
                        exit;<br>
                        }<br>
                        # create dialog with timeout<br>
                        if ( !create_dialog("B") ) {<br>
                                send_reply("500","Internal Server
        Error");<br>
                                exit;<br>
                        }</div>
      <div>                setflag(ACC_DO); # do accounting<br>
                }</div>
      <div> </div>
      <div>
        <div><br>
        </div>
        <div>So what is wrong in the script?</div>
        <div>And I still want to know how to judge a call is
          "active_dialogs"?</div>
        <div>Thanks a lot.</div>
        <div> </div>
        <div>regards,</div>
        <div>jing<br>
        </div>
        <div style="PADDING-BOTTOM: 2px; PADDING-LEFT: 0px;
          PADDING-RIGHT: 0px; FONT-FAMILY: Arial Narrow; FONT-SIZE:
          12px; PADDING-TOP: 2px">------------------ 原始邮
          件 ------------------</div>
        <div style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px;
          PADDING-RIGHT: 8px; BACKGROUND: #efefef; FONT-SIZE: 12px;
          PADDING-TOP: 8px">
          <div><b>发件人:</b> "Schneur
            Rosenberg";<a class="moz-txt-link-rfc2396E" href="mailto:rosenberg11219@gmail.com">&lt;rosenberg11219@gmail.com&gt;</a>;</div>
          <div><b>发送时间:</b> 2014年7月14日(星期一) 晚上6:25</div>
          <div><b>收件人:</b> "OpenSIPS users mailling
            list"<a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a>; <wbr></div>
          <div><b>主题:</b> Re: [OpenSIPS-Users]回复: Dialog Concurrency
            Control Issue.</div>
        </div>
        <div><br>
        </div>
        <p dir="ltr">You need to do this before the create_dialog() call</p>
        <div class="gmail_quote">On Jul 14, 2014 10:33 AM, "jing" &lt;<a
            moz-do-not-send="true" href="mailto:605507247@qq.com">605507247@qq.com</a>&gt;
          wrote:<br type="attribution">
          <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px
            0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
            <div><font color="#000000">Thanks for your reply.But I have
                another question, I used  active_dialogs </font><font
                color="#000000"> in the cfg file as this:</font></div>
            <div> </div>
            <div><font color="#000000">if (is_method("INVITE")) {<br>
                                if ($stat(active_dialogs)&gt;=1){<br>
                                sl_send_reply("503", "Service
                Unavailable");<br>
                                }<br>
              </font></div>
            <div><font color="#000000">
                <div><font color="#000000">But it seems not right. </font></div>
                <div><font color="#000000">I use sipp to test the limit
                    ,but when the value of active_dialogs</font><font
                    color="#000000"> aim to the number I set ,</font></div>
                <div><font color="#000000">opensips sent 503,but  the
                    value of active_dialogs<font color="#000000"> </font>sitll
                    increase. </font></div>
                <div><font color="#000000">So I want to know how the
                    value of this paramer come</font><font
                    color="#000000">from.</font></div>
                <div><font color="#000000">Or is there something wrong
                    in my cfg document?</font></div>
                <div> </div>
                <div>regards,</div>
                <div>Jing</div>
              </font></div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div style="PADDING-BOTTOM: 2px; PADDING-LEFT: 0px;
              PADDING-RIGHT: 0px; FONT-FAMILY: Arial Narrow; FONT-SIZE:
              12px; PADDING-TOP: 2px">------------------ 原始邮
              件 ------------------</div>
            <div style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px;
              PADDING-RIGHT: 8px; BACKGROUND: #efefef; FONT-SIZE: 12px;
              PADDING-TOP: 8px">
              <div><b>发件人:</b> "Schneur Rosenberg [via OpenSIPS (Open
                SIP Server)]"&lt;<a moz-do-not-send="true"
                  href="http://user/SendEmail.jtp?type=node&amp;node=7592371&amp;i=0"
                  rel="nofollow" target="_blank" link="external">[hidden
                  email]</a>&gt;; </div>
              <div><b>发送时间:</b> 2014年7月14日(星期一) 下午2:08</div>
              <div><b>收件人:</b> "jing "&lt;<a moz-do-not-send="true"
                  href="http://user/SendEmail.jtp?type=node&amp;node=7592371&amp;i=1"
                  rel="nofollow" target="_blank" link="external">[hidden
                  email]</a>&gt;; </div>
              <div><b>主题:</b> Re: Dialog Concurrency Control Issue.</div>
            </div>
            <div><br>
            </div>
            <p dir="ltr">Very simple, before creating a new dialog check
              how many open dialogs exist.</p>
            <div class="gmail_quote">On Jul 14, 2014 9:05 AM, "jing"
              &lt;<a moz-do-not-send="true"
                href="http://user/SendEmail.jtp?type=node&amp;node=7592369&amp;i=0"
                rel="nofollow" target="_blank" link="external">[hidden
                email]</a>&gt; wrote:<br type="attribution">
              <blockquote style="BORDER-LEFT: #cccccc 2px solid;
                PADDING-BOTTOM: 0px; PADDING-LEFT: 1em; PADDING-RIGHT:
                1em; PADDING-TOP: 0px" class="gmail_quote">hi,Bogdan<br>
                <br>
                <br>
                 I want to limit the total number of active dialogs
                ,what should I do ?<br>
                <br>
                I found there are many questions about "Concurrent calls
                limitation " based<br>
                on per user, it's not what I need.<br>
                <br>
                I appreciate your advice very much,  more detailed the
                better.<br>
                <br>
                Thanks,<br>
                Regards,<br>
                jing<br>
                <br>
                <br>
                <br>
                --<br>
                View this message in context: <a moz-do-not-send="true"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-Concurrency-Control-Issue-tp6172931p7592368.html"
                  rel="nofollow" target="_blank" link="external">http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-Concurrency-Control-Issue-tp6172931p7592368.html</a><br>
                Sent from the OpenSIPS - Users mailing list archive at
                Nabble.com.<br>
                <br>
                _______________________________________________<br>
                Users mailing list<br>
                <a moz-do-not-send="true"
                  href="http://user/SendEmail.jtp?type=node&amp;node=7592369&amp;i=1"
                  rel="nofollow" target="_blank" link="external">[hidden
                  email]</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                  rel="nofollow" target="_blank" link="external">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
              </blockquote>
            </div>
            <br>
            _______________________________________________ <br>
            Users mailing list <br>
            <a moz-do-not-send="true"
              href="http://user/SendEmail.jtp?type=node&amp;node=7592369&amp;i=2"
              rel="nofollow" target="_blank" link="external">[hidden
              email]</a> <br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              rel="nofollow" target="_blank" link="external">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
            <br>
            <hr color="#cccccc" noshade="noshade" size="1">
            <div style="FONT: 12px tahoma, geneva, helvetica, arial,
              sans-serif; COLOR: #444">
              <div style="FONT-WEIGHT: bold">If you reply to this email,
                your message will be added to the discussion below:</div>
              <a moz-do-not-send="true"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-Concurrency-Control-Issue-tp6172931p7592369.html"
                rel="nofollow" target="_blank" link="external">http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-Concurrency-Control-Issue-tp6172931p7592369.html</a>
            </div>
            <div style="MARGIN-TOP: 0.4em; FONT: 11px/1.5em tahoma,
              geneva, helvetica, arial, sans-serif; COLOR: #666">To
              unsubscribe from Dialog Concurrency Control Issue., <a
                moz-do-not-send="true" rel="nofollow" link="external">click
                here</a>.<br>
              <a moz-do-not-send="true" style="FONT: 9px serif"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
                rel="nofollow" target="_blank" link="external">NAML</a>
            </div>
            <br>
            <hr align="left" width="300">
            View this message in context: <a moz-do-not-send="true"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-Concurrency-Control-Issue-tp7592371.html"
              target="_blank">回复: Dialog Concurrency Control Issue.</a><br>
            Sent from the <a moz-do-not-send="true"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html"
              target="_blank">OpenSIPS - Users mailing list archive</a>
            at Nabble.com.<br>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<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>
</pre>
    </blockquote>
    <br>
  </body>
</html>