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

Calls hang up all the time
http://forum.asterisk2billing.org/viewtopic.php?f=16&t=8536
Page 2 of 2

Author:  sopel1000 [ Wed Feb 02, 2011 10:40 am ]
Post subject:  Re: Calls hang up all the time

Hi Joe,

thanks I do not know why, but the rate simulator does not work in my case - it shows "Error Card!!!", BUT I uploaded the rates again after checking if everything is ok, and now it connects calls. :laugh: Of course, I set CID Enable to "no".

But, there is one question - if my user is a Prepaid user and his balance hits 0, why would the a2b not disconnect the call? Is there a way to do that?

Author:  jroper [ Wed Feb 02, 2011 10:44 am ]
Post subject:  Re: Calls hang up all the time

Hi

Check you are selecting a card which has a valid call plan, and is active.

A2Billing will disconnect the call when the balance hits 0.

Billing procedure:-

1. ID Customer, and therefor callplan
2. Match dialled digits to longest rate in the callplan's rates
3. Calculate maximum call time based on customer balance and rate to destination.
4. make call with the L parameter to limit the length of the call.
5. Asterisk forcibly hangs up the call when the time limit it reached.
6. Balance updated.

Joe

Author:  sopel1000 [ Wed Feb 02, 2011 11:36 am ]
Post subject:  Re: Calls hang up all the time

Dear Joe,

You are great ;-) :mrgreen2: Yesterday I did call someone and I managed to do a negative balance. Today you wrote that it should not happen because the call limit is set all the time... and in fact it is, today it worked.

Three last things:

1)
in the log, I can see it was announcing the time I have left BEFORE the connection:
Code:
a2billing.php,1: file:Class.A2Billing.php - line:760 - TIMEOUT::> 67  : minutes=1 - seconds=7
    -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
    -- <SIP/1000-00000011> Playing 'digits/1.gsm' (language 'en')
    -- Playing 'prepaid-minute' (escape_digits=#) (sample_offset 0)
    -- Playing 'vm-and' (escape_digits=#) (sample_offset 0)
    -- <SIP/1000-00000011> Playing 'digits/7.gsm' (language 'en')
    -- Playing 'prepaid-seconds' (escape_digits=#) (sample_offset 0)


But - I did not hear that. What is more, when I had negative balance or not enough balance, in logs I could see:
Code:
    -- Playing 'prepaid-no-enough-credit' (escape_digits=#) (sample_offset 0)


but again I did not hear that on the phone.


2) During the call it was announcing "You have... 61 seconds", "You have... 31 seconds". Is there a way to, for example, limit these announcments to only one - and, let's say, not 31 or 61 sec before end, but 10 or 15?

3) Thanks :-)

Author:  jroper [ Wed Feb 02, 2011 12:31 pm ]
Post subject:  Re: Calls hang up all the time

Problems of not hearing audio are generally caused by NAT or Codecs, other than that I cannot offer any advice, assuming you have installed asterisk correctly.

The L parameter in the dial command parameters in the agi-conf controls the point at which the messages are played. see http://www.voip-info.org/tiki-index.php ... k+cmd+dial

Joe

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