asterisk2billing.org
http://forum.asterisk2billing.org/

wrong rate announced
http://forum.asterisk2billing.org/viewtopic.php?f=34&t=9675
Page 1 of 1

Author:  amart [ Mon Mar 26, 2012 1:38 am ]
Post subject:  wrong rate announced

Hello,

When the inital rate ends in zero (eg. 0.80, 0.70), the system announces (says) the rate as "0 dollars and 8 cents" instead of "0 dollars and 80 cents". It seems the system is truncating the number. I set the system to logging = 4 and looked over the log but don't see any information on say rate. I do see it in the asterisk log where it is playing the files and it is using the eight instead of the eighty.

Where should I go from here to troubleshoot this issue?

TIA

Author:  GeekBoy [ Thu Apr 12, 2012 7:41 am ]
Post subject:  Re: wrong rate announced

What about putting verbosity_level to level 4?

Author:  GeekBoy [ Thu Apr 12, 2012 7:55 am ]
Post subject:  Re: wrong rate announced

I just did and here are the results where 0.015 becomes 0.01:


Quote:
[2012-04-12 02:47:06] VERBOSE[15879] res_agi.c: -- Playing 'prepaid-cost-call' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:08] VERBOSE[15879] file.c: -- <SIP/1000-0000007e> Playing 'digits/0.ulaw' (language 'en')
[2012-04-12 02:47:09] VERBOSE[15879] res_agi.c: -- Playing 'dollar' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:10] VERBOSE[15879] file.c: -- <SIP/1000-0000007e> Playing 'digits/1.ulaw' (language 'en')
[2012-04-12 02:47:10] VERBOSE[15879] res_agi.c: -- Playing 'prepaid-cent' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:11] VERBOSE[15879] res_agi.c: -- Playing 'prepaid-per-minutes' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:12] VERBOSE[15879] res_agi.c: -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:13] VERBOSE[15879] file.c: -- <SIP/1000-0000007e> Playing 'digits/60.ulaw' (language 'en')
[2012-04-12 02:47:14] VERBOSE[15879] file.c: -- <SIP/1000-0000007e> Playing 'digits/6.ulaw' (language 'en')
[2012-04-12 02:47:15] VERBOSE[15879] res_agi.c: -- Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:16] VERBOSE[15879] res_agi.c: -- Playing 'vm-and' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:16] VERBOSE[15879] file.c: -- <SIP/1000-0000007e> Playing 'digits/40.ulaw' (language 'en')
[2012-04-12 02:47:17] VERBOSE[15879] res_agi.c: -- Playing 'prepaid-seconds' (escape_digits=#) (sample_offset 0)
[2012-04-12 02:47:18] VERBOSE[15879] res_agi.c: a2billing.php,1: file:a2billing.php - line:572 - uniqueid:1334216798.127 - ANSWER fct callingcard_ivr authorize:> 1

Author:  dcitelecom [ Wed Jan 13, 2016 5:29 pm ]
Post subject:  Re: wrong rate announced

I can confirm this and can't believe the bug still exists in 2016. If the rate ends in 0 the rate is announced as cents not dollars so $0.60 is 6 cents not 60 cents.

Author:  GeekBoy [ Mon Jan 25, 2016 10:12 pm ]
Post subject:  Re: wrong rate announced

It's not a bug, but a setting in the system you need to change.

If you look up my profile, I had gone over this before with jroper a few years ago in another thread.

Author:  dcitelecom [ Mon Jan 25, 2016 11:53 pm ]
Post subject:  Re: wrong rate announced

First. Thanks for your reply. I thought this forum is dead with all the SPAM and almost no replies to any question.

Second. Thanks for the suggestion and I'll try setting the "play_rate_cents_if_lower_one" parameter but even if this fixes my issue it's still a bug if you look at it logically since the rate announcement for 61 cents is $0 dollars 61 cents, whereas the rate announcement for 60 cents is $0 dollars, 6 cents and that is wrong no matter how you look at it.

Author:  GeekBoy [ Tue Jan 26, 2016 12:30 am ]
Post subject:  Re: wrong rate announced

No problem.

I have not messed with a2b in a while and setting up a new install myself and wanted to see what is going on in the forum, plus I need to refresh my memory on some of the items.

But, yes it does seem a lot more dead here lately.


I realized I needed to make that setting myself. I was going to post it here, but see you have it already figured out.

I think there is another option to not announce the leading zero, but I can't remember.

I am still trying to figure out how to add an announcement, and a dial option for something like "Press nine for customer service"

jroper was very vague on that.

Author:  dcitelecom [ Tue Jan 26, 2016 1:45 pm ]
Post subject:  Re: wrong rate announced

I think you would do that outside a2billing i.e. in the dialplan before you call a2billing
e.g.

[a2billing]
exten => _X.,1,NoOP(play announcement for cust service)
....
exten => _X.,n,NoOP(a2b start)
exten => _X.,n,AGI(a2billing.php,1)
exten => _X.,n,Hangup

Author:  GeekBoy [ Tue Jan 26, 2016 3:20 pm ]
Post subject:  Re: wrong rate announced

Yes thanks for that response.

What mentioned was also suggested, but the problem with that is once you enter the a2b script, that option to call customer service (or whatever else) is no longer available.

Author:  jroper [ Tue Jan 26, 2016 5:21 pm ]
Post subject:  Re: wrong rate announced

Hi

Quote:
What mentioned was also suggested, but the problem with that is once you enter the a2b script, that option to call customer service (or whatever else) is no longer available.


You can put a dummy DID in to A2Billing, such as 123, which in turn is directed to either a SIP or local destination, then it's accessible once a2billing.php is called.


Joe

Author:  GeekBoy [ Wed Jan 27, 2016 12:16 am ]
Post subject:  Re: wrong rate announced

Hey, thanks jroper.

Now what about adding the announcement?

I would rather rather have it in the a2b script rather than the asterisk context, so all the available options can be heard over again.

Author:  jroper [ Wed Jan 27, 2016 9:57 am ]
Post subject:  Re: wrong rate announced

Hi

You'd have to do it in an A2Billing context, then loop them back into A2Billing again to make a call.

Alternatively, you could replicate a lot of the functions, such as asking for PIN etc in Asterisk dialplan, and then only passing the call into A2Billing once authenticated and they have entered the number they want to call. We have done that for other customers in the long distant past, for much the same reasons as you state.

Joe

Author:  GeekBoy [ Thu Jan 28, 2016 4:59 pm ]
Post subject:  Re: wrong rate announced

Thanks a lot for the tips.

Glad to see the board back up.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/