POSSA / freepbx-trunk-balancing

Restrict outbound calls or balance calls over multiple trunks based on user specified parameters
http://pbxossa.org/files/trunkbalance/
37 stars 30 forks source link

Allow multiple matching & non-matching rules #17

Closed lgaetz closed 11 years ago

lgaetz commented 11 years ago

user request: http://pbxinaflash.com/community/index.php?threads/possa-trunk-balancing-module.12532/#post-83287

Currently, matching rules and non-matching rules can only be a single pattern, used as part of the query: WHERE dst LIKE '<pattern>' If the fields were modified to accept multiple patterns separated by commas, they could be parsed and trimmed to generate: (WHERE dst LIKE '<pattern1>' AND/OR WHERE dst LIKE '<pattern2>') No way to know if user will want AND or OR behavior, so a checkbox to toggle either will have to be added. Should default to OR, I can't think of a use case for AND in this context.

markieb commented 11 years ago

Absolutely, that would be perfect. Yes I agree, defaulting to OR is ideal. By multiple patterns, I hope you mean more than 2 also? :)

lgaetz commented 11 years ago

Ver 1.1.1 (available for download now) allows multiple (more than 2) comma separated patterns to be used. This is tested and working on exactly one FreePBX 2.11 system at the moment. @markieb be aware that the change to version 1.1.0 marked a shift in the way that the floating billing period is calculated, newer versions are expecting user input in hours not days. Be sure to check your existing balanced trunks if upgrading.

Please report your results, thanks.

markieb commented 11 years ago

How amazing are you :)