[Spce-user] Query for report

Michael Molina saudadez at hotmail.com
Mon Oct 17 04:50:48 EDT 2011

Trying to create a query that will show the shopuser (as account number), customer name, customer last name, customer street address, city and zip code. It is important to fetch also the values for the phone numbers associated with this account as customers can have several phone numbers (subscribers) linked to them. I am using the program Navicat Premium to connect to the mySQL server and hence being able to create the query and from the query create the report. I have made a query by using the tables "customers" field "contact_id" and "contracts" field "id" from the database "billing", if you join them and run the query you get the information required but I can not find a way to fetch the DIDs associated with each account. I looked everywhere, "provisioning", "kamailio" even accounting but that one only shows the cdrs. I believed I could have gotten what we need in the "billing" database table "voip_numbers" but to no avail. The idea is perhaps to select for instance, a "shopuser" and get the CDRs for that customer, weather he has one or ten phone numbers. Maybe for billing purposes or traffic control even load control. It does not matter, the point is being able to create a report that can be printed and possibly select inbound and outbound traffic for a specific customer. I would really love and appreciate some help in the matter. Thank you all.
Michael Molina 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20111017/4ae02896/attachment.html>

More information about the Spce-user mailing list