Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 4:52 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Edit other customers DID's
PostPosted: Sun Oct 29, 2006 10:14 pm 
Offline

Joined: Sun Oct 29, 2006 10:06 pm
Posts: 1
Hi all,

I've tried google, the docs and the forum, but have to been able to figure this out:

When I log on to my 'user' account and go to DID, I see the DID number that was assigned to my account. When I click 'edit', to change the destination, the DID pulldown allows me to select DID numbers that have been assigned to other accounts already.

Maybe I am mis-interpreting the functionality, but after selecting a specific DID to change the destination, the only fields I need are 'destination' and 'voip_call', and maybe 'priority'.

Why is this pulldown there and why can I select numbers that are assigned to other accounts? Better yet: How can I turn this off without loosing the possibility of changing the destination alltogether?

Any light on this would be greatly appreciated.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 1:03 am 
Offline

Joined: Tue Nov 21, 2006 12:49 am
Posts: 2
Location: Sheffield, United Kingdom
We noticed the same problem when setting up A2Billing. I believe it's a bug in A2Billing.

I don't think a user should be able to pick a DID that has been assigned to another user.

In our case, what we did was disable the DID functionality in the User Interface all together.
Users need to call our Customer Support to change the DID destination.

Use the following setting within a2billing.conf

; Enable the DID (Direct Inward Dialing) interface - yes or no
did=no

If anyone knows how to prevent users from choosing DIDs from the Drop-Down box, please let us know.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 1:40 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
skybaba - my understanding is what you've got is what it is. That the DID portions aren't complete, but I hear that they may be in the upcoming release. ??

I don't think I'd go beating myself up about it. But if you find something otherwise, please share it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 1:46 am 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
I noticed the same exact thing - all DID's are seen by all the customers, even assigned ones. I'm too waiting and hoping for another version.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 1:53 am 
Offline

Joined: Tue Nov 21, 2006 12:49 am
Posts: 2
Location: Sheffield, United Kingdom
Thanks Guys!!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 1:21 am 
Offline

Joined: Thu Aug 10, 2006 10:47 pm
Posts: 145
Location: LA,CA,USA
You guys will be happy to know that I saw this...and I didn't like it....so I fixed it...patch will be up later today :D

EDIT--

Hmm.....sorry for the delay....but i had to look through my version of A2Billing and figure out what the hell i changed that was relevant to this....since i did TONS of changes on my version....anyhoo if you have any issues post them here because i'm not sure if i'll post the whole fix...the first time... :oops:

Here we go!

../a2billingcustomer/A2B_entity_did.php

Change Line 37
Code:
if (strlen($destination)>0  && is_numeric($choose_did) && is_numeric($voip_call)){

      $FG_DID_TABLE  = "cc_did";
      $FG_DID_FIELDS = "did";
      $instance_sub_table = new Table($FG_DID_TABLE, $FG_DID_FIELDS);

      $QUERY = "INSERT INTO cc_did_destination (activated, id_cc_card, id_cc_did, destination, priority, voip_call) VALUES ('0', '".$_SESSION["card_id"]."', '".$choose_did."', '".$destination."', '1', '".$voip_call."')";

      $result = $instance_sub_table -> SQLExec ($HD_Form -> DBHandle, $QUERY, 0);

      $date = date("D M j G:i:s T Y", time());
      $message = "\n\n".gettext("The following Destinaton-DID has been added:")."\n\n";
      $message .= "$QUERY";

      // email header
      $em_headers  = "From: A2BILLING ALERT <a2billing_alert@localhost>\n";
      $em_headers .= "X-Priority: 3\n";

      if (strlen($A2B->config["webcustomerui"]['error_email'])>3)
      mail($A2B->config["webcustomerui"]['error_email'], "[$date] Destinaton-DID notification", $message, $em_headers);

}


TO
Code:
if (strlen($destination)>0  && is_numeric($choose_did) && is_numeric($voip_call)){

      $FG_DID_TABLE  = "cc_did";
      $FG_DID_FIELDS = "did";
      $instance_sub_table = new Table($FG_DID_TABLE, $FG_DID_FIELDS);

      $result = mysql_query("SELECT * FROM cc_did_destination where id_cc_did = ".$choose_did);
      $row = mysql_fetch_row($result);
      
      if($choose_did==$row[2])
      {
         $QUERY = "UPDATE cc_did_destination SET activated='1', id_cc_card='".$_SESSION["card_id"]."', id_cc_did='".$choose_did."', destination='".$destination."', priority='1', voip_call='".$voip_call."'";
         $DID_UID_QUERY .= "UPDATE cc_did SET iduser='".$_SESSION["card_id"]."' WHERE id='".$choose_did."'";
         $added = false;
      }
      else
      {
         $QUERY = "INSERT INTO cc_did_destination (activated, id_cc_card, id_cc_did, destination, priority, voip_call) VALUES ('0', '".$_SESSION["card_id"]."', '".$choose_did."', '".$destination."', '1', '".$voip_call."')";
         $DID_UID_QUERY .= "UPDATE cc_did SET iduser='".$_SESSION["card_id"]."' WHERE id='".$choose_did."'";
         $added = true;
      }

      //echo "QUERY = ".$QUERY."<br>";
      //echo "DID_UID_QUERY = ".$DID_UID_QUERY."<br>";
      $result = $instance_sub_table -> SQLExec ($HD_Form -> DBHandle, $QUERY, 0);
      $DID_UID_result = $instance_sub_table -> SQLExec ($HD_Form -> DBHandle, $DID_UID_QUERY, 0);

      if ($added)
      {
         $date = date("D M j G:i:s T Y", time());
         $message = "\n\n".gettext("The following Destinaton-DID has been added:")."\n\n";
         $message .= "$QUERY";

         // email header
         $em_headers  = "From: A2BILLING ALERT <a2billing_alert@localhost>\n";
         $em_headers .= "X-Priority: 3\n";

         if (strlen($A2B->config["webcustomerui"]['error_email'])>3)
         mail($A2B->config["webcustomerui"]['error_email'], "[$date] Destinaton-DID notification", $message, $em_headers);
      }
}


Change Line 154
Code:
$FG_TABLE_CLAUSE = " id_cc_country=$choose_country and id_cc_didgroup='".$_SESSION["id_didgroup"]."' and cc_did.activated='1'";


TO
Code:
$FG_TABLE_CLAUSE = " id_cc_country=$choose_country and id_cc_didgroup='".$_SESSION["id_didgroup"]."' and cc_did.activated='1' and cc_did.iduser='0'";


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 1:54 pm 
Offline

Joined: Fri Apr 20, 2007 1:48 pm
Posts: 18
Location: france
thanks for the patch :)

I've done the modification but now I can't select the country.
do you where it can come from?

thanks


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

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

I have a problem - when I want to delete the DID from the customer interface, it gets deleted, but the iduser field in cc_did table does not get updated back to 0 (so that the DID is marked as available).

Can anyone point me where should I look and add the correct update clause?

Thanks!

Dejan


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

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
dkurel wrote:
but the iduser field in cc_did table does not get updated back to 0 (so that the DID is marked as available).
I think this part of freeing the DID for usage once more is accomplished by the cron job at: /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_bill_diduse.php


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group