Details
-
Type:
New Feature
-
Status: Done
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
Description
hi, we create 5 trunks using the same Gateway,
every trunk has he own limit.
but when astpp launch the call it use limit_execute, example:
limit_execute(db FS-OUT gw_FS-OUT 20 bridge sofia/gateway/FS-OUT/5742792866)
we see this line repeat for every trunk call out, but there is a problem it use the same resource gw_FS-OUT for every call, so this not limit well.
you can check, calling from fs_cli limit_usage db FS-OUT gw_FS-OUT you see we always using the same counter for each trunk limit.
our solution was edit, astpp.xml.lua:
~~~lua
able.insert(xml, [[<action application="limit_execute" data="db ]]..outbound_info['path']..[[ gw_]]..outbound_info['path']..[[ ]]..outbound_info['maxchannels']..[[ bridge sofia/gateway/]]..outbound_info['path']..[[/]]..temp_destination_number..[["/>]]);
~~~
replace with, variable resource outbound_info['path'] with outbound_info['trunk_id']
~~~lua
able.insert(xml, [[<action application="limit_execute" data="db ]]..outbound_info['path']..[[ gw_]]..outbound_info['trunk_id']..[[ ]]..outbound_info['maxchannels']..[[ bridge sofia/gateway/]]..outbound_info['path']..[[/]]..temp_destination_number..[["/>]]);
~~~