[Spce-user] Add time to call duration

Rene Krenn rkrenn at sipwise.com
Fri Jul 23 06:35:16 EDT 2021

Sry, should be


    - name: duration





Von: Rene Krenn [mailto:rkrenn at sipwise.com] 
Gesendet: Freitag, 23. Juli 2021 12:17
An: '[ EXT ] Rickey' <rickey58 at gmail.com>; spce-user at lists.sipwise.com
Betreff: Re: [Spce-user] Add time to call duration


For cdr exports, you can directly use transformation expressions In recent ngcp versions:


    - name: number

      enable: yes

      transformation: "sub {


  my ($value,$context) = @_;

  if ($value > 0.0) {

    return $value + 1.0;


  Return $value;


    - name: ...


You could theoretically also add expressions for „source_customer_cost“, to rate calls using your custom rating logic, while exporting.


But it might be easier i guess to solve that topic using the fees‘ „extra_second“ and „extra_rate“ parameters.




Von: [ EXT ] Rickey [mailto:rickey58 at gmail.com] 
Gesendet: Freitag, 23. Juli 2021 11:14
An: spce-user at lists.sipwise.com <mailto:spce-user at lists.sipwise.com> 
Betreff: [Spce-user] Add time to call duration


Good day,

Is it possible to add 1 second to the duration field of the accounting.cdr table for outgoing calls (successful ones, i.e. duration> 0s) and calculate the source_customer_cost on this basis?




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20210723/a24b5969/attachment-0002.html>

More information about the Spce-user mailing list