Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Wed Apr 24, 2024 10:27 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: DIDs already allocated to other cards are shown in User GUI
PostPosted: Thu Jun 28, 2007 1:20 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
It's possible to get the database into an inconsistent state using the User GUI alone:
1) Admin: create a new DID
2) User: allocate the new DID to your card
3) User: EDIT your newly allocated DID and choose someone else's DID
At this point Admin->DID->List Destination shows two destinations with the same DID.

Unless I'm misunderstanding something the "Release DID" option is superfluous; allocated DIDs are released using the DELETE button next to them aren't they?

There's also a couple of less dangerous bugs when deleting a DID:
i) on the "if you really want to remove" confirmation screen the DID details shown are not necessarily for your card, although the correct record will be removed from the cc_did_destination table.
ii) After releasing the DID it's not set back to reserved='0', iduser='0', so the DID is not available to be allocated again. This particular bug also affects the Admin UI.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 8:29 pm 
Offline

Joined: Fri Apr 14, 2006 1:36 pm
Posts: 5
Stavros,

Please point me where to look for these options in the code, and if I manage to fix them, I'll post the solution here.

I'm not a programmer, but I'm willing to try at least. :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 27, 2007 4:50 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I've been trying to figure out exactly what needs changing myself. Starting from around line 176 of A2B_entity_did.php may help. It may also hinder.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 26, 2007 9:38 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
A quick and dirty work around is to put the numbers for each users in a DID group. This buys me time to figure out where the drop down list is populated.

regards


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 26, 2007 9:58 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I will take a look and let you know.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 27, 2007 8:59 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
asiby wrote:
I will take a look and let you know.


The would be great. I searched for a SQL query, but couldn't find one. It's no doubt an invalid where clause, but I couldn't find the code where the drop down got populated.

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 12:57 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Guys, let's celebrate. I have just fixed it. And discovered another bug that I have fixed to. The second bug was in the admin interface under DID usage.

Show: Dids in use (.) All Dids ( )

The show Dids in use was not accurately showing the correct DIDs.

In the customer interface, when you edit your DID, you will only be able to see DID's that you have purchases and that are assigned to your cardnumber.

I am making the patch right now against the trunk.

Oh, I have also hidden the "Delete" button. Cause there is no point delete a DID without releasing it. Cause that's what happen. You delete it, it will disappear from your DID list, but the DID is not released.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 1:30 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
asiby wrote:
Guys, let's celebrate.
In the customer interface, when you edit your DID, you will only be able to see DID's that you have purchases and that are assigned to your cardnumber.
:mrgreen2: You're the man, asiby. I look forward to the patch. :punk:

Quote:
Oh, I have also hidden the "Delete" button. Cause there is no point delete a DID without releasing it. Cause that's what happen. You delete it, it will disappear from your DID list, but the DID is not released.
I thought the same too initially, but I think I found the DID is released later by cron job.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 5:53 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Guys, here are the patches.

1. FG_var_diduse.inc.patch.tar.txt is for the admin interface. Make sure to move in the appropriate folder before running the command

Code:
patch FG_var_diduse.inc FG_var_diduse.inc.patch.tar.txt




2. FG_var_did.inc.patch.tar.txt is for the customer interface. Make sure to move in the appropriate folder before running the command

Code:
patch FG_var_did.inc FG_var_did.inc.patch.tar.txt


I will submit it to the track too.

I was just looking more closely at the problem of the delete button under the DID menu of the Customer UI. The truth is, on that page, the list called " - DID LIST -" should rather be called "Destination List". That particular fact makes users think that deleting what they believe to be a DID, they will also release that DID. But in fact, they would be deleting a destination. That will leave that DID without a destination until they choose to add a destination by clicking on the link "Add Phone Number to your DID".

Long story to say that I have reactivated the "delete" button in the patch and that I have changed the naming scheme to reflect that of the destinations instead of the DIDs.

[EDIT] : FG_var_diduse.inc.patch.txt reflects now the changes made by Stavros later in this thread.


Attachments:
File comment: Make sure to move in the appropriate folder before running the command:

patch FG_var_diduse.inc FG_var_diduse.inc.patch.tar.txt

FG_var_diduse.inc.patch.txt [2.3 KiB]
Downloaded 724 times
File comment: Make sure to move in the appropriate folder before running the command:

patch FG_var_did.inc FG_var_did.inc.patch.tar.txt

FG_var_did.inc.patch.txt [1.31 KiB]
Downloaded 674 times


Last edited by asiby on Fri Nov 30, 2007 6:15 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 12:37 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Thanks for your time looking at this Asiby.

The fix comitted at r432 and r433 fixes this problem to my satisfaction.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 4:41 pm 
Offline

Joined: Thu Nov 22, 2007 5:52 pm
Posts: 17
Hello,

thanks for your work asiby,

but what the exact directory please ?

thank you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 4:55 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
nazimou wrote:
but what the exact directory please ?
See here for the 'final' fix.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 5:07 pm 
Offline

Joined: Thu Nov 22, 2007 5:52 pm
Posts: 17
stavros wrote:
See here for the 'final' fix.


Thanks always for your help.

But I haven't understand what must I do to resolve the problem of did.

How can I proceed please ?

I do the changes directly or I download the files ?


Last edited by nazimou on Wed Nov 28, 2007 5:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 5:07 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
nazimou wrote:
Hello,
but what the exact directory please ?


It really depends on where you have decided to install the Admin UI and the Customer UI

/Path_To_Admin_UI/Public/form_data/FG_var_diduse.inc

and

/Path_To_Customer_UI/form_data/FG_var_did.inc

The directories are highlighted in red. Use cd to change directories until you are at the right place and apply the patch as described earlier.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 5:11 pm 
Offline

Joined: Thu Nov 22, 2007 5:52 pm
Posts: 17
asiby wrote:

It really depends on where you have decided to install the Admin UI and the Customer UI


/Path_To_Admin_UI/Public/form_data/FG_var_diduse.inc

and

/Path_To_Customer_UI/form_data/FG_var_did.inc


Thank you for your response but I must do all the changes of this http://trac.asterisk2billing.org/cgi-bi ... =%2F%40431 after I patch ?
Because I patched the files without make any change.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group