MasterVitronic / fusionpbx

Automatically exported from code.google.com/p/fusionpbx
0 stars 0 forks source link

function outbound_route_to_bridge bug #279

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an outbound route and gateway
2. Disable them (mark "Enabled = false")
3.

What is the expected output? What do you see instead?

The function outbound_route_to_bridge check in DB the dialplan but it takes the 
old disabled route.

What version of the product are you using? On what operating system?

Centos 6.2, latest svn

Please provide any additional information below.

In the file includes/lib_switch.php, the function outbound_route_to_bridge 
create the sql:

        $sql = "select * from v_dialplans ";
        $sql .= "where domain_uuid = '".$domain_uuid."' ";
        $sql .= "and app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' ";
        $sql .= "order by dialplan_order asc ";

the query should contain the condition dialplan_enabled=true:

       $sql = "select * from v_dialplans ";
        $sql .= "where domain_uuid = '".$domain_uuid."' ";
        $sql .= "and app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' ";
        $sql .= "and dialplan_enabled = true ";
        $sql .= "order by dialplan_order asc ";

Original issue reported on code.google.com by carlo.di...@gmail.com on 18 Jul 2012 at 4:53

GoogleCodeExporter commented 9 years ago
Carlo thanks for pointing this out I've fixed it in revision 2694.

Original comment by markjcrane@gmail.com on 19 Jul 2012 at 4:44

GoogleCodeExporter commented 9 years ago
Sorry Mark, I forgot to insert the quotes in query. This should be:

        $sql .= "and dialplan_enabled = 'true' ";

thanks

Original comment by carlo.di...@gmail.com on 19 Jul 2012 at 8:42