First of all thank you for the reply, but I am using verto communicator and it doesn't have call waiting. I have to limit the number of calls from the server, the max_calls option works for bridging but if I originate the call from a conference using conference dial user/XXX@domain the max_calls doesn't work anymore.

Kind regards, 
Vlad 

On Wed, Apr 4, 2018, 6:15 PM <royj@yandex.ru> wrote:
Another approach is to disable "call waiting" feature on the phone.
 
03.04.2018, 19:09, "Vlad Toma" <vldtoma@gmail.com>:

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

,

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org