[Spce-user] Peer billing?

Skyler skchopperguy at gmail.com
Tue Sep 27 11:57:52 EDT 2011


  Perfect. I'll check into those and try out a few ideas.

 If I copy the get_voip_account_fees() sub and make my own then add the
appropriate entry in Sipwise::Provisioning::Billing::DB will that be
enough to make it available in the API for testing or is there other
entries somewhere else I'll need to add?


On Tue, 2011-09-27 at 13:26 +0200, Daniel Tiefnig wrote:
> On 09/27/2011 12:39 PM, Skyler wrote:
> > Hi Daniel,
> Hi,
> > I have an idea about doing calculations from cdr to determine the
> > concurrent inbound call usage per upstream peer and having this
> > available via API. How can I learn more or where can I look at
> > existing code to learn about the way get_voip_account_fees is done in
> > ngcp API?
> The API is implemented in Perl, and installed on our systems via Debian
> packages to /usr/share/perl5/Sipwise. You'll be interested in the
> Sipwise::Provisioning::Billing and Sipwise::Provisioning::Billing::DB
> modules to see how get_voip_account_fees() works. The interesting part
> is in the "~DB" module, where you can find the SQL which retrieves the data.
> In destination_provider_id in the cdr table you will find the contract
> ID of the peering contract which you can use to filter the results. (It
> will be 0 for calls to the application server (voicebox, conference) and
> 1 for calls to local subscribers.) The destination_domain column will
> contain the peering server IP for calls leaving the system. Both could
> be an appropriate identifier for the function, the contract ID would
> make more sense from a billing perspective.
> > My goal is not really about fees, its about grouping and reporting
> > numbers that can be used to compare upstream billing; BUT if I can
> > create this using get_voip_account_fees structure as a reference, it
> > may be useful for others too.
> Sure it will. Think I thought about this myself, but never found the
> time to get it implemented.
> br,
> daniel

More information about the Spce-user mailing list