[Freeswitch-users] Question about limit max_calls
Vlad Toma
vldtoma at gmail.com
Tue Apr 3 14:39:03 UTC 2018
Hello,
I want to restrict the number of incoming calls to my internal extensions to 1 per extension, because I don’t want to receive another call to an extension that is already in a call.
I tried setting the max_calls variable to 1 and adding this to the dialplan
<extension name="limit_exceeded">
<condition field="destination_number" expression="^limit_exceeded$">
<action application="playback" data="/sounds/overthelimit.wav"/>
<action application="hangup"/>
</condition>
</extension>
<extension name="limit" continue="true">
<condition>
<!-- You can set ${max_calls} per user in directory.conf and remove the line below -->
<action application="set" data="max_calls=1" inline="true"/>
<action application="limit" data="db $${domain} ${sip_auth_username} ${max_calls}"/>
</condition>
</extension>
Also I tried adding this to my dialplan where the condition matches my internal extensions
<action application="limit_execute" data="hash outbound carrier1 1 bridge {ignore_early_media=true}user/${dialed_extension}@${domain_name}" />
It works if I dial normally but if I do a conference conf dial {ignore_early_media=true,conference_member_flags=moderator}user/XXX@${domain_name} it always calls even if that user is already in a call.
How can I fix this? Thank you.
Kind regards,
Vlad Toma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180403/8f0aa832/attachment.html>
More information about the FreeSWITCH-users
mailing list