Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 12:12 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Sip client wrong balance (not bug)
PostPosted: Tue Sep 09, 2008 6:10 am 
Offline

Joined: Fri Mar 02, 2007 7:05 pm
Posts: 82
Asterisk2Billing - Version 1.3.3 (Doudou08) - Release : 14 May 2008

Dialed in to server using trunks and was able to obtain access bill and proper balance.

Enabled sip client on the user and created a sip client on the user and I did get a balance on the user but it was $1025 USD

The highest balance I have on the entire server is $125.

I do not understand where it is pulling this number from.

I thought it was the user so I deleted the account and the sip info and enabled another account with a balance of $1.80 and again it was $1025 USD.

Ultimately I would like to have it announce no rate information for sip users.

Ideas?

Thank you

KieranMullen

Code:
  a2billing.php|1:     [failover_recursive_limit] => 2
  a2billing.php|1:     [maxtime_tocall_negatif_free_route] => 5400
  a2billing.php|1:     [send_reminder] => 1
  a2billing.php|1:     [record_call] =>
  a2billing.php|1:     [monitor_formatfile] => gsm
  a2billing.php|1:     [agi_force_currency] =>
  a2billing.php|1:     [currency_association] => Array
  a2billing.php|1:         (
  a2billing.php|1:             [0] => usd:dollars
  a2billing.php|1:             [1] => mxn:pesos
  a2billing.php|1:             [2] => eur:euros
  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:     [callback_bill_1stleg_ifcall_notconnected] => 1
  a2billing.php|1:     [logger_enable] => 1
  a2billing.php|1:     [log_file] => /tmp/a2billing.log
  a2billing.php|1:     [extracharge_buyfee] => Array
  a2billing.php|1:         (
  a2billing.php|1:             [0] => Array
  a2billing.php|1:         )
  a2billing.php|1:
  a2billing.php|1:     [international_prefixes] => Array
  a2billing.php|1:         (
  a2billing.php|1:             [0] => 011
  a2billing.php|1:             [1] => 09
  a2billing.php|1:             [2] => 00
  a2billing.php|1:         )
  a2billing.php|1:
  a2billing.php|1:     [currency_association_internal] => Array
  a2billing.php|1:         (
  a2billing.php|1:             [usd] => dollars
  a2billing.php|1:             [mxn] => pesos
  a2billing.php|1:             [eur] => euros
  a2billing.php|1:             [all] => credit
  a2billing.php|1:         )
  a2billing.php|1:
  a2billing.php|1:     [ivr_voucher_prefixe] => 8
  a2billing.php|1: )
  a2billing.php|1:
  a2billing.php|1: file:a2billing.php - line:78 - IDCONFIG : 1
  a2billing.php|1: file:a2billing.php - line:79 - MODE : standard
  a2billing.php|1: file:a2billing.php - line:91 - AGI Request:
  a2billing.php|1: file:a2billing.php - line:92 - Array
  a2billing.php|1: (
  a2billing.php|1:     [agi_request] => a2billing.php
  a2billing.php|1:     [agi_channel] => SIP/5683894692-a025ad50
  a2billing.php|1:     [agi_language] => en
  a2billing.php|1:     [agi_type] => SIP
  a2billing.php|1:     [agi_uniqueid] => 1220934168.495
  a2billing.php|1:     [agi_callerid] => 5683894692
  a2billing.php|1:     [agi_calleridname] => Kieran Mullen
  a2billing.php|1:     [agi_callingpres] => 0
  a2billing.php|1:     [agi_callingani2] => 0
  a2billing.php|1:     [agi_callington] => 0
  a2billing.php|1:     [agi_callingtns] => 0
  a2billing.php|1:     [agi_dnid] => 19712262015
  a2billing.php|1:     [agi_rdnis] => unknown
  a2billing.php|1:     [agi_context] => a2billing
  a2billing.php|1:     [agi_extension] => 19712262015
  a2billing.php|1:     [agi_priority] => 3
  a2billing.php|1:     [agi_enhanced] => 0.0
  a2billing.php|1:     [agi_accountcode] => 5683894692
  a2billing.php|1: )
  a2billing.php|1:
  a2billing.php|1: file:Class.A2Billing.php - line:621 -  get_agi_request_parameter = 5683894692 ; SIP/5683894692-a025ad50 ; 1220934168.495 ; 5683894692 ; 19712262015
  a2billing.php|1: file:a2billing.php - line:141 - [ANSWER CALL]
  a2billing.php|1: file:Class.A2Billing.php - line:1439 - [CID_ENABLE - CID_CONTROL - CID:5683894692]
  a2billing.php|1: file:Class.A2Billing.php - line:1456 - QUERY = 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='5683894692'
  a2billing.php|1:  RESULT : Array
  a2billing.php|1: (
  a2billing.php|1:     [0] => Array
  a2billing.php|1:         (
  a2billing.php|1:             [0] => 5683894692
  a2billing.php|1:             [cid] => 5683894692
  a2billing.php|1:             [1] => 1647
  a2billing.php|1:             [id_cc_card] => 1647
  a2billing.php|1:             [2] => t
  a2billing.php|1:             [activated] => t
  a2billing.php|1:             [3] => 0.23000
  a2billing.php|1:             [credit] => 0.23000
  a2billing.php|1:             [4] => 6
  a2billing.php|1:             [tariff] => 6
  a2billing.php|1:             [5] => t
  a2billing.php|1:             [6] => 0
  a2billing.php|1:             [inuse] => 0
  a2billing.php|1:             [7] => 0
  a2billing.php|1:             [simultaccess] => 0
  a2billing.php|1:             [8] => 1
  a2billing.php|1:             [typepaid] => 1
  a2billing.php|1:             [9] => 1000
  a2billing.php|1:             [creditlimit] => 1000
  a2billing.php|1:             [10] => en
  a2billing.php|1:             [language] => en
  a2billing.php|1:             [11] => 1896084325
  a2billing.php|1:             [username] => 1896084325
  a2billing.php|1:             [12] => 0
  a2billing.php|1:             [removeinterprefix] => 0
  a2billing.php|1:             [13] => 15036298406
  a2billing.php|1:             [redial] => 15036298406
  a2billing.php|1:             [14] => 0
  a2billing.php|1:             [enableexpire] => 0
  a2billing.php|1:             [15] => 0
  a2billing.php|1:             [UNIX_TIMESTAMP(expirationdate)] => 0
  a2billing.php|1:             [16] => 0
  a2billing.php|1:             [expiredays] => 0
  a2billing.php|1:             [17] => 1
  a2billing.php|1:             [nbused] => 1
  a2billing.php|1:             [18] => 1220931746
  a2billing.php|1:             [UNIX_TIMESTAMP(firstusedate)] => 1220931746
  a2billing.php|1:             [19] => 0
  a2billing.php|1:             [UNIX_TIMESTAMP(cc_card.creationdate)] => 0
  a2billing.php|1:             [20] => usd
  a2billing.php|1:             [currency] => usd
  a2billing.php|1:             [21] =>
  a2billing.php|1:             [lastname] =>
  a2billing.php|1:             [22] =>
  a2billing.php|1:             [firstname] =>
  a2billing.php|1:             [23] =>
  a2billing.php|1:             [email] =>
  a2billing.php|1:             [24] =>
  a2billing.php|1:             [uipass] =>
  a2billing.php|1:             [25] => 0
  a2billing.php|1:             [id_campaign] => 0
  a2billing.php|1:             [26] => 1647
  a2billing.php|1:             [id] => 1647
  a2billing.php|1:             [27] => 1896084325
  a2billing.php|1:             [useralias] => 1896084325
  a2billing.php|1:         )
  a2billing.php|1:
  a2billing.php|1: )
  a2billing.php|1:
  a2billing.php|1: file:Class.A2Billing.php - line:1714 - [SET LANGUAGE() en]
  a2billing.php|1: file:Class.A2Billing.php - line:654 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='1896084325']
  a2billing.php|1: file:Class.A2Billing.php - line:1969 - [A2Billing] SAY BALANCE : 1000.23
  a2billing.php|1:
  a2billing.php|1: file:Class.A2Billing.php - line:1148 - [CURRENCY : usd]
    -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
    -- <SIP/5683894692-a025ad50> Playing 'digits/1' (language 'en')
    -- <SIP/5683894692-a025ad50> Playing 'digits/thousand' (language 'en')
    -- Playing 'dollars' (escape_digits=#) (sample_offset 0)
    -- Playing 'vm-and' (escape_digits=#) (sample_offset 0)
    -- <SIP/5683894692-a025ad50> Playing 'digits/20' (language 'en')
    -- <SIP/5683894692-a025ad50> Playing 'digits/3' (language 'en')
    -- Playing 'prepaid-cents' (escape_digits=#) (sample_offset 0)
  a2billing.php|1: file:Class.A2Billing.php - line:1400 - [AUTO SetCallerID]
  a2billing.php|1: file:Class.A2Billing.php - line:1406 - [REQUESTED SetCallerID : 5683894692]
  a2billing.php|1: file:Class.A2Billing.php - line:1417 - [EXEC SetCallerID : 5683894692]
  a2billing.php|1: file:a2billing.php - line:172 - [CHANNEL STATUS : 6 = Line is up]
  a2billing.php|1: file:a2billing.php - line:173 - [CREDIT : 1000.23][CREDIT MIN_CREDIT_2CALL : 0]
  a2billing.php|1: file:Class.A2Billing.php - line:676 -  &&  && 11&& 0
    -- <SIP/5683894692-a025ad50> Playing 'prepaid-enter-dest' (language 'en')


Added after 11 minutes:

FYI When the sip list is regenerated and reloaded it says "Asterisk has been reload! " perhaps it should read "Asterisk has been reloaded!

Thank you!

KM


Last edited by kieranmullen on Tue Sep 09, 2008 7:52 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 6:55 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Your log message show that you have set the credit limit to 1000. So this is a normal behavior. For postpaid accounts, A2Billing simply adds the credit limit to the actual account balance and work with the resulting value.

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 7:52 am 
Offline

Joined: Fri Mar 02, 2007 7:05 pm
Posts: 82
Thank you for the response. I guess it was good I posted the log after all.

For the card in question in user details
CARD TYPE = PREPAID
Credit limit & INITIAL BALANCE for the user is empty

I found the 1k limit in the config file and changed that at the same time I also changed
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid = PREPAY
OK

So the SIP Friend and the Card say they are linked but are not really linked then

it was creating a new card since it did nto recognize the username (even though it was on the friends list)

So I changed

; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid = PREPAY

; if the callerID is captured on a2billing, this option will create automatically a new card and add the callerID to it
cid_auto_create_card = NO

Finally i added the usergame I was give by the sip friends and added it to the caller Id field and it worked fine.

If they are linked should the system take the login name as the card number?

If they are not linked when creating a sip friend why bother asking for a ID CARD?

I am sure it was something I overlooked.

Any ideas on the voice menu disabled for sip based users versus card users so sip users can just pickup and dial?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 12:07 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
1. You have to disable callerid authentication when using sip or iax2 accounts. This way, no need to add its username in the card's callerid

2. If you where already using CID authentication for other things, than you need to start using different [agi-confnn] for each scenario.

3. To disable the voices prompt, use play_audio = NO


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 9 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