You may be on an older freeswitch version. Type the command &quot;version&quot; at fs_cli and see what it says.<div><br></div><div>Also, if you want *only* to limit calls made to user 11 then you need to have a separate extension that handles just the limit for 11. Instead of trying to do the limit in the same extension where you do the bridge, just create a separate extension and put it near the top of your dialplan:</div>
<div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;extension name=&quot;limit user 11&quot; continue=&quot;true&quot;&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;condition field=&quot;destination_number&quot; expression=&quot;^(11)$&quot;&gt;</font></div>
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        &lt;action application=&quot;limit&quot; data=&quot;db ${domain} $1 1 handle_over_limit XML over_limit_actions&quot;/&gt;</font><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;/condition&gt;<br>
</font><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;/extension&gt;</font></div><div><br></div><div>Take the limit app out of the &quot;PBX extension&quot; and have just the bridge app and anything else you normally do there.</div>
<div><br></div><div>Also, you can put the &quot;handle_over_limit&quot; extension in your same context as the rest of your stuff, but personally I like to have special stuff like that in its own context so that the dialplan doesn&#39;t have to evaluate so many extensions.</div>
<div><br></div><div>-MC</div><div><br><div class="gmail_quote">On Thu, Jul 14, 2011 at 11:38 AM, ran zhang <span dir="ltr">&lt;<a href="mailto:rzhang@gosilverplus.com">rzhang@gosilverplus.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>

  
    
    
  
  <div text="#000000" bgcolor="#ffffff">
    Mike:  <br>
    <br>
        I have added &#39;limits.xml&#39; as u said.   If i use &#39;hash&#39;, FS
    generates error &quot;limit subsystem hash not found!&quot;, so i changed to
    &#39;db&#39;, following is my local extension in my dialplan, i changed &#39;$1&#39;
    to &#39;11&#39; since i just want to limit user/11, but its still limiting
    incoming calls on all the extensions. <br>
       <br>
    <br>
       Also, is creating &#39;limits.xml&#39; required?    <br>
    <br>
       Would it work if i can just add &#39;<font face="&#39;courier new&#39;,
      monospace">handle_over_limit</font>&#39; extension in &#39;default.xml&#39;,
    omit the &#39;XML over_limit_actions&#39; part in the limit action?<br>
    <br>
    <br>
    <br>
    <br>
    &lt;extension name=&quot;PBX Extension&quot;&gt;<br>
          &lt;condition field=&quot;destination_number&quot;
    expression=&quot;^(1[0-9]{1})$&quot;&gt;<br>
           <br>
            &lt;action application=&quot;limit&quot; data=&quot;db ${domain} 11 1
    handle_over_limit XML over_limit_actions&quot;/&gt;<br>
            &lt;action application=&quot;bridge&quot; data=&quot;user/$1&quot;/&gt;<br>
            <br>
          &lt;/condition&gt;<br>
    &lt;/extension&gt; <br><div><div></div><div class="h5">
    On 7/13/2011 11:22 PM, Michael Collins wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5"><br>
      <br>
      <div class="gmail_quote">On Wed, Jul 13, 2011 at 6:24 PM, ran
        zhang <span dir="ltr">&lt;<a href="mailto:rzhang@gosilverplus.com" target="_blank">rzhang@gosilverplus.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
          hi all:<br>
          <br>
                     I&#39;m trying to limit each registered user&#39;s active
          calls, so<br>
          if that particular registered user pass the limit, FS stops
          sending any<br>
          new incoming call to it and it can&#39;t make any new calls.<br>
          <br>
                     I looked into &#39;limit&#39; api, the counter increment
          everytime a<br>
          call FS receives, regardless of which user it is for, and
          counter doesnt<br>
          reset itself after the call is finished.<br>
        </blockquote>
        <div><br>
        </div>
        <div>I presume you mean the limit &quot;dialplan app&quot; and not API. In
          any case, if you have the default configs then locate the
          Local_Extension in conf/dialplan/default.xml. Add this line
          right after the condition:</div>
        <div><br>
        </div>
        <div>
          <div><font face="&#39;courier new&#39;, monospace">&lt;action
              application=&quot;limit&quot; data=&quot;hash ${domain} $1 1
              handle_over_limit XML over_limit_actions&quot;/&gt;</font></div>
        </div>
        <div><br>
        </div>
        <div>Then add this new file as &quot;limits.xml&quot; in conf/dialplan/ :</div>
        <div><br>
        </div>
        <div>
          <div><font face="&#39;courier new&#39;, monospace">&lt;include&gt;    
                                                                       
                                                                       
                                            </font></div>
          <div><font face="&#39;courier new&#39;, monospace">  &lt;context
              name=&quot;over_limit_actions&quot;&gt;                            
                                                                       
                                                  </font></div>
          <div><font face="&#39;courier new&#39;, monospace">    &lt;extension
              name=&quot;oops, too many calls for this one&quot;&gt;              
                                                                       
                                             </font></div>
          <div><font face="&#39;courier new&#39;, monospace">      &lt;condition
              field=&quot;destination_number&quot;
              expression=&quot;handle_over_limit&quot;&gt;                        
                                                                       
                </font></div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;answer&quot;/&gt;                                
                                                                       
                                             </font></div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;playback&quot; data=&quot;ivr/ivr-no_no_no.wav&quot;/&gt;  
                                                                       
                                             </font></div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;playback&quot; data=&quot;ivr/ivr-no_no_no.wav&quot;/&gt;  
                                                                       
                                             </font></div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;playback&quot; data=&quot;ivr/ivr-no_no_no.wav&quot;/&gt;  
                                                                       
                                             </font></div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;hangup&quot; data=&quot;USER_BUSY&quot;/&gt;                
                                                                       
                                            </font></div>
          <div><font face="&#39;courier new&#39;, monospace">     
              &lt;/condition&gt;                                        
                                                                       
                                                         </font></div>
          <div><font face="&#39;courier new&#39;, monospace">   
              &lt;/extension&gt;                                        
                                                                       
                                                           </font></div>
          <div><font face="&#39;courier new&#39;, monospace">  &lt;/context&gt;
                                                                       
                                                                       
                                             </font></div>
          <div><font face="&#39;courier new&#39;, monospace">&lt;/include&gt;</font></div>
        </div>
        <div><br>
        </div>
        <div>Save, then do F6 or reloadxml. Now when you call a local
          extension it won&#39;t allow more than one call. Note that you can
          change the value in the limit&#39;s data argument. For example,
          this would cause a limit of 4 concurrent calls, sending the
          5th call into &quot;oops, too many calls&quot; extension:</div>
        <div><br>
        </div>
        <div>
          <div><font face="&#39;courier new&#39;, monospace">&lt;action
              application=&quot;limit&quot; data=&quot;hash ${domain} $1 4
              handle_over_limit XML over_limit_actions&quot;/&gt;</font></div>
        </div>
        <div><br>
        </div>
        <div>The limit application handles everything for you. Note that
          this only covers calls made *to* the extension. If you want to
          handle calls made *from* the extension you will need to add
          another limit app to the dialplan. Here&#39;s an example; put it
          right after the &quot;global&quot; extension in default.xml:</div>
        <div><br>
        </div>
        <div>
          <div><font face="&#39;courier new&#39;, monospace">    &lt;!-- set
              outound caller limit --&gt;                              
                                                                       
                                                </font></div>
          <div><font face="&#39;courier new&#39;, monospace">    &lt;extension
              name=&quot;set outbound limit&quot; continue=&quot;true&quot;&gt;            
                                                                       
                                              </font></div>
          <div><font face="&#39;courier new&#39;, monospace">      &lt;condition
              field=&quot;destination_number&quot; expression=&quot;^1?\d{7}&quot;
              break=&quot;on-false&quot;/&gt;                                    
                                                     </font></div>
          <div><font face="&#39;courier new&#39;, monospace">      &lt;condition
              field=&quot;caller_id_number&quot; expression=&quot;^(10[01][0-9])&quot;&gt;  
                                                                       
                                           </font></div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;limit&quot; data=&quot;hash ${domain} $1
              4 handle_over_limit XML over_limit_actions&quot;/&gt;</font>  
                         </div>
          <div><font face="&#39;courier new&#39;, monospace">        &lt;action
              application=&quot;log&quot; data=&quot;INFO Added limit for caller
              $1&quot;/&gt;                                                  
                                                  </font></div>
          <div><font face="&#39;courier new&#39;, monospace">     
              &lt;/condition&gt;                                        
                                                                       
                                                         </font></div>
          <div><font face="&#39;courier new&#39;, monospace">   
              &lt;/extension&gt;                                        
                                                                       
                                                           </font></div>
          <div>  </div>
        </div>
        <div>Again, save, press F6 or do reloadxml. Now when this person
          makes a call to a 7-digit number or does 1+ 7 or more digits,
          it will add to his limit totals. However, if he just calls
          another 4-digit extension on the system then it won&#39;t add to
          his limit. (Adjust this as you see fit.)</div>
        <div><br>
        </div>
        <div>Let me know if this works for you (it worked for me in my
          little lab setting) and I will throw it up on the wiki and
          maybe add it to the cookbook.</div>
        <div><br>
        </div>
        <div>-MC</div>
        <div><br>
        </div>
        <div>
          <br>
        </div>
        <div><br>
        </div>
      </div>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
Join us at ClueCon 2011, Aug 9-11, Chicago
<div class="im"><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</div></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>