Bug #257

Module Requires FreePBX 2.6.X (Trunk Balance interface broken on Trixbox 2.0.8.2)

Added by vbhoj74 about 2 years ago. Updated about 2 years ago.

Status:Reviewed Start:12/05/2009
Priority:Normal Due date:
Assigned to:patrick_elx % Done:

0%

Category:-
Target version:Trunk Cost Balancing Future Versions

Description

On the trixbox 2.8.x.x I can only find two lines under Add Trunk:
1. Trunk Description:
2. Trunk Destination: There are no option in this pull down menu, shows only "select".

It appears this is related to the dependancy on FreePBX 2.6


Related issues

related to Trunk Cost / Load Balancing - Bug #253: FreePBX disappears from screen when you go to the trunk balance UI Closed 12/01/2009

History

Updated by tshif about 2 years ago

  • Status changed from New to Reviewed
  • Assigned to changed from tshif to patrick_elx
  • Target version changed from Trunk Cost Balancing v 0.0.2 to Trunk Cost Balancing v 0.0.3

vbhoj74 - can you please attach a (reduced size) screen capture that shows exactly what you see? Patrick has a hard time reproducing these failures, and being able to see themis important.

Also, please use the "view source" functionin your browser and capture and post the complete htm of the page you get back.

Updated by patrick_elx about 2 years ago

Look like that the page stopped on an error at the displaying of the trunk.

Could you have a look at your log error page to see what was the issue.

The way the module is working, it's pulling the asterisk database, trunk table to find your list of trunks. Could be that request that went wrong or the results were not formated properly either.

Updated by vbhoj74 about 2 years ago

Here is the Source of the page:

</div> <!-- end content div so we can display rnav properly--> 

<!-- right side menu --> 
<div class="rnav"><ul> 
    <li><a id="current" href="config.php?display=trunkbalance">Add Load balanced Trunk</a></li> 
</ul></div> 

<div class="content"> 

    <h2>Add Balanced Trunk</h2> 

    <p style="width: 80%">Each Balanced Trunk is an outbound trunk associated with a set of parameters to define the maximum use you want to do with it. For instance you have a provider that gives you 100 minutes long distance calls per month. You can define here that after 100 minutes of local call during the month this trunk will become unavailable and your route will switch to the next trunk in line.</p> 

<form autocomplete="off" name="edit" action="" method="post" onsubmit="return edit_onsubmit();"> 
    <input type="hidden" name="display" value="trunkbalance"> 
    <input type="hidden" name="action" value="add"> 
    <table> 
    <tr><td colspan="2"><h5>Add Trunk<hr></h5></td></tr> 

    <tr> 
        <td><a href="#" class="info">Trunk Description:<span>Enter a description for this balanced trunk.</span></a></td> 
        <td><input type="text" name="description" value="" tabindex="1"></td> 
    </tr> 
       <tr> 
    <td><a href="#" class="info">Trunk Destination:<span>Select the destination trunk</span></a></td> 
    <td><SELECT id="desttrunk_id" name="desttrunk_id" tabindex="2"><OPTION VALUE="0">Select...</option><h1>FATAL ERROR</h1> 
<h3>SELECT * FROM `trunks` WHERE (name NOT LIKE 'BAL_%') AND (tech!='enum' AND tech!='dundi') ORDER BY tech, name [nativecode=1146 ** Table 'asterisk.trunks' doesn't exist]SQL - <br /> SELECT * FROM `trunks` WHERE (name NOT LIKE 'BAL_%') AND (tech!='enum' AND tech!='dundi') ORDER BY tech, name</h3> 

Updated by patrick_elx about 2 years ago

FATAL ERROR

That's when the sql query is made.
Could you have a look in your error log to see what apache, php or mysql sent back as error?

What's your PHP version and could you tell me what's the 'trunk' table structure in the asterisk db to see if the Trixbox freepbx fork has changed something in the table compared to the official freepbx version.?

Updated by tshif about 2 years ago

Hello vbhoj74 - can you please attach a (reduced size) screen capture that shows exactly what you see? It speeds to process of fixing the issues - and without it, the process takes longer - if it gets done at all.

Please provide requested screen shot.

Updated by patrick_elx about 2 years ago

No, in that case the screen shot is not needed, the source code of the page is what I needed.
It's not a display error, it looks like a database query error as indicated by the location of the FATAL ERROR

We need now to find out why the request is not working.
My guess now, is leading me to two possible issues:
- A differences in the 'trunks' table in freepbx 2.5 vs 2.6 making the sql request failed.
- a problem with the sql query function, but I thought that I had that covered already, but I may be wrong.

What I need is the error logs (http, error, ssl, ... ) to tell me exactly why you have this fatal error.

Updated by patrick_elx about 2 years ago

please try rev 12 I've just uploaded in the SVN.
I've changed the way the query is called to put it the same way than in freepbx 2.5 versions.

[edited] oops, I went too fast. Uploaded the wrong file. Wait a few minutes for svn rev 13
[edited] done

Updated by tshif about 2 years ago

No, in that case the screen shot is not needed, the source code of the page is what I needed.
It's not a display error, it looks like a database query error as indicated by the location of the FATAL ERROR

That doesnt mean that others dont want to see the screen shot. Unless you have some objection ;-)

Updated by patrick_elx about 2 years ago

Ok, just found out that the 'trunks' table is a new table that appears with freepbx 2.6
Then so far this module will work only with freepbx 2.6 or higher. :-(

I don't know if it worth it to backport to 2.5.

Updated by tshif about 2 years ago

It would be very nice if it would work on 2.5 - but - it does depend upon how time consuming the pre 2.6 support would take to re-engineer. Is it a big time investment?

Updated by bsau about 2 years ago

  • Target version changed from Trunk Cost Balancing v 0.0.3 to Trunk Cost Balancing Future Versions

Updated by bsau about 2 years ago

  • Subject changed from Trunk Balance interface broken on Trixbox 2.0.8.2 to Module Requires FreePBX 2.6.X (Trunk Balance interface broken on Trixbox 2.0.8.2)

Updated by vbhoj74 about 2 years ago

Please find the image here:

Patrick: I'm a newbie to linux and trixbox, thus a method to post results requested will be highly appreciated, it will also make me learn things. Else please bear the delay in posting as I figure out the method to find what you ask for .

- thanks.

Also available in: Atom PDF