<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)>=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";<rosenberg11219@gmail.com>;</DIV>
<DIV><B>发送时间:</B> 2014年7月14日(星期一) 晚上6:25</DIV>
<DIV><B>收件人:</B> "OpenSIPS users mailling list"<users@lists.opensips.org>; <WBR></DIV>
<DIV></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" <<A href="mailto:605507247@qq.com">605507247@qq.com</A>> 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><FONT size=+0></FONT> </DIV>
<DIV><FONT color=#000000>if (is_method("INVITE")) {<BR> if ($stat(active_dialogs)>=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)]"<<A href="http://user/SendEmail.jtp?type=node&node=7592371&i=0" rel=nofollow target=_blank link="external">[hidden email]</A>>; </DIV>
<DIV><B>发送时间:</B> 2014年7月14日(星期一) 下午2:08</DIV>
<DIV><B>收件人:</B> "jing "<<A href="http://user/SendEmail.jtp?type=node&node=7592371&i=1" rel=nofollow target=_blank link="external">[hidden email]</A>>; </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" <<A href="http://user/SendEmail.jtp?type=node&node=7592369&i=0" rel=nofollow target=_blank link="external">[hidden email]</A>> 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 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&node=7592369&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&node=7592369&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&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&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>