[Freeswitch-users] FS hash limit

mehroz mehroz.ashraf85 at gmail.com
Mon Mar 11 17:30:42 MSK 2013


This is not exactly what you are looking for but it might help you.
This is to limit the concurrent calls by callee and the caller (limit set to
1 call )

 <context name="start">
        <extension name="test">
              <condition field="destination_number" expression="^(\w+)$">
              <action application="limit" data="hash ${domain} $1 1
handle_over_limit XML over_limit_actions"/>
              <action application="limit" data="hash ${domain}
${caller_id_number} 1 handle_over_limit XML over_limit_actions"/>
               <action application="set" data="ringback=${us-ring}"/>
               <action application="set"
data="transfer_ringback=$${hold_music}"/>
               <action application="set" data="hangup_after_bridge=true"/>
               <action application="bridge"
data="user/${dialed_extension}@${domain_name}"/>
              </condition>
                             
        </extension>
</context>

</context>
        <context name="over_limit_actions">                                                                                                                     
            <extension name="limit_exceeded">                                                                                                
                  <condition field="destination_number"
expression="handle_over_limit">                                                                         
                           <action application="hangup" data="USER_BUSY"/>                                                                                      
                  </condition>                                                                                                                                  
             </extension>                                                                                                                                          
</context>

Both limits in the "start" context set the limit in 1 call for callee ($1)
and caller(${caller_id_number}), if the limit is exceeded , the flow falls
to "over_limit_action" context and busy tone is transferred.




--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-hash-limit-tp7588453p7588454.html
Sent from the freeswitch-users mailing list archive at Nabble.com.



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list