Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 26, 2024 11:26 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: How to configure for surchange
PostPosted: Tue Dec 12, 2006 6:29 pm 
Offline

Joined: Tue Dec 12, 2006 6:17 pm
Posts: 2
I have to provide more than an access no. and some no. must have surcharge.

such as I have 1800-XXX-XXXX as toll fee number from outside my local
If anyone call to this access no. It will surcharge 10 cent per a calll immediately when user enter his PIN.

How to configure for surcharge :?:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 13, 2006 3:19 am 
Offline
User avatar

Joined: Sun Apr 02, 2006 5:29 am
Posts: 97
what you can do is create a ratecard which has a DNID PREFIX = 1800xxxx instead of DNID PREFIX = all and you can make the rates for this rate card to be 10 cents more for each destination...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 13, 2006 5:16 pm 
Offline

Joined: Tue Dec 12, 2006 6:17 pm
Posts: 2
:oops: I would like to charge immediately when user enter PIN number,
before he enter destination number.

Please see my operating flow

My flow:
1. User call to access no. (1800-xxx-xxxx for outside area, 123-xxx-xxxx for local area)
2. System play sound file language menu and user choose language
3. System play sound file for asking pin no. and user enter PIN (Card number in Asterisk2Billing web interface)
4. System will charge 10 cent for outside area and tell credit balance which is charged already

now, I use Asterisk2Billing version 1.2.3 (BrainCoral)

I saw in source code yesterday and I think this feature is unavailable.
so, I add this feature by myself.

I change method callingcard_ivr_authenticate, class A2Billing in Class.A2Billing.php,
add key surcharge_no and surcharge_fee in a2billing.conf

but I have another problem, Could you tell me how I can know the access number which user make a call?


Code:
...
if (($retries < 3) && $res==0) {
    //ast_cdr_setaccount(chan, username);

    /***** Start: Check toll fee no. number *****/
    if (is_array($this->agiconfig['surcharge_no'])) {

        foreach ($this->agiconfig['surcharge_no'] as $i => $surcharge_no) {
            $agi->verbose('line:'.__LINE__.' - '."Surcharge number ".$surcharge_no." fee ".$this->agiconfig['surcharge_fee'][$i]);

            // if access number have fee:
            //     $this->credit -= $surcharge_fee;
        }

        //Update credit
        $QUERY = "UPDATE cc_card SET credit=".$this->credit." WHERE username='".$this->username."'";
        $result = $this->instance_table -> SQLExec ($this->DBHandle, $QUERY, 0);
    }
    /***** End: Check toll fee no. number *****/

    if ($this->agiconfig['say_balance_after_auth']==1){
        if ($this->agiconfig['debug']>=1) $agi->verbose('line:'.__LINE__.' - '."[A2Billing] SAY BALANCE (".$this->agiconfig['say_balance_after_auth'].")\n");
        $this -> fct_say_balance ($agi, $this->credit);
    }

}
...



now, it work fine if I surcharge for every access no. but I want only outside no. will be charged.


Thank you for replying :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 4:28 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
if what you wnat to do is add a surcharge to some access numbers you don't need to change or modify the original software. you need to:

1. setup the surcharge numbers and their surcharge rate in the a2billing.conf in the agi-conf section

2. you need to properly call into a2biiling.php such that the DNID does not get lost because it is the DNID that is used to determine if the access number is to be charged a surcharge.

You don't have to modify the software to accomplish this task. Search the forum for how to actually do this especially how to pass the access number as the DNID

e.g. the 1800 number would be a have a surcharge and the 123.... number would not be included as a surcharge number

once again don't re-invent the wheel. read this post
http://forum.a2billing.net/viewtopic.ph ... light=dnid


Top
 Profile  
 
 Post subject: How to set surcharge rate to ratecard based on access number
PostPosted: Fri Jan 12, 2007 3:39 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
mohamed wrote:
what you can do is create a ratecard which has a DNID PREFIX = 1800xxxx instead of DNID PREFIX = all and you can make the rates for this rate card to be 10 cents more for each destination...


Mohamed, is there a easy way to set the etra charge for this rate card to be normal rate plus xcents per minute?

I hope i don't need to go through every destination and increase it's rate by 2 cents.

Please let me know?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 4:19 pm 
Offline
User avatar

Joined: Sun Apr 02, 2006 5:29 am
Posts: 97
Karie;

my understanding, you have to do this.. if you are have the original CSV file for the rate, just open it in excel other spreadsheet program and multiple it by 1.02 and import the CSV file back as new rate card with a DNID_PREFIX = 1888


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 5:12 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
There are two different methods for doing the extra billing.

#1) Is a connect fee, also known in industry as a bong charge. Billed only once during the call. You will see this is in the rates database as "connect charge" (also note availability of "disconnect charge).

#2) Is a surcharge, which is an additional fee that is associated with the inbound call based on the DID (DNID) and is found in a2billing as:

; Extracharge DIDs, multiple numbers and fees must be separated by comma
;extracharge_did=1800XXXXXXX,1888XXXXXXX
extracharge_did=
;extracharge_fee=0.02,0.03
extracharge_fee=

I assume this extracharge_fee is a per minute extra, but I'm not 100% sure. It almost sounds like the original poster was looking for something in the middle. A bong charge for a DID, which I do not think exists. This type of billing is typically required when the user is calling from a location requiring a one-time extra fee such as callling from a pay-phone.

You could do what Mohammed said and have the extra ratecard, but I think you want to add the bong charge or connect fee (as a one time shot) instead of increasing each minute by the value.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 8:40 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
Thank you for replying, i am not looking for a one off charge - i know i could do this with the connection charge. I want to add a per minute charge.

I tried using :

; Extracharge DIDs, multiple numbers and fees must be separated by comma
;extracharge_did=1800XXXXXXX,1888XXXXXXX
extracharge_did=
;extracharge_fee=0.02,0.03
extracharge_fee=

but it doesn't seem to make any difference, maybe i am not picking up the correct DID.

I have two numbers (12345 & 67890) dialing into my PSTN system which then gets connected to a2billing. if i set the DNID in the ratecard to 12345 or 67890 it doesn't recognise it and will not place any call made on th is ratecard.

Any idea where i am going wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 10:34 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Hey - just to make sure we're talking the same terms .... the DNID - The number you dial to get into the system from outside is what we're talking about .. such as in the USA 1800XXXXXXX. So if we are both talking about the DNID, then you need to make sure it is coming into the system properly that way. By checking the CLI, you can check that part. Look for agi_dnid and see what it displays. This is your DNID that is coming into A2B that you would be concerned with.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group