[Spce-user] Billing not working

Walter Klomp walter at myrepublic.net
Wed Feb 24 08:52:54 EST 2021


Hi Viraj

Try removing all the $ from the lines. That denotes end of line which
doesn’t match your patterns. Also check the destination regex. I think you
mean to put a . Before the last +

For instance

^31.+,^31.+,out,"National","National",3,1,0.011,1,3,1,0.011,1,0,prefix,,0,,0,0

Should match the first call that failed.



On Wed, 24 Feb 2021 at 15:39, Viraj Balgobind <ideatells at outlook.com> wrote:

> Hi Walter, Matthias,
>
>
>
> I changed the CSV according to the format of Matthias. With the following
> as result: (I also tried it with “” on the source and destination)
>
>
>
>    1. *Rates*
>
>
>
>
> ^31.+$,^31+$,out,"National","National",3,1,0.011,1,3,1,0.011,1,0,prefix,,0,,0,0
>
> ^31.+$,^31112+$,out,"National","National",0,1,0,1,0,1,0,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^3114+$,out,"National","National",3,1,0.045,1,3,1,0.045,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^316+$,out,"National","National",3,1,0.045,1,3,1,0.045,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^316350+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^31660+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^3167+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
> ^31.+$,^31800+$,out,"National","National",0,1,0,1,0,1,0,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^3184+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^31842+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^3185+$,out,"National","National",3,1,0.011,1,3,1,0.011,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^3187+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^3188+$,out,"National","National",3,1,0.011,1,3,1,0.011,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^319+$,out,"National","National",1.3,1,1.3,1,1.3,1,1.3,1,0,prefix,,0,,0,0
>
>
> ^31.+$,^31970+$,out,"National","National",3,1,0.045,1,3,1,0.045,1,0,prefix,,0,,0,0
>
>
>
>
>
>
>
> *2) I started rat-o-mat and checked the log, the following was giving as
> output:*
>
>
>
>
>
> Feb 24 08:25:14 spce (info) ngcp-rate-o-mat[10717]: WARNING: 1/24 - rating
> CDR ID 60 aborted  (retry 1): FATAL: No outbound fee info for profile 3 and
> source user '31853XXXXXX' or user/domain '31853XXXXXX at 62.XXX.XXX.XX' and
> destination user '31704XXXXXX' or user/domain '31704XXXXXX at voip.my.com'
> found
>
> Feb 24 08:25:14 spce (info) ngcp-rate-o-mat[10717]: WARNING: 1/24 - rating
> CDR ID 61 aborted  (retry 1): FATAL: No outbound fee info for profile 3 and
> source user '31853XXXXXX' or user/domain '31853XXXXXX at 62.XXX.XXX.XX' and
> destination user '31704XXXXXX' or user/domain '31704XXXXXX at voip.my.com'
> found
>
> Feb 24 08:25:14 spce (info) ngcp-rate-o-mat[10717]: WARNING: 1/24 - rating
> CDR ID 62 aborted  (retry 1): FATAL: No outbound fee info for profile 3 and
> source user '31853XXXXXX' or user/domain '31853XXXXXX at 62.XXX.XXX.XX' and
> destination user '31704XXXXXX' or user/domain '31704XXXXXX at voip.my.com'
> found
>
> Feb 24 08:25:14 spce (info) ngcp-rate-o-mat[10717]: WARNING: 1/24 - rating
> CDR ID 63 aborted  (retry 1): FATAL: No outbound fee info for profile 3 and
> source user '31853XXXXXX' or user/domain '31853XXXXXX at 62.XXX.XXX.XX' and
> destination user '31704XXXXXX' or user/domain '31704XXXXXX at voip.my.com'
> found
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: FATAL: 1/24 - rating
> CDR ID 3 aborted (failed 3 times), please fix it manually: FATAL: No
> outbound fee info for profile 5 and source user '31853XXXXXX' or
> user/domain '31853XXXXXX at 62.XXX.XXX.XX'
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Trying to
> connect to billing db...
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Successfully
> connected to duplication db...
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Trying to
> connect to provisioning db...
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Successfully
> connected to provisioning db...
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Trying to
> connect to accounting db...
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Successfully
> connected to accounting db...
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: local cdr cash
> balance column model loaded
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: local cdr
> relation column model loaded
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: local cdr time
> balance column model loaded
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: local cdr tag
> column model loaded
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Up and running.
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Grabbed 24 CDRs
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 3
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 6
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 9
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 10
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 11
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 12
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 14
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 24
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 26
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 30
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 31
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 38
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 39
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 40
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 41
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 44
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 49
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 55
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 56
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 59
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 60
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 61
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 62
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 63
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Batch of 0 CDRs
> completed. 0 CDRs rated overall so far.
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: There were 24
> failed CDRs, sleep 30
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Grabbed 24 CDRs
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 3
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 6
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 9
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 10
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 11
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 12
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 14
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 24
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 26
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 30
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 31
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 38
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 39
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 40
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 41
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 44
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 49
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 55
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 56
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 59
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 60
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 61
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 62
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 63
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Batch of 0 CDRs
> completed. 0 CDRs rated overall so far.
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: There were 24
> failed CDRs, sleep 30
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: Grabbed 24 CDRs
>
> Feb 24 08:25:44 spce (info) ngcp-rate-o-mat[10717]: INFO: 1/24 - rate CDR
> ID 3
>
>
>
> *3) In the Web GUI I see the following:*
>
>
>
>
>
>
>
>
>
> It looks like there is no match on the rates what I uploaded to the
> billing profile. The right billing profile is applied to the peer and
> subscriber.
>
>
>
> Kind regards,
>
> VIraj
>
> *From:* Walter Klomp <walter at myrepublic.net>
> *Sent:* Tuesday, 23 February 2021 18:00
> *To:* Viraj Balgobind <ideatells at outlook.com>
> *Cc:* spce-user at lists.sipwise.com
> *Subject:* Re: [Spce-user] Billing not working
>
>
>
> Rate-O-mat isn’t running. Try to start it with service ngcp-rate-o-mat
> start
>
>
>
> Things should appear in the log file pointing you where the problem is.
>
>
>
> On Tue, 23 Feb 2021 at 21:38, Viraj Balgobind <ideatells at outlook.com>
> wrote:
>
> Dear,
>
>
>
> I am facing an issue with applying a billing profile to my subscribers and
> peers.
>
>
>
> I applied the billing profile to my peers and customer, but the rates are
> not applied to my calls.
>
>
>
> I used a CSV to upload my rates. An example is one the following:
>
>
>
> .,^35526490,out, VoIP, VoIP,3,1,0.233333333,1,3,1,0.233333333,1,0,prefix
>
> .,^35526523,out, VoIP, VoIP,3,1,0.233333333,1,3,1,0.233333333,1,0,prefix
>
> .,^35526563,out, VoIP, VoIP,3,1,0.233333333,1,3,1,0.233333333,1,0,prefix
>
>
>
> I checked the following logs:
>
>
>
> root at spce:/var/log/ngcp# cat cdr.log
>
> Feb 23 12:37:23 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 145.623999 CDR/sec
>
> Feb 23 12:47:06 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 6857 us.
>
> Feb 23 12:47:06 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 145.836372 CDR/sec
>
> Feb 23 12:47:49 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 7676 us.
>
> Feb 23 12:47:49 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 130.276186 CDR/sec
>
> Feb 23 12:48:12 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 0 CDRs was 2176 us.
>
> Feb 23 12:48:12 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 0.000000 CDR/sec
>
> Feb 23 12:48:22 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 6967 us.
>
> Feb 23 12:48:22 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 143.533802 CDR/sec
>
> Feb 23 12:48:25 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 0 CDRs was 1353 us.
>
> Feb 23 12:48:25 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 0.000000 CDR/sec
>
> Feb 23 12:48:35 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 6205 us.
>
> Feb 23 12:48:35 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 161.160355 CDR/sec
>
> Feb 23 13:13:08 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 6586 us.
>
> Feb 23 13:13:08 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 151.837230 CDR/sec
>
> Feb 23 13:17:41 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 0 CDRs was 1706 us.
>
> Feb 23 13:17:41 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 0.000000 CDR/sec
>
> Feb 23 13:17:51 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 5205 us.
>
> Feb 23 13:17:51 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 192.122959 CDR/sec
>
> Feb 23 13:23:24 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 7136 us.
>
> Feb 23 13:23:24 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 140.134529 CDR/sec
>
> Feb 23 13:23:27 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 8149 us.
>
> Feb 23 13:23:27 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 122.714443 CDR/sec
>
> Feb 23 13:23:50 spce (info) mediator[1081]: mediator.c:442 [main]: Runtime
> for loop processing 1 callids and generating 1 CDRs was 7276 us.
>
> Feb 23 13:23:50 spce (info) mediator[1081]: mediator.c:443 [main]: Total
> CDR creation rate 137.438153 CDR/sec
>
> root at spce:/var/log/ngcp# cat rate-o-mat.log
>
> root at spce:/var/log/ngcp#
>
>
>
> This is what I see when I click on customers in the menu. It looks like it
> is applied to the customer.
>
>
>
>
>
> Could you help me out with this issue?
>
>
>
> Kind regards,
>
> Viraj
>
> --
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/mailman/listinfo/spce-user_lists.sipwise.com
>
> --
>
>
>
> Warmest Regards,
>
>
> <https://myrepublic.com.sg/>
>
> *Walter Klomp*
>
> Head of Voice & Systems
>
> MyRepublic Limited
>
> T: +65 6816 1120
>
> F: +65 6717 2031
>
>
>
> MyRepublic Limited
>
> 11 Lorong 3 Toa Payoh Block B
> <https://www.google.com/maps/search/11+Lorong+3+Toa+Payoh+Block+B?entry=gmail&source=g>
> Jackson Square
>
> #04-11/15 Singapore 319579
>
>
> myrepublic.com.sg
>
> Follow us on: Twitter <https://twitter.com/myrepublic> | Facebook
> <https://facebook.com/myrepublicsg> | LinkedIn
> <https://www.linkedin.com/company/myrepublic>
>
>
>
>
> *The contents of this email and any attachments are confidential and may
> also be privileged. You must not disseminate the contents of this email and
> any attachments without permission of the sender. If you have received this
> email by mistake, please delete all copies and inform the sender
> immediately. You may refer to our company's Privacy Policy here
> <https://myrepublic.net/sg/legal/terms-of-use-policies/privacy-policy/>.*
>
-- 

Warmest Regards,

<https://myrepublic.com.sg/>
*Walter Klomp*
Head of Voice & Systems
MyRepublic Limited
T: +65 6816 1120
F: +65 6717 2031

MyRepublic Limited
11 Lorong 3 Toa Payoh Block B Jackson Square
#04-11/15 Singapore 319579

myrepublic.com.sg
Follow us on: Twitter <https://twitter.com/myrepublic> | Facebook
<https://facebook.com/myrepublicsg> | LinkedIn
<https://www.linkedin.com/company/myrepublic>

-- 
The contents of this email and any attachments are confidential and may 
also be privileged. You must not disseminate the contents of this email and 
any attachments without permission of the sender. If you have received this 
email by mistake, please delete all copies and inform the sender 
immediately. You may refer to our company's Privacy Policy here 
<https://myrepublic.net/sg/legal/terms-of-use-policies/privacy-policy/>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20210224/42e1d647/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 6295 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20210224/42e1d647/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 20757 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20210224/42e1d647/attachment-0003.png>


More information about the Spce-user mailing list