Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sun Apr 28, 2024 5:31 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: A2Billing.php - line:719 - ERROR ::> RateEngine
PostPosted: Tue Sep 04, 2007 7:45 am 
Offline

Joined: Thu Aug 23, 2007 8:31 pm
Posts: 38
Location: Vancouver, BC, Canada
My first test, failed to make calls.

Here is the CLI log. Please help.

Thanks.




-- Executing [333@default:1] NoOp("SIP/2007-09481150", "Incoming call from # 2007") in new stack
-- Executing [333@default:2] Wait("SIP/2007-09481150", "2") in new stack
-- Executing [333@default:3] DeadAGI("SIP/2007-09481150", "a2billing.php") in new stack
[Sep 4 00:38:59] WARNING[2850]: res_agi.c:2089 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php: A2Billing AGI internal configuration:
a2billing.php: Array
a2billing.php: (
a2billing.php: [debug] => 1
a2billing.php: [asterisk_version] => 1_2
a2billing.php: [answer_call] => 1
a2billing.php: [play_audio] => 1
a2billing.php: [say_goodbye] =>
a2billing.php: [play_menulanguage] =>
a2billing.php: [force_language] =>
a2billing.php: [intro_prompt] =>
a2billing.php: [min_credit_2call] => 0
a2billing.php: [min_duration_2bill] => 0
a2billing.php: [notenoughcredit_cardnumber] => 1
a2billing.php: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php: [use_dnid] =>
a2billing.php: [no_auth_dnid] => Array
a2billing.php: (
a2billing.php: [0] => 2400
a2billing.php: [1] => 2300
a2billing.php: )
a2billing.php:
a2billing.php: [number_try] => 3
a2billing.php: [force_callplan_id] =>
a2billing.php: [say_balance_after_auth] => 1
a2billing.php: [say_balance_after_call] =>
a2billing.php: [say_rateinitial] =>
a2billing.php: [say_timetocall] => 1
a2billing.php: [auto_setcallerid] => 1
a2billing.php: [force_callerid] =>
a2billing.php: [cid_sanitize] =>
a2billing.php: [cid_enable] =>
a2billing.php: [cid_askpincode_ifnot_callerid] => 1
a2billing.php: [cid_auto_assign_card_to_cid] => 1
a2billing.php: [cid_auto_create_card] =>
a2billing.php: [cid_auto_create_card_len] => 10
a2billing.php: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php: [cid_auto_create_card_credit] => 0
a2billing.php: [cid_auto_create_card_credit_limit] => 1000
a2billing.php: [cid_auto_create_card_tariffgroup] => 6
a2billing.php: [callerid_authentication_over_cardnumber] =>
a2billing.php: [sip_iax_friends] =>
a2billing.php: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php: [sip_iax_pstn_direct_call] =>
a2billing.php: [ivr_voucher] =>
a2billing.php: [ivr_voucher_prefix] => 8
a2billing.php: [jump_voucher_if_min_credit] =>
a2billing.php: [extracharge_did] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [extracharge_fee] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
a2billing.php: [dialcommand_param_sipiax_friend] => |60|HL(3600000:61000:30000)
a2billing.php: [switchdialcommand] =>
a2billing.php: [failover_recursive_limit] => 2
a2billing.php: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php: [send_reminder] =>
a2billing.php: [record_call] =>
a2billing.php: [monitor_formatfile] => gsm
a2billing.php: [agi_force_currency] =>
a2billing.php: [currency_association] => Array
a2billing.php: (
a2billing.php: [0] => usd:dollars
a2billing.php: [1] => mxn:pesos
a2billing.php: [2] => eur:euros
a2billing.php: [3] => all:credit
a2billing.php: )
a2billing.php:
a2billing.php: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php: [logger_enable] => 1
a2billing.php: [log_file] => /tmp/a2billing.log
a2billing.php: [currency_association_internal] => Array
a2billing.php: (
a2billing.php: [usd] => dollars
a2billing.php: [mxn] => pesos
a2billing.php: [eur] => euros
a2billing.php: [all] => credit
a2billing.php: )
a2billing.php:
a2billing.php: [ivr_voucher_prefixe] => 8
a2billing.php: )
a2billing.php:
a2billing.php: file:a2billing.php - line:75 - IDCONFIG : 1
a2billing.php: file:a2billing.php - line:76 - MODE : standard
a2billing.php: file:a2billing.php - line:88 - AGI Request:
a2billing.php: file:a2billing.php - line:89 - Array
a2billing.php: (
a2billing.php: [agi_request] => a2billing.php
a2billing.php: [agi_channel] => SIP/2007-09481150
a2billing.php: [agi_language] => en
a2billing.php: [agi_type] => SIP
a2billing.php: [agi_uniqueid] => 1188891537.1
a2billing.php: [agi_callerid] => 2007
a2billing.php: [agi_calleridname] => 2007
a2billing.php: [agi_callingpres] => 0
a2billing.php: [agi_callingani2] => 0
a2billing.php: [agi_callington] => 0
a2billing.php: [agi_callingtns] => 0
a2billing.php: [agi_dnid] => 333
a2billing.php: [agi_rdnis] => unknown
a2billing.php: [agi_context] => default
a2billing.php: [agi_extension] => 333
a2billing.php: [agi_priority] => 3
a2billing.php: [agi_enhanced] => 0.0
a2billing.php: [agi_accountcode] =>
a2billing.php: )
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:601 - get_agi_request_parameter = 2007 ; SIP/2007-09481150 ; 1188891537.1 ; ; 333
a2billing.php: file:a2billing.php - line:138 - [ANSWER CALL]
a2billing.php: file:Class.A2Billing.php - line:1797 - Requesting DTMF, CARDNUMBER_LENGTH_MAX 15
-- <SIP/2007-09481150> Playing 'prepaid-enter-pin-number' (language 'en')
a2billing.php: file:Class.A2Billing.php - line:1799 - RES DTMF : 1993218661
a2billing.php: file:Class.A2Billing.php - line:1803 - CARDNUMBER ::> 1993218661
a2billing.php: file:Class.A2Billing.php - line:1826 - QUERY = SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, 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, cc_card.id_campaign, cc_card.id, useralias FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id WHERE username='1993218661'
a2billing.php: Array
a2billing.php: (
a2billing.php: [0] => Array
a2billing.php: (
a2billing.php: [0] => 10.00000
a2billing.php: [credit] => 10.00000
a2billing.php: [1] => 0
a2billing.php: [tariff] => 0
a2billing.php: [2] => t
a2billing.php: [activated] => t
a2billing.php: [3] => 0
a2billing.php: [inuse] => 0
a2billing.php: [4] => 1
a2billing.php: [simultaccess] => 1
a2billing.php: [5] => 0
a2billing.php: [typepaid] => 0
a2billing.php: [6] => 0
a2billing.php: [creditlimit] => 0
a2billing.php: [7] => en
a2billing.php: [language] => en
a2billing.php: [8] =>
a2billing.php: [removeinterprefix] =>
a2billing.php: [9] =>
a2billing.php: [redial] =>
a2billing.php: [10] => 0
a2billing.php: [enableexpire] => 0
a2billing.php: [11] => 1504492823
a2billing.php: [UNIX_TIMESTAMP(expirationdate)] => 1504492823
a2billing.php: [12] => 0
a2billing.php: [expiredays] => 0
a2billing.php: [13] => 0
a2billing.php: [nbused] => 0
a2billing.php: [14] => 0
a2billing.php: [UNIX_TIMESTAMP(firstusedate)] => 0
a2billing.php: [15] => 1188874194
a2billing.php: [UNIX_TIMESTAMP(cc_card.creationdate)] => 1188874194
a2billing.php: [16] => USD
a2billing.php: [currency] => USD
a2billing.php: [17] => 1188874193
a2billing.php: [lastname] => 1188874193
a2billing.php: [18] =>
a2billing.php: [firstname] =>
a2billing.php: [19] =>
a2billing.php: [email] =>
a2billing.php: [20] => 1206660224
a2billing.php: [uipass] => 1206660224
a2billing.php: [21] => 9
a2billing.php: [id] => 9
a2billing.php: [22] => 0
a2billing.php: [id_campaign] => 0
a2billing.php: [23] => 9
a2billing.php: [24] => 078370831187078
a2billing.php: [useralias] => 078370831187078
a2billing.php: )
a2billing.php:
a2billing.php: )
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:1898 - [SET LANGUAGE() en]
a2billing.php: file:Class.A2Billing.php - line:634 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='1993218661']
a2billing.php: file:Class.A2Billing.php - line:1969 - [A2Billing] SAY BALANCE : 10.00000
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:1122 - [CURRENCY : USD]
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
-- <SIP/2007-09481150> Playing 'digits/10' (language 'en')
-- Playing 'dollars' (escape_digits=#) (sample_offset 0)
a2billing.php: file:Class.A2Billing.php - line:1427 - [AUTO SetCallerID]
a2billing.php: file:Class.A2Billing.php - line:1433 - [REQUESTED SetCallerID : 2007]
a2billing.php: file:Class.A2Billing.php - line:1444 - [EXEC SetCallerID : 2007]
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:656 - && && 3&& 0
-- <SIP/2007-09481150> Playing 'prepaid-enter-dest' (language 'en')
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : 778322xxxx
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> 778322xxxx
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> 778322xxxx
a2billing.php: file:Class.A2Billing.php - line:719 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:656 - 0 && && 3&& 1
-- <SIP/2007-09481150> Playing 'prepaid-enter-dest' (language 'en')
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : -1
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> -1
-- Playing 'prepaid-invalid-digits' (escape_digits=#) (sample_offset 0)
[Sep 4 00:39:41] WARNING[2850]: file.c:626 ast_readaudio_callback: Failed to write frame
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:656 - 0 && && 3&& 2
[Sep 4 00:39:41] WARNING[2850]: file.c:626 ast_readaudio_callback: Failed to write frame
-- <SIP/2007-09481150> Playing 'prepaid-enter-dest' (language 'en')
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : -1
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> -1
-- Playing 'prepaid-invalid-digits' (escape_digits=#) (sample_offset 0)
[Sep 4 00:39:41] WARNING[2850]: file.c:626 ast_readaudio_callback: Failed to write frame
a2billing.php: file:Class.A2Billing.php - line:634 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='1993218661']
-- AGI Script a2billing.php completed, returning -1


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 11:44 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
dynaguy wrote:
a2billing.php: file:Class.A2Billing.php - line:719 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)

is obviously the problem, and even describes how to fix it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 5:21 pm 
Offline

Joined: Thu Aug 23, 2007 8:31 pm
Posts: 38
Location: Vancouver, BC, Canada
Hi, stavros, thanks for the reply.

I saw this ERROR but I just couldn't figure out what I did wrong. :?

I'll post some screen shots later to show my current setting on A2B.

Added after 13 minutes:

Here are some screen shots:

Trunk:
Image

RateCard:
Image

CallPlan:
Image

Added after 2 minutes:

Also, in my current test server, I don't need any prefix. All outgoing calls should dail as AreaCode+7DigitNumber (e.g. 7783221199)

Thanks for help!


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

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
You need to ensure the customer you are testing as has its callplan set as 'LocalPlan'.

Also you've used starttime and stoptime to make this route active only between Monday 19:18 and Sunday 19:18, which may not be what you intended.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 5:51 pm 
Offline

Joined: Thu Aug 23, 2007 8:31 pm
Posts: 38
Location: Vancouver, BC, Canada
stavros wrote:
You need to ensure the customer you are testing as has its callplan set as 'LocalPlan'.

Confirmed!

stavros wrote:
Also you've used starttime and stoptime to make this route active only between Monday 19:18 and Sunday 19:18, which may not be what you intended.

I changed to Start time (0) and End time(10079).

Tested again. Same result.

One thing I don't understand is the ERROR point to Line 719 in A2Billing.php and I can see that line is about callback. I havn't try anything about the callback feature yet.

I read other posts and the sane RateEngine error they have has different line number.

And, is there a way I can rollback all the setting to the fresh start point so I can try to do it again?


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

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
dynaguy wrote:
One thing I don't understand is the ERROR point to Line 719 in A2Billing.php and I can see that line is about callback. I havn't try anything about the callback feature yet.
You're looking in the wrong file. The error references Class.A2Billing.php not A2Billing.php. Line 719 in that is trying to match a rate for the current dialstring from the ratecards available to the customer, and is failing to find any.

I've never tried using 'defaultprefix' as a prefix... if you're more explicit and change this to match '778322' (or even just '7') it may work closer to your expectations.

dynaguy wrote:
And, is there a way I can rollback all the setting to the fresh start point so I can try to do it again?
Copy the original a2billing.conf, drop the SQL tables and run the schema installation again.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 7:23 pm 
Offline

Joined: Thu Aug 23, 2007 8:31 pm
Posts: 38
Location: Vancouver, BC, Canada
stavros wrote:
dynaguy wrote:
One thing I don't understand is the ERROR point to Line 719 in A2Billing.php and I can see that line is about callback. I havn't try anything about the callback feature yet.
You're looking in the wrong file. The error references Class.A2Billing.php not A2Billing.php. Line 719 in that is trying to match a rate for the current dialstring from the ratecards available to the customer, and is failing to find any.

I've never tried using 'defaultprefix' as a prefix... if you're more explicit and change this to match '778322' (or even just '7') it may work closer to your expectations.

Still the same...

:oops:

Added after 20 minutes:

Hi, stavros, I pm you so you can login my A2B server. Thanks.


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

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
If it's still failing in exactly the same way I can only advise you to double check everything you've entered for sanity/typos.

This is core functionality and has worked well for years.
Oh... except a small bug regarding time zones: I sometimes have to set the creation/active date of things backwards an hour. I think this is because I'm running GMT+1 here currently. Try setting the create/active date of everything involved in this call to yesterday's date?

Added after 10 minutes:

OK I spent 30 seconds looking around.

You hadn't specified a call plan for any of the cards.

I've set card #1 to have a callplan of Localplan and now Rate simulator now finds a route to 778322 no problem.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 04, 2007 7:55 pm 
Offline

Joined: Thu Aug 23, 2007 8:31 pm
Posts: 38
Location: Vancouver, BC, Canada
Thank you for the help! :bow:

I was so dumb and I totally ignored the customer setting.

Now it is working. :clap:


I think I should generate the customers after the callplan then it should automatically bond them together, right?


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

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
No, because there may be more than one call plan and A2B wouldn't know which to add them to.

You always need to specify the customers' call plans.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 
VoIP Billing solution


All times are UTC


Who is online

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