You can use a combination of the following dialog profiles (grouping calls) functions for this:<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span class="section"><code class="function"><a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294302">get_profile_size(profile,[value],size)</a> Check if a prifile is at limit.</code></span></div>
<div><span class="Apple-style-span" style="font-family: monospace; "><a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294092">set_dlg_profile(profile,[value])</a> If not at limit, increment the count for the profile (NOTE the value option is not actually supported yet)</span></div>
<div><span class="section"><code class="function"></code></span><font class="Apple-style-span" face="monospace"><span class="section"><code class="function"><a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294162">unset_dlg_profile(profile,[value])</a> If need to remove from a profile like carrier failover</code></span></font></div>
<div><font class="Apple-style-span" face="monospace"><span class="section"><code class="function"></code></span><span class="section"><code class="function"><a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294231">is_in_profile(profile,[value])</a> Not sure this would be needed but...</code></span><br>
</font></div><div><font class="Apple-style-span" face="monospace"><span class="section"><code class="function"><br></code></span></font></div><div><font class="Apple-style-span" face="monospace"><span class="section"><code class="function">When a call ends it will automatically be removed from any profiles it was part of.</code></span></font></div>
<div><font class="Apple-style-span" face="monospace"><span class="section"><code class="function"><br></code></span></font></div><div><div class="gmail_quote">On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy <span dir="ltr"><<a href="mailto:a.zagorskiy@oyster-telecom.ru">a.zagorskiy@oyster-telecom.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Nobody uses limitation on amount of established sessions? I don't believe!<br>
=)<br>
<div class="im"><br>
<br>
<br>
<br>
<br>
<br>
WBR, Anton Zagorskiy<br>
VoIP Developer, Oyster Telecom<br>
Phone.: +7 812 601-0666<br>
Fax: +7 812 601-0593<br>
<a href="mailto:a.zagorskiy@oyster-telecom.ru">a.zagorskiy@oyster-telecom.ru</a><br>
<a href="http://www.oyster-telecom.ru" target="_blank">www.oyster-telecom.ru</a><br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">> -----Original Message-----<br>
> From: <a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a> [mailto:<a href="mailto:users-">users-</a><br>
> <a href="mailto:bounces@lists.opensips.org">bounces@lists.opensips.org</a>] On Behalf Of Anton Zagorskiy<br>
> Sent: Thursday, November 18, 2010 4:58 PM<br>
> To: 'OpenSIPS users mailling list'<br>
> Subject: [OpenSIPS-Users] Handle end of a transaction/dialog<br>
><br>
> Hello.<br>
><br>
> I need to control how much SIP dialogs (established or pending) has<br>
> each<br>
> domain. If that value is equal to certain constant then I should drop<br>
> any<br>
> new INVITE from that domain.<br>
> There is no problem with catching initial requests, but with<br>
> terminating.<br>
> How can I control that an openSIPS transaction is in the terminating<br>
> stage?<br>
><br>
><br>
><br>
><br>
><br>
><br>
> WBR, Anton Zagorskiy<br>
> VoIP Developer, Oyster Telecom<br>
> Phone.: +7 812 601-0666<br>
> Fax: +7 812 601-0593<br>
> <a href="mailto:a.zagorskiy@oyster-telecom.ru">a.zagorskiy@oyster-telecom.ru</a><br>
> <a href="http://www.oyster-telecom.ru" target="_blank">www.oyster-telecom.ru</a><br>
><br>
><br>
><br>
><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>
<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>
</div></div></blockquote></div><br></div>