Start a new topic

Billing cost per call.

 Its possible to obtain a large amount of info about calls using the API - though I'm unable to obtain billing information other than number of seconds billed for calls. Is there any way or planned way to o this?


Hi Jaco,


Unfortunately, those API calls used to generate invoices etc are not publically available. However, You should be able to use this XML construct to get back the calls with the amounts for each call:


<?xml version="1.0" encoding="UTF-8"?>

<XML>

<Tenant>

    <Name>Euphoria</Name>

    <Auth></Auth>

</Tenant>

<ActionName>GetOutboundCallingHistory</ActionName>

<pageSize>100</pageSize>

<startAt>0</startAt>

<startDate>2017-06-01</startDate>

<endDate>2017-06-10</endDate>

<extension>210</extension>

</XML>


RAW:

<?xml version='1.0' encoding='UTF-8'?>

<XML TotalRows="49">

 <CDR>

  <uID><![CDATA[  ]]></uID>

  <Extension><![CDATA[210]]></Extension>

  <Duration><![CDATA[275]]></Duration>

  <DialedNumber><![CDATA ]]></DialedNumber>

  <StartTime><![CDATA[2017-06-09 14:22:46]]></StartTime>

  <Status><![CDATA[1]]></Status>

  <CallBill><![CDATA[3.344]]></CallBill>

 </CDR>

 <CDR>

  <uID><![CDATA[  ]]></uID>

  <Extension><![CDATA[210]]></Extension>

  <Duration><![CDATA[51]]></Duration>

  <DialedNumber><![CDATA[ ]]></DialedNumber>

  <StartTime><![CDATA[2017-06-09 14:12:19]]></StartTime>

  <Status><![CDATA[1]]></Status>

  <CallBill><![CDATA[0.30039]]></CallBill>

 </CDR>

 <CDR>

  <uID><![CDATA[  ]]></uID>

  <Extension><![CDATA[210]]></Extension>

  <Duration><![CDATA[225]]></Duration>

  <DialedNumber><![CDATA[  ]]></DialedNumber>

  <StartTime><![CDATA[2017-06-09 11:39:10]]></StartTime>

  <Status><![CDATA[1]]></Status>

  <CallBill><![CDATA[2.14039]]></CallBill>

 </CDR>

 <CDR>

  <uID><![CDATA[  ]]></uID>

  <Extension><![CDATA[210]]></Extension>

  <Duration><![CDATA[92]]></Duration>

  <DialedNumber><![CDATA[  ]]></DialedNumber>

  <StartTime><![CDATA[2017-06-09 10:06:57]]></StartTime>

  <Status><![CDATA[1]]></Status>

  <CallBill><![CDATA[1.11872]]></CallBill>

 </CDR>


What you are looking for is <CallBill>, you should be able to sum that right?





1 person likes this

Hi Bryan, 


We made the new API.dll live today, you should be able to get it from the TMS. Under downloads and dev tools. We are just updating the docs but you can get the file so long. The readme file needs an update too.


1 person likes this

the signature for GetOutboundCallingHistory


public XmlDocument GetOutboundCallingHistory(int PageSize, int StartAt, bool OnlyAnswered, DateTime startDate, DateTime endDate, string filter);


doesn't include an extension parameter

(the action name reference suggests there is

http://support.euphoria.co.za/support/solutions/articles/3000026789-api-actionname-reference
but it's probably out of synch? which is fine..)


but is there a syntax to specify in the filter which will only look at extensions.

eg. if filter == "100" it will return all numbers dialled that include 100 from every extension


which is useful but can filter be something like "ext:100" to only return outbound from that extension?


Including the tenant, i.e. "100-Tenant" didn't quite work -took a guess :)  


Hi Jaco,


Please could you clarify what you mean by calls? do you need to see inbound and outbound? Please let me know what you would like to achieve at the end and I will see if we can accomodate you with an API query. 

Hi Bryan,


It seems like we need to issue an updated api.dll, we are working on this and I will let you know when it is up for you to use.

Sorry for the delay.

No worries and thank you for the feedback. WIll wait for that then.

On the TMS presently its possible to obtain transaction history from Billing and Accounts -> Transaction History - any invoice -> View button

This generates a form via [PrintInvoice.asp] with information such as Outbound Calling Cost and DID monthly etc.


We're wondering if there is a way using the API to access this information, or alternatively the calculations involved in determining the final invoice. We can calculate these ourselves easily enough based on the standard rates, but the issue comes in with calculating prorata costs and when those would be appropriate to calculate.

Thank, you, Tim. Integrated and tested and it works super nicely. 

Fantastic! Let me know if there are any other issues :)

Login or Signup to post a comment