Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 5:31 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: subject: charge rate based on incoming number
PostPosted: Tue Jan 16, 2007 4:15 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
This is the latest development on this issue. The following information i get from asterisk_info.php.

Now i am able to get the calls coming on both line but eventhough i have set extracharge_fee = 0.02 (see a2billing.php|2) it still is not being charge.

Can someone please have a look below and let me know where i am going wrong. Why is the additional charge not being applied even though a2billing.php|1 & a2billing.php|2 are being called separately.


Thanks.



***************************
Asterisk 1.2.12.1 built by

Verbosity is at least 1
a2billing.php|1: [monitor_formatfile] => gsm
a2billing.php|1: [base_currency] => GBP
a2billing.php|1: [agi_force_currency] =>
a2billing.php|1: [currency_association] => Array
a2billing.php|1: (
a2billing.php|1: [0] => usd:prepaid-dollar
a2billing.php|1: [1] => mxn:pesos
a2billing.php|1: [2] => eur:euro
a2billing.php|1: [3] => all:credit
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|1: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|1: [currency_association_internal] => Array
a2billing.php|1: (
a2billing.php|1: [usd] => prepaid-dollar
a2billing.php|1: [mxn] => pesos
a2billing.php|1: [eur] => euro
a2billing.php|1: [all] => credit
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: AGI Request:
a2billing.php|1: Array
a2billing.php|1: (
a2billing.php|1: [agi_request] => a2billing.php
a2billing.php|1: [agi_channel] => Zap/32-1
a2billing.php|1: [agi_language] => de
a2billing.php|1: [agi_type] => Zap
a2billing.php|1: [agi_uniqueid] => 116894XXXX.67
a2billing.php|1: [agi_callerid] => 079547XXXXX
a2billing.php|1: [agi_calleridname] => unknown
a2billing.php|1: [agi_callingpres] => 3
a2billing.php|1: [agi_callingani2] => 0
a2billing.php|1: [agi_callington] => 33
a2billing.php|1: [agi_callingtns] => 0
a2billing.php|1: [agi_dnid] => 43XXXX
a2billing.php|1: [agi_rdnis] => unknown
a2billing.php|1: [agi_context] => custom-callingcard
a2billing.php|1: [agi_extension] => s
a2billing.php|1: [agi_priority] => 4
a2billing.php|1: [agi_enhanced] => 0.0
a2billing.php|1: [agi_accountcode] =>


Uptime
System uptime: 11 hours, 59 minutes, 13 seconds
Last reload: 1 hour, 8 minutes, 2 seconds
Verbosity is at least 1
a2billing.php|1:
a2billing.php|1: line:490 get_agi_request_parameter = 075467XXXXX ; Zap/32-1 ; 1480XXX08.67 ; ; s
a2billing.php|1: line:138 - [ANSWER CALL]
a2billing.php|1: line:1283 - [CID_ENABLE - CID_CONTROL - CID:078XXXX657]
a2billing.php|1: line:1299 - SELECT cc_callerid.cid, cc_callerid.id_cc_card, cc_callerid.activated, cc_card.credit, cc_card.tariff, cc_card.activated, cc_card.inuse, cc_card.simultaccess, cc_card.typepaid, cc_card.creditlimit, cc_card.language, cc_card.username, removeinterprefix, cc_card.redial, enableexpire, UNIX_TIMESTAMP(expirationdate), expiredays, nbused, UNIX_TIMESTAMP(firstusedate), UNIX_TIMESTAMP(cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email, cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias FROM cc_callerid LEFT JOIN cc_card ON cc_callerid.id_cc_card=cc_card.id LEFT JOIN cc_tariffgroup ON cc_card.tariff=cc_tariffgroup.id WHERE cc_callerid.cid='07557XXXXXXX'
a2billing.php|1: line:1302 - Array
a2billing.php|1: line:1760 - [A2Billing] SAY BALANCE (1)
a2billing.php|1:



**********************************************


Asterisk 1.2.12.1 built by on a i686 running Linux on
Verbosity is at least 1

a2billing.php|2: [cid_auto_create_card_credit] => 0
a2billing.php|2: [cid_auto_create_card_credit_limit] => 1
a2billing.php|2: [cid_auto_create_card_tariffgroup] => 11
a2billing.php|2: [callerid_authentication_over_cardnumber] =>
a2billing.php|2: [sip_iax_friends] =>
a2billing.php|2: [sip_iax_pstn_direct_call_prefix] => 9
a2billing.php|2: [sip_iax_pstn_direct_call] =>
a2billing.php|2: [extracharge_did] => Array
a2billing.php|2: (
a2billing.php|2: [0] =>
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [extracharge_fee] => Array
a2billing.php|2: (
a2billing.php|2: [0] => 0.02
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [dialcommand_param] => |30|HL(%timeout%:61000:30000)
a2billing.php|2: [dialcommand_param_sipiax_friend] => |30|HL(3600000:61000:30000)
a2billing.php|2: [switchdialcommand] =>
a2billing.php|2: [maxtime_tocall_negatif_free_route] => 54
a2billing.php|2: [send_reminder] => 1
a2billing.php|2: [record_call] =>
a2billing.php|2: [monitor_formatfile] => gsm
a2billing.php|2: [base_currency] => GBP
a2billing.php|2: [agi_force_currency] =>
a2billing.php|2: [currency_association] => Array
a2billing.php|2: (
a2billing.php|2: [0] => usd:prepaid-dollar
a2billing.php|2: [1] => mxn:pesos
a2billing.php|2: [2] => eur:euro
a2billing.php|2: [3] => all:credit
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|2: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|2: [currency_association_internal] => Array
a2billing.php|2: (
a2billing.php|2: [usd] => prepaid-dollar
a2billing.php|2: [mxn] => pesos
a2billing.php|2: [eur] => euro
a2billing.php|2: [all] => credit
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: AGI Request:
a2billing.php|2: Array
a2billing.php|2: (
a2billing.php|2: [agi_request] => a2billing.php
a2billing.php|2: [agi_channel] => Zap/32-1
a2billing.php|2: [agi_language] => de
a2billing.php|2: [agi_type] => Zap
a2billing.php|2: [agi_uniqueid] => 116XXXXX0.63
a2billing.php|2: [agi_callerid] => 0757XXXXXXXXXX
a2billing.php|2: [agi_calleridname] => unknown
a2billing.php|2: [agi_callingpres] => 3
a2billing.php|2: [agi_callingani2] => 0
a2billing.php|2: [agi_callington] => 33
a2billing.php|2: [agi_callingtns] => 0
a2billing.php|2: [agi_dnid] => 84XXXXXX
a2billing.php|2: [agi_rdnis] => unknown
a2billing.php|2: [agi_context] => custom-FPAccess
a2billing.php|2: [agi_extension] => s
a2billing.php|2: [agi_priority] => 4
a2billing.php|2: [agi_enhanced] => 0.0
a2billing.php|2: [agi_accountcode] =>
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: line:490 get_agi_request_parameter = 07657XXXXXXX ; Zap/32-1 ; 1168XXXXX0.63 ; ; s
a2billing.php|2: line:138 - [ANSWER CALL]
a2billing.php|2: line:1283 - [CID_ENABLE - CID_CONTROL - CID:076XXXXX57]
a2billing.php|2: line:1299 - SELECT cc_callerid.cid, cc_callerid.id_cc_card, cc_callerid.activated, cc_card.credit, cc_card.tariff, cc_card.activated, cc_card.inuse, cc_card.simultaccess, cc_card.typepaid, cc_card.creditlimit, cc_card.language, cc_card.username, removeinterprefix, cc_card.redial, enableexpire, UNIX_TIMESTAMP(expirationdate), expiredays, nbused, UNIX_TIMESTAMP(firstusedate), UNIX_TIMESTAMP(cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email, cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias FROM cc_callerid LEFT JOIN cc_card ON cc_callerid.id_cc_card=cc_card.id LEFT JOIN cc_tariffgroup ON cc_card.tariff=cc_tariffgroup.id WHERE cc_callerid.cid='0757XXXXXXXXX'
a2billing.php|2: line:1302 - Array
a2billing.php|2: line:1760 - [A2Billing] SAY BALANCE (1)
a2billing.php|2:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 6:47 pm 
Offline

Joined: Wed Mar 15, 2006 8:46 am
Posts: 109
Please check,

in a2billing.conf

; 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=2

in your real dnid:

a2billing.php|2: [agi_dnid] => 84XXXXXX


Top
 Profile  
 
 Post subject: Not with SIP/IAX friends either
PostPosted: Wed May 02, 2007 5:48 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I just found out today that the extra charges are not applied at all if you have the following options enabled in your config:
sip_iax_friends=YES
sip_iax_pstn_direct_call=YES

A bit of a surprise that one! Watch out folks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 5:37 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
The toll-free number doesn't want to answered as a DID.
You've got it launching a2billing.php in DID mode, so it searches for a destination to forward the call to and fails. Try invoking standard mode, as you did for the first call in your trace.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 8:49 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
It also seems you have more than one configuration in the a2billing.conf file: AGI-CONF1, AGI-CONF2, etc.

During the first call the extracharge_did array looks correct. Notice that when you call back on the 1-888 number there were no entries in this array. You need to make sure your list of extra charges is in the same config section you specify in the dialplan.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 9:16 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Show us the updated debug log first. If you've corrected your earlier mistakes it must be failing in some other way; we need to see an updated debug log so we know what the problem is now.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 9:51 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I've been misunderstanding what you are trying to do.

I just tested some things at my end and I'm not sure extracharge_did does what you expect. It doesn't seem to be activated for DID calls at all, only for calls in standard mode. It's for adding extra charges to toll-free numbers used as access numbers, not DIDs.

I don't know of a way of billing a DID an extra charge like this with A2B as it currently stands, sorry.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 10:30 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
That functionality exists and works well. I tested it earlier.

I can't make it work again however, which is cause for concern. Oh well, I'm tired. I might take a look at this again tomorrow.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 21, 2007 3:34 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I couldn't make it won't because I was overlooking that in the AGI-CONF section I was using I had neglected to disable SIP/IAX friends.

Once I corrected that it all works as expected.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 9:10 am 
Offline

Joined: Tue Sep 04, 2007 8:24 am
Posts: 35
anyboday can write the full changes which we should do to have different rates? :(
as it's so confusing now after reading all these replies!! :?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 12:12 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Earlier in this thread the entire solution was recapped.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 12, 2007 8:29 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I've described my config in my post over here.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 06, 2007 2:06 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
callingcard wrote:
a2billing.php|3: [extracharge_did] => Array
a2billing.php|3: (
a2billing.php|3: [0] => 18882471611
a2billing.php|3: )

a2billing.php|3: [agi_dnid] => 1010
You're dialing 1010, so why would the rule for 18882471611 apply?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 06, 2007 6:28 pm 
Offline

Joined: Thu Aug 23, 2007 8:31 pm
Posts: 38
Location: Vancouver, BC, Canada
Just my 2 cent...

Could you try use the real access number in stead of pri1 and pri2?

e.g.

Code:
context=18003337777


in extensions.conf

Code:
[18003337777]
......


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 06, 2007 9:20 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
My 2 cents too :lol:

I may be wrong, but I believe that this problem is due to the fact that many people "do not" connected the DID's extension directly to a2billing.php. Instead, they will have some extensions like 1010, 1020, ... where the AGI is actually called a2billing.php

So basically, the asterisk extension for the DID (1800.....) will use the GOTO command to send asterisk to another extension where the AGI will be executed. By that time, some information are lost or cannot simply apply. I believe that the callerID, the DNID or the Dialed Extension are some of them.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group