<DIV>hi,Schneur.</DIV>
<DIV>Thanks for your advice.</DIV>
<DIV>But I did&nbsp;put the check before&nbsp; create_dialog("B")&nbsp; in the original oprnsips.cfg:</DIV>
<DIV>&nbsp;</DIV>
<DIV>if (is_method("INVITE")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("active dialog is $stat(active_dialogs)");</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($stat(active_dialogs)&gt;=1){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("503", "Service Unavailable");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # create dialog with timeout<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( !create_dialog("B") ) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; send_reply("500","Internal Server Error");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(ACC_DO); # do accounting<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><BR></DIV>
<DIV>So what is wrong in the script?</DIV>
<DIV>And I still&nbsp;want to know how to judge a call is "active_dialogs"?</DIV>
<DIV>Thanks a lot.</DIV>
<DIV>&nbsp;</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">------------------&nbsp;原始邮件&nbsp;------------------</DIV>
<DIV style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #efefef; FONT-SIZE: 12px; PADDING-TOP: 8px">
<DIV><B>发件人:</B>&nbsp;"Schneur Rosenberg";&lt;rosenberg11219@gmail.com&gt;;</DIV>
<DIV><B>发送时间:</B>&nbsp;2014年7月14日(星期一) 晚上6:25</DIV>
<DIV><B>收件人:</B>&nbsp;"OpenSIPS users mailling list"&lt;users@lists.opensips.org&gt;; <WBR></DIV>
<DIV></DIV>
<DIV><B>主题:</B>&nbsp;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 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&nbsp;I have another question, I used &nbsp;active_dialogs&nbsp;</FONT><FONT color=#000000> in the cfg file as this:</FONT></DIV>
<DIV><FONT size=+0></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000>if (is_method("INVITE")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($stat(active_dialogs)&gt;=1){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("503", "Service Unavailable");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<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>&nbsp;aim to the number I set ,</FONT></DIV>
<DIV><FONT color=#000000>opensips sent 503,but&nbsp; the value of active_dialogs<FONT color=#000000>&nbsp;</FONT>sitll increase. </FONT></DIV>
<DIV><FONT color=#000000>So&nbsp;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>&nbsp;</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">------------------&nbsp;原始邮件&nbsp;------------------</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 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 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 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>&nbsp;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, &nbsp;more detailed the better.<BR><BR>Thanks,<BR>Regards,<BR>jing<BR><BR><BR><BR>--<BR>View this message in context: <A 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 href="http://user/SendEmail.jtp?type=node&amp;node=7592369&amp;i=1" rel=nofollow target=_blank link="external">[hidden email]</A><BR><A 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 href="http://user/SendEmail.jtp?type=node&amp;node=7592369&amp;i=2" rel=nofollow target=_blank link="external">[hidden email]</A> <BR><A 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 SIZE=1 noShade>

<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 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 rel=nofollow link="external">click here</A>.<BR><A 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 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 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 href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</A><BR><A 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></DIV></DIV>