[Freeswitch-users] Limit

Bipin Patel bipin at xbipin.com
Tue Jul 4 19:51:06 UTC 2017


Hi,

Recently we had a similar issue with limit and as you know it doesn't work 
across dialplan so we started using hash where we increment a counter for 
the caller and callee and once they hang up we decrement it and in transfer 
situation we call the attended transfer extension in features dialplan 
where we take the input of the extension to be transferred to then we call 
execute extension to parse the features dialplan again and then we 
increment the counter for the callee where call is to be transferred.

This way the counter for all parties is incremented properly and we use api 
hangup hook to decrement the hash value in the bridge statement so when 
that party hangs up the counter is automatically decremented.




On July 4, 2017 11:11:43 PM Shaun Stokes <shaun.stokes at itec-support.co.uk> 
wrote:

> During testing I’ve come across another way for the limit to apply on B leg 
> with-out transferring the call out of the LUA script.
>
> We simply execute this line before the bridge:
> session:execute("export","nolocal:execute_on_pre_answer=limit hash 
> "..domain_name.."_bleg "..extension.." "..limit_max.." "..limit_destination);
>
> This results in the limit being applied on B leg before the call is answered.
>
> We continue to apply a separate limit on A leg as before, the above is be 
> used as an additional measure to limit B leg in the event that extensions 
> use features such as attended transfer to exceed their available channels.
>
>
> From: Shaun Stokes
> Sent: 30 June 2017 16:23
> To: 'FreeSWITCH Users Help' <freeswitch-users at lists.freeswitch.org>
> Subject: RE: [Freeswitch-users] Limit
>
> I should also point out, the extensions are transferring to external PSTN 
> numbers not local to FreeSWITCH.
>
> I’ll give this a try and will provide feedback, we’ll need a new dialplan 
> to bridge the gateway.
>
> Thanks,
> Shaun
>
> From: FreeSWITCH-users 
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Luis 
> Daniel Lucio Quiroz
> Sent: 30 June 2017 12:45
> To: FreeSWITCH Users Help 
> <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
> Subject: Re: [Freeswitch-users] Limit
>
> In your script, do a transfer instead a bridge. Let the dialplan deal with 
> the bridge
>
> Le 30 juin 2017 7:05 AM, "Shaun Stokes" 
> <shaun.stokes at itec-support.co.uk<mailto:shaun.stokes at itec-support.co.uk>> a 
> écrit :
> Hi All,
>
> In our environment we restrict the number of current channels (using limit) 
> per extension, however using attended transfer allows extensions to exceed 
> the limit since leg a ends once the transfer completes which resets the 
> limit to 0.
>
> I believe the solution is to apply the limit on leg b, however leg b is 
> initiated via a bridge (with-in our outbound LUA script).
>
> How can we apply the limit to leg b, or is there a better solution?
>
> Thanks,
> Shaun
> [http://www.itec-support.co.uk/wp-content/uploads/2016/07/email_logo.jpg]
>
> Shaun Stokes - Infrastructure Analyst
>
> T :
>
> 01453 700713
>
> E :
>
> shaun.stokes at itec-support.co.uk<mailto:shaun.stokes at itec-support.co.uk>
>
> W :
>
> www.itec-support.co.uk<http://www.itec-support.co.uk>
>
>
> Registered Address :- ITEC Support, Suite 2 Prospect House, Bath Road, 
> Stroud, Gloucestershire GL5 3QF
> Company No. 06908001
>
> CONFIDENTIALITY NOTICE
> This communication and the information it contains are intended for the 
> person or organisation to which it is addressed. Its contents are 
> confidential and may be protected in law. Unauthorised use, copying or 
> disclosure of any of it may be unlawful. If you are not the intended 
> recipient, please contact us immediately.
> The contents of any attachments in this e-mail may contain software 
> viruses, which could damage your own computer system. While ITEC Support 
> has taken every reasonable precaution to minimise this risk, we cannot 
> accept liability for any damage which you sustain as a result of software 
> viruses. You should carry out your own virus checking procedure before 
> opening any attachment.
>
> ______________________________________________________________________
> This message has been checked for all known viruses by MessageLabs Virus 
> Scanning Service.
> ______________________________________________________________________
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
> ______________________________________________________________________
> This message has been checked for all known viruses by MessageLabs Virus 
> Scanning Service.
> ______________________________________________________________________
> [http://www.itec-support.co.uk/wp-content/uploads/2016/07/email_logo.jpg]
> Shaun Stokes - Infrastructure Analyst
>
> T :     01453 700713
> E :     shaun.stokes at itec-support.co.uk
> W :     www.itec-support.co.uk
>
> Registered Address :- ITEC Support, Suite 2 Prospect House, Bath Road, 
> Stroud, Gloucestershire GL5 3QF
> Company No. 06908001
>
> CONFIDENTIALITY NOTICE
> This communication and the information it contains are intended for the 
> person or organisation to which it is addressed. Its contents are 
> confidential and may be protected in law. Unauthorised use, copying or 
> disclosure of any of it may be unlawful. If you are not the intended 
> recipient, please contact us immediately.
> The contents of any attachments in this e-mail may contain software 
> viruses, which could damage your own computer system. While ITEC Support 
> has taken every reasonable precaution to minimise this risk, we cannot 
> accept liability for any damage which you sustain as a result of software 
> viruses. You should carry out your own virus checking procedure before 
> opening any attachment.
>
> ______________________________________________________________________
> This message has been checked for all known viruses by  MessageLabs Virus 
> Scanning Service.
> ______________________________________________________________________
>
>
> ----------
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170704/5181e6f6/attachment-0001.html>


More information about the FreeSWITCH-users mailing list