<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<style>BODY{font:10pt Tahoma, Verdana, sans-serif}</style></head><body>
<DIV>Change that to "execute_on_originate". On answer will blow the call off if it's over limits when the user answers.</DIV>
<DIV> </DIV>
<DIV>--Dave</DIV><BR>
<BLOCKQUOTE style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<HR>
<B>From:</B> Michael Collins [mailto:msc@freeswitch.org]<BR><B>To:</B> FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org]<BR><B>Sent:</B> Sun, 03 Jun 2012 13:54:08 -0700<BR><B>Subject:</B> Re: [Freeswitch-users] limit app problem with loopback channels<BR><BR>You can solve this issue by avoiding loopback. Don't use loopback unless there is absolutely no other alternative. Try replacing the loopback calls in the group definition to "user/xxx" instead:<BR><BR> <extension name="group_dial_sales"><BR> <condition field="destination_number" expression="^2000$"><BR> <action application="bridge"<BR>data="[execute_on_answer='limit hash callwaiting 1000 1']user/1000, [execute_on_answer='limit hash callwaiting<BR>1001 1']user/1001"/><BR> </condition><BR> </extension><BR>
<DIV> </DIV>This is just off the top of my head, so please do the usual testing and tinkering before you report back that it does not work. :)<BR><BR>-MC<BR><BR>
<DIV class=gmail_quote>On Sun, Jun 3, 2012 at 8:47 AM, Jose Fco. Irles DurĂ¡ <SPAN><<A href="mailto:josefu@gmail.com">josefu@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>Hello,<BR><BR>I'm trying to limit calls to one user with limit application, all<BR>works fine when a user dials to the number user (the caller is<BR>transfered to limit_exceeded extension)<BR><BR>But when a caller dials to the 2000 extensions (a "ring group" to<BR>loopback channels) and one of the users (for example 1001) answer the<BR>call, the limit app removes the limit count for this channel when the<BR>loopback channel disappears (when the direct bridge occurs between the<BR>caller channel and callee channel).<BR><BR>Where is the problem? How can I avoid that the limit app removes the<BR>limit for this loopback channel?<BR><BR>There is the fragmet of my dialplan (is the vainilla dialplan from git<BR>with the limit action added)<BR><context name="default"><BR>...<BR> <extension name="Local_Extension"><BR> <condition field="destination_number" expression="^(10[01][0-9])$"><BR> <action application="export" data="dialed_extension=$1"/><BR> <action application="set" data="ringback=${us-ring}"/><BR> <action application="set" data="transfer_ringback=$${hold_music}"/><BR> <action application="set" data="call_timeout=30"/><BR> <action application="set" data="hangup_after_bridge=true"/><BR> <action application="set" data="continue_on_fail=true"/><BR> <action application="limit" data="hash callwaiting<BR>${dialed_extension} 1"/><BR> <action application="bridge"<BR>data="user/${dialed_extension}@${domain_name}"/><BR> <action application="answer"/><BR> <action application="sleep" data="1000"/><BR> <action application="bridge"<BR>data="loopback/app=voicemail:default ${domain_name}<BR>${dialed_extension}"/><BR> </condition><BR> </extension><BR><BR> <extension name="group_dial_sales"><BR> <condition field="destination_number" expression="^2000$"><BR> <action application="bridge"<BR>data="loopback/1000/default,loopback/1001/default"/><BR> </condition><BR> </extension><BR><BR>...<BR></context><BR><BR>--<BR>Jose Fco. Irles DurĂ¡<BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE>
<STYLE>
</STYLE>
<DIV> </DIV>
<DIV> </DIV></body></html>