Using the form at the right you can retrieve call detail records for your service account. Your service account number and password are not the same as a sip authorization ID and password you configure on your SIP equipment; your service account is a 9 digit number in the form 000-000-000.
You can choose the format of the records returned to you (in a new window) to be either HTML or XML. In the case of HTML a simple table is returned, which is easy to read on the screen and can be selected and pasted into another program such as Excel.
While XML may look complex, it is a very flexible data format which can interface to a variety of systems you may already have in place. You can also open an XML file in Microsoft Excel and use Excel to perform sorting and calculations on the data.
The format of the columns in an HTML table, and the fields in the case of XML, are exactly the same. Each XML record returned looks something like this:
<sip-auth>abc12d34</sip-auth>
<uid>21823</uid>
<utc-start>2005-10-24T08:04:48.5430000-07:00</utc-start>
<fdate>2005-10-24</fdate>
<ftime>8:4:48.543</ftime>
<location>India, Mobile - Orange</location>
<seconds>54</seconds>
<price>0.1539</price>
<called>919895612345</called>
<calling>abc12d34</calling>
<sip-auth> is the sip authorization code that placed this call. This typically corresponds with a phone or port on a sip device you have; it might correspond to a single customer if you are selling VOIP service.
<uid> is a unique identifier for each call record. This is guaranteed to increase for each call made over time. By paying attention to this number you can retrieve a call record history that starts where the previous history ended.
<utc-start> is a SQL datetime datatype which encodes the date and time (in UTC) of when the call began, down to the millisecond.
<fdate> and <ftime> offer the date information in a "formatted" style that can be used if you are printing bills for customers. Generally it is better to work with the <utc-start> field and use software to format the date and time according to your local conventions, but these "formatted" forms may be useful.
<location> is a description of the destination of the call; typically it is a country name and possibly a network operator name.
<seconds> is the number of seconds duration for the call.
<price> is the sip.ralden.com billing price for this call in US dollars.
<called> is the e.164 telephone number that was called. Note that because the phone number is represented here as a string of digits only, when this data is imported into a program like Excel the phone numbers will often display in scientific notation, because they are such large numbers. You can use cell formatting controls in Excel to make the phone numbers appear as normal strings of digits.
<calling> is the e.164 telephone number of the calling party. This is typically the same as the <sip-auth> for outbound calls, but it may be different if the account has been assigned an e.164 number as well as a <sip-auth>. If the call is inbound this may contain the caller ID data for the caller, if that information was available. If the call is from another sip.ralden.com "on network" party it will contain their <sip-auth> or e.164 number.
You can filter the results you get from a query by using certain SQL expressions in the box named filter. For example, in the simplest case, with no filter, you retrieve the records for all the calls you have ever made. If the highest <uid> in that batch of records was 21675 then the next time you query you might want to enter this into the filter box:
and uid > 21675
This will filter the next batch to only include records higher than 21675, the last record from the previous batch. The records come to you with the most recent record appearing first, so the highest uid value is always the first record in a batch.
Each record is tagged with the <sip-auth> which placed the call, so it is easy enough to retrieve all the records in one batch and sort them out separately on your own computer. However, if you want to retrieve a batch of records limited to the calls made from one <sip-auth> you can do so with the following filter:
and [sip-auth] = 'abc123def456'
the [ and ] around sip-auth are necesary because of the - character in the column name. You need to do the same thing if you use utc-start in a filter.
You can combine these filters in one query:
and [sip-auth] = 'abc123def456' and uid > 21675
And you can use certain SQL functions, as well as any of the other columns you find useful. For example:
and [utc-start] >= 'Jan 1, 2006'