Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 6:41 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: dialingnumber%
PostPosted: Sun Jan 06, 2008 6:57 pm 
Offline
User avatar

Joined: Sat Jun 02, 2007 5:59 am
Posts: 63
Location: Orlando, Fl
dialingnumber% should be all that you need. Give it a try.


Top
 Profile  
 
 Post subject: this is what iam getting i know i am close i have been worki
PostPosted: Sun Jan 06, 2008 7:02 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
-- Executing [6474764424@from-trunk:1] Set("SIP/64.34.181.47-b780f580", "__FROM_DID=6474764424") in new stack
-- Executing [6474764424@from-trunk:2] GotoIf("SIP/64.34.181.47-b780f580", "1 ?cidok") in new stack
-- Goto (from-trunk,6474764424,4)
-- Executing [6474764424@from-trunk:4] NoOp("SIP/64.34.181.47-b780f580", "CallerID is "RICHARD FEARING" <6479896968>") in new stack
-- Executing [6474764424@from-trunk:5] Goto("SIP/64.34.181.47-b780f580", "custom-a2billing-did|2031080937|1") in new stack
-- Goto (custom-a2billing-did,2031080937,1)
-- Executing [2031080937@custom-a2billing-did:1] NoOp("SIP/64.34.181.47-b780f580", ""RICHARD FEARING" <6479896968>") in new stack
-- Executing [2031080937@custom-a2billing-did:2] AGI("SIP/64.34.181.47-b780f580", "a2billing.php|3|did") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|3|did: A2Billing AGI internal configuration:
a2billing.php|3|did: Array
a2billing.php|3|did: (
a2billing.php|3|did: [debug] => 3
a2billing.php|3|did: [answer_call] =>
a2billing.php|3|did: [logger_enable] => 1
a2billing.php|3|did: [log_file] => /tmp/a2billing.log
a2billing.php|3|did: [say_goodbye] =>
a2billing.php|3|did: [play_menulanguage] =>
a2billing.php|3|did: [force_language] =>
a2billing.php|3|did: [intro_prompt] =>
a2billing.php|3|did: [len_cardnumber] => 10
a2billing.php|3|did: [len_aliasnumber] => 12
a2billing.php|3|did: [len_voucher] => 15
a2billing.php|3|did: [min_credit_2call] => 0
a2billing.php|3|did: [min_duration_2bill] => 0
a2billing.php|3|did: [notenoughcredit_cardnumber] =>
a2billing.php|3|did: [notenoughcredit_assign_newcardnumber_cid] =>
a2billing.php|3|did: [use_dnid] => 1
a2billing.php|3|did: [no_auth_dnid] => Array
a2billing.php|3|did: (
a2billing.php|3|did: [0] => 2400
a2billing.php|3|did: [1] => 2300
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: [number_try] => 3
a2billing.php|3|did: [say_balance_after_auth] =>
a2billing.php|3|did: [say_balance_after_call] =>
a2billing.php|3|did: [say_rateinitial] =>
a2billing.php|3|did: [say_timetocall] => 1
a2billing.php|3|did: [auto_setcallerid] => 1
a2billing.php|3|did: [force_callerid] =>
a2billing.php|3|did: [cid_sanitize] => cid
a2billing.php|3|did: [cid_enable] => 1
a2billing.php|3|did: [cid_askpincode_ifnot_callerid] =>
a2billing.php|3|did: [cid_auto_create_card] =>
a2billing.php|3|did: [cid_auto_assign_card_to_cid] =>
a2billing.php|3|did: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|3|did: [cid_auto_create_card_credit] => 0
a2billing.php|3|did: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|3|did: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|3|did: [callerid_authentication_over_cardnumber] =>
a2billing.php|3|did: [sip_iax_friends] => 1
a2billing.php|3|did: [sip_iax_pstn_direct_call_prefix] => 9
a2billing.php|3|did: [sip_iax_pstn_direct_call] =>
a2billing.php|3|did: [extracharge_did] => Array
a2billing.php|3|did: (
a2billing.php|3|did: [0] => 2031080937
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: [extracharge_fee] => Array
a2billing.php|3|did: (
a2billing.php|3|did: [0] =>
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: [dialcommand_param] => |90|HrL(%timeout%:61000:30000)
a2billing.php|3|did: [dialcommand_param_sipiax_friend] => |90|HrL(3600000:61000:30000)
a2billing.php|3|did: [switchdialcommand] =>
a2billing.php|3|did: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|3|did: [send_reminder] =>
a2billing.php|3|did: [record_call] =>
a2billing.php|3|did: [monitor_formatfile] => gsm
a2billing.php|3|did: [base_currency] => usd
a2billing.php|3|did: [agi_force_currency] =>
a2billing.php|3|did: [currency_association] => Array
a2billing.php|3|did: (
a2billing.php|3|did: [0] => usd:prepaid-dollar
a2billing.php|3|did: [1] => mxn:pesos
a2billing.php|3|did: [2] => eur:euro
a2billing.php|3|did: [3] => all:credit
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|3|did: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|3|did: [play_audio] => 1
a2billing.php|3|did: [international_prefixes] => Array
a2billing.php|3|did: (
a2billing.php|3|did: [0] => 011
a2billing.php|3|did: [1] => 09
a2billing.php|3|did: [2] => 00
a2billing.php|3|did: [3] => 1
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: [cid_auto_create_card_len] => 10
a2billing.php|3|did: [failover_recursive_limit] => 1
a2billing.php|3|did: [currency_association_internal] => Array
a2billing.php|3|did: (
a2billing.php|3|did: [usd] => prepaid-dollar
a2billing.php|3|did: [mxn] => pesos
a2billing.php|3|did: [eur] => euro
a2billing.php|3|did: [all] => credit
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: [ivr_voucher] => 0
a2billing.php|3|did: [ivr_voucher_prefixe] => 8
a2billing.php|3|did: [jump_voucher_if_min_credit] => 0
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: file:a2billing.php - line:76 - IDCONFIG : 3
a2billing.php|3|did: file:a2billing.php - line:77 - MODE : did
a2billing.php|3|did: file:a2billing.php - line:89 - AGI Request:
a2billing.php|3|did: file:a2billing.php - line:90 - Array
a2billing.php|3|did: (
a2billing.php|3|did: [agi_request] => a2billing.php
a2billing.php|3|did: [agi_channel] => SIP/64.34.181.47-b780f580
a2billing.php|3|did: [agi_language] => en
a2billing.php|3|did: [agi_type] => SIP
a2billing.php|3|did: [agi_uniqueid] => 1199646104.155
a2billing.php|3|did: [agi_callerid] => 6479896968
a2billing.php|3|did: [agi_calleridname] => RICHARD FEARING
a2billing.php|3|did: [agi_callingpres] => 0
a2billing.php|3|did: [agi_callingani2] => 0
a2billing.php|3|did: [agi_callington] => 0
a2billing.php|3|did: [agi_callingtns] => 0
a2billing.php|3|did: [agi_dnid] => 6474764424
a2billing.php|3|did: [agi_rdnis] => unknown
a2billing.php|3|did: [agi_context] => custom-a2billing-did
a2billing.php|3|did: [agi_extension] => 2031080937
a2billing.php|3|did: [agi_priority] => 2
a2billing.php|3|did: [agi_enhanced] => 0.0
a2billing.php|3|did: [agi_accountcode] =>
a2billing.php|3|did: )
a2billing.php|3|did:
a2billing.php|3|did: file:Class.A2Billing.php - line:616 - get_agi_request_parameter = 6479896968 ; SIP/64.34.181.47-b780f580 ; 1199646104.155 ; ; 2031080937
a2billing.php|3|did: file:a2billing.php - line:332 - [NO ANSWER CALL]
a2billing.php|3|did: file:a2billing.php - line:344 - [DID CALL - [CallerID=6479896968]:[DID=2031080937]
a2billing.php|3|did: file:a2billing.php - line:356 - SELECT cc_did.id, cc_did_destination.id, billingtype, tariff, destination, voip_call, username FROM cc_did, cc_did_destination, cc_card WHERE id_cc_did=cc_did.id and cc_card.id=id_cc_card and cc_did_destination.activated=1 and cc_did.activated=1 and did='2031080937' AND cc_did.startingdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00') ORDER BY priority ASC
a2billing.php|3|did: file:a2billing.php - line:358 -
== Spawn extension (custom-a2billing-did, 2031080937, 2) exited non-zero on 'SIP/64.34.181.47-b780f580'
pbx*CLI>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 7:14 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
So it bails out after constructing the SQL query, but before printing the result of running the query. That narrows down the problem to a single line of code.
I'm guessing you're running Postgres and the '0000-00-00 00:00:00' date is causing the problem. This has already been fixed in v1.3.1. Either upgrade, or simply swap this line in /var/lib/asterisk/agi-bin/a2billing.php:
Code:
         " cc_did.expirationdate = '0000-00-00 00:00:00') ORDER BY priority ASC";
for this:
Code:
         " cc_did.expirationdate < '1984-01-01 00:00:00') ORDER BY priority ASC";


Top
 Profile  
 
 Post subject: currently this is what it says
PostPosted: Sun Jan 06, 2008 7:34 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
cc_did.expirationdate = '0000-00-00 00:00:00'";
should i just change the date


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 7:37 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
No change the comparison operator too.
No, hang on a minute. v1.3.1 is the only version with a line that reads like you quoted, so don't change a thing. As I said it's already fixed in v1.3.1.
We still don't know which database server you're running.


Top
 Profile  
 
 Post subject: will this help
PostPosted: Sun Jan 06, 2008 7:47 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
[database]
hostname = localhost
port = 5432
user = a2billinguser
password = a2billing
dbname = mya2billing
;dbtype = postgres
dbtype = mysql


Pbx In A Flash 1.1 machine 1.3.1


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 8:01 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
So you're running MySQL. I don't know what might be causing your problem in that case. I'd suggest that as the problem seems to be with this SQL query, you copy and paste the query into your SQL server and see what it says.
Code:
mysql -u a2billing -D mya2billing
# SELECT cc_did.id, cc_did_destination.id, billingtype, tariff, destination, voip_call, username FROM cc_did, cc_did_destination, cc_card WHERE id_cc_did=cc_did.id and cc_card.id=id_cc_card and cc_did_destination.activated=1 and cc_did.activated=1 and did='2031080937' AND cc_did.startingdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00') ORDER BY priority ASC;


Top
 Profile  
 
 Post subject: isn't there a way to change the database type
PostPosted: Sun Jan 06, 2008 8:06 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
isn't there a way to change the database type this is a test machine

also where is the database located? so i can copy and paste


Top
 Profile  
 
 Post subject: Re: isn't there a way to change the database type
PostPosted: Sun Jan 06, 2008 8:23 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
rishkid wrote:
isn't there a way to change the database type this is a test machin
Sure, just follow the section of the installation instructions which describes setting up the other flavour of DB server. Changing DB server is very unlikely to magically fix your problem though.
Quote:
also where is the database located? so i can copy and paste
Erm, it's not quite that simple. Given your circumstances (test server) it's far easier to start with a clean database than to try to migrate the data.

Did you try running that query manually to see what results it gave?


Top
 Profile  
 
 Post subject: where is the sql server
PostPosted: Sun Jan 06, 2008 8:30 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
where is the sql server database

this is is a script install of a2billing all i did was ran the script and presto a2billing installed this where i got the script from http://nerdvittles.com/


Top
 Profile  
 
 Post subject: Re: where is the sql server
PostPosted: Sun Jan 06, 2008 8:39 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
rishkid wrote:
where is the sql server database
I don't use MySQL, but I'm sure the manual offers sound advice.
Quote:
this is is a script install of a2billing all i did was ran the script and presto a2billing installed this where i got the script from http://nerdvittles.com/
I'm having trouble finding that script on nerdvittles.com itself. Can you give the URL please?


Top
 Profile  
 
 Post subject: screen shot
PostPosted: Sun Jan 06, 2008 8:47 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
i went here but the removed it http://pbxinaflash.org/scripts.htm

but if you install Pbx in a flash on the cli the option is there t run the script

Added after 2 minutes:

here is a screen shot http://www.pbxinaflash.org/docs/piafinstalldraft.pdf


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 9:40 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
:o please don't make me fire up VMWare just to find the URL it downloads the script from. I'll feel all dirty and non Free.
I presume there's a small script called install-a2b or somesuch that you call to install it? Can you just 'cat install-a2b' and give me the URL it downloads from.

Added after 4 minutes:

Can you please post the contents of that install-a2billing script then:
Code:
cat `which install-a2billing`
careful with those quotes... they are backticks not apostrophes.

Added after 37 minutes:

OK no matter. Seth kindly posted the script in another thread. That script should certainly have initialised the database correctly.

I get the feeling this is probably caused by something stupid like the DID not actually having a destination set.


Top
 Profile  
 
 Post subject: opps email wrong
PostPosted: Sun Jan 06, 2008 10:35 pm 
Offline

Joined: Fri Jan 26, 2007 9:52 pm
Posts: 23
ill let you log into my box email me [email protected] and i will email you back the password and login information

Added after 4 minutes:

[email protected]


Top
 Profile  
 
 Post subject: DID Routing
PostPosted: Sun Jan 06, 2008 10:38 pm 
Offline
User avatar

Joined: Sat Jun 02, 2007 5:59 am
Posts: 63
Location: Orlando, Fl
Stavros,

I too believe this is something simple. My first guess was DID forwarding to a destination also. How can I help? Do you want the scripts contents posted?


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


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group