Freeswitch限制外呼并发

2020-04-15

Limit 限制呼叫

https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+Limit

限制网关当前呼叫量

1
2
3
4
5
6
<extension name="outbound">
<condition field="destination_number" expression="^0(\d+)$">
<action application="limit_execute" data="hash outbound carrier1 5 bridge sofia/gateway/carrier1/${destination_number}" />
<action application="limit_execute" data="hash outbound carrier2 5 bridge sofia/gateway/carrier2/${destination_number}" />
</condition>
</extension>

限制user 当前呼叫

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<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>

fusionpbx可以直接设置

image-20200116160849206

image-20200116160801014