[Spce-user] Adding to CDR

Daniel Tiefnig dtiefnig at sipwise.com
Mon Nov 21 20:49:41 EST 2011


On 11/19/2011 09:22 PM, Skyler wrote:
> Hi,

Hej,

> How can I add peer_group_id to the CDR?

I'm not sure this is possible. What we have in the CDR is the
destination_provider_id / source_provider_id which is the contract ID of
the peering contract. This does not have to map 1:1 on a peering group,
but if you're using the contract only for one peering group, you could
use it to llok up the group.

Then we have destination_domain and source_domain, which I think should
usually contain the IP address of the peering host if calls are routed
to/from a peering. With this, you will be able to find the group, as IP
addresses have to be unique ATM.

In any case you'll need to modify /usr/sbin/cdr-exporter and add
peer_group_id to the @CDR_BODY_FIELDS array (at the end, I'd suggest)
and modify the SQL in the loop below to query the "voip_peer_groups.id
AS peer_group_id" and it will show up in the CDR output wherever you put
it in @CDR_BODY_FIELDS.

br,
daniel




More information about the Spce-user mailing list