Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 2:19 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Mon Dec 22, 2008 2:48 am 
Offline

Joined: Fri Aug 17, 2007 6:14 pm
Posts: 6
thanks stavros. i know i speak for everyone when we say thanks for all the help you've provided .

i figured out the invoice script problem was that my customer's billing date was set to the 1st of the month and not the current date so by design it wouldnt generate an invoice. i set my customers billdate to today and it generates the invoice as it should. i'm suprised these scripts arent documented or inquired on because to me automated invoicing seems like a big feature. i searched the user manual and guide and i think i found one reference to one of the scripts and thats it! hopefully my long posts help someone else out : )

a suggestion for a future release would be automating when someone adds a payment/charge that it updates the account balance as well.

i'm having trouble grasping why a monthly subscription will deduct from the customer balance, but adding a charge (or a payment) wont. does anyone know if it's normal for a charge to show up on an invoice but not change the balance? to me a charge seems like it would be the equivalent of a one time subscription fee, and we know the subscriptions affect the account balance so...

now my next mission is to customize the invoice . the current one is a great start and will suffice if need be, but i'd love to hack around with it a bit. any ideas which file to mess with? i noticed in a2billing.conf there is an option for an invoice logo, but im hoping there is a template file that can be edited. i'd like to change it so that if the charge is $20 it will show up as $20.00 instead of just plain 20 . And I think the date format is too long on the invoice... i want to change that to a shorter format like mm/dd/yyyy . if anyone has suggestions on how to do this (or would like to share how you've customized your invoice) that'd be awesome.Im guessing if i can find the code that outputs the invoice it'll be a matter of just a few changes in PHP .

And FINALLY, thanks again to all the people who have contributed to this amazing FREE product. you guys deserve a big cheers!

Ryan


Top
 Profile  
 
 Post subject: Re: I can't make it work
PostPosted: Mon Jan 19, 2009 10:11 am 
Offline

Joined: Thu Nov 20, 2008 6:02 am
Posts: 68
tommaso wrote:
this is what I get when I run one of the cron jobs as explained by you.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql' - /usr/lib/php/modules/pgsql: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pcntl.so' - /usr/lib/php/modules/pcntl.so: cannot open shared object file: No such file or directory in Unknown on line 0

any idea what I am doing wrong?

Thanks


I had similar problem. I have run php -m. The printout is weird. There is pcntl module loaded. But it doesn't have pcntl.so at the specified location.


-------------------------------------------
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pcntl.so' - /usr/lib/php/modules/pcntl.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
dom
exif
filter
ftp
gd
gettext
gmp
hash
iconv
imap
json
libxml
mbstring
memcache
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
posix
readline
Reflection
session
shmop
SimpleXML
snmp
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

-------------------------------------------------------------------------------

When I try to find where is pcntl.so is

i find the following printout with command locate pcntl.so

/usr/lib/php4/pcntl.so

for command php -v, the following is the printout

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pcntl.so' - /usr/lib/php/modules/pcntl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.5 (cli) (built: Nov 19 2008 15:18:12)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies


And i can find a way to install php-pcntl for php5.

charlie


Top
 Profile  
 
 Post subject: Re: I can't make it work
PostPosted: Mon Jan 19, 2009 1:36 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
charlie wrote:
I had similar problem. I have run php -m. The printout is weird. There is pcntl module loaded. But it doesn't have pcntl.so at the specified location.
My advice to you is the same as I gave to tommaso: this problem is caused by whomever packaged your PHP installation (ie your Linux distribution); take the problem up with them.


Top
 Profile  
 
 Post subject: Re: I can't make it work
PostPosted: Thu Feb 19, 2009 8:45 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
graher01 wrote:
tommaso wrote:
this is what I get when I run one of the cron jobs as explained by you.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql' - /usr/lib/php/modules/pgsql: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pcntl.so' - /usr/lib/php/modules/pcntl.so: cannot open shared object file: No such file or directory in Unknown on line 0

any idea what I am doing wrong?

Thanks

========================================
make sure the crontab is set in asterisk
========================================
do this
su asterisk
then crontab -e
then paste the code.


How will i set crontab in asterisk?

Plz advise

Mushfiq


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2009 10:08 pm 
Offline

Joined: Thu Nov 20, 2008 6:02 am
Posts: 68
FOr linux,

login into to your linux console as root user

then use command "su asterisk", now you are using account "asterisk"

then type "crontab -e" , you should be able to see the screen allow you to edit cronjobs.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2009 2:55 am 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
charlie wrote:
FOr linux,

login into to your linux console as root user

then use command "su asterisk", now you are using account "asterisk"

then type "crontab -e" , you should be able to see the screen allow you to edit cronjobs.



Ok i have made following changes in etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

# following are the new or i added

0 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_alarm.php
0 12 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_batch_process.php
0 2 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_bill_diduse.php
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_check_account.php
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_invoice_cront.php
4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php
0 6 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/currencies_update_yahoo.php

I have also webmin where i added only subcription.php file and run it from run now
and it works .
BUT if i saved like for testing every 4 minutes automatically it does not do that from webmin
neither in /etc/crontab
where is the wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2009 4:34 am 
Offline

Joined: Thu Nov 20, 2008 6:02 am
Posts: 68
mushfiq wrote:
charlie wrote:
FOr linux,

login into to your linux console as root user

then use command "su asterisk", now you are using account "asterisk"

then type "crontab -e" , you should be able to see the screen allow you to edit cronjobs.



Ok i have made following changes in etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

# following are the new or i added

0 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_alarm.php
0 12 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_batch_process.php
0 2 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_bill_diduse.php
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_check_account.php
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_invoice_cront.php
4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php
0 6 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/currencies_update_yahoo.php

I have also webmin where i added only subcription.php file and run it from run now
and it works .
BUT if i saved like for testing every 4 minutes automatically it does not do that from webmin
neither in /etc/crontab
where is the wrong?


None of your task runs every 4 mintues

0 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_alarm.php

---run every hour at 1:00, 2:00 ....

0 12 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_batch_process.php

---runs every day at 12:00

0 2 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_bill_diduse.php
---runs every day at 2:00
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_check_account.php

---runs every week on monday 6:00

0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_invoice_cront.php

---runs every week on monday 6:00

4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php

--runs every hour on 1:04 or 2:04 or 3:04, if you want to run it every 4 mintues, please use the "*/4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php" instead

0 6 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/currencies_update_yahoo.php

---runs every day 6:00


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2009 11:04 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
charlie wrote:
mushfiq wrote:
charlie wrote:
FOr linux,

login into to your linux console as root user

then use command "su asterisk", now you are using account "asterisk"

then type "crontab -e" , you should be able to see the screen allow you to edit cronjobs.



Ok i have made following changes in etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

# following are the new or i added

0 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_alarm.php
0 12 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_batch_process.php
0 2 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_bill_diduse.php
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_check_account.php
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_invoice_cront.php
4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php
0 6 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/currencies_update_yahoo.php

I have also webmin where i added only subcription.php file and run it from run now
and it works .
BUT if i saved like for testing every 4 minutes automatically it does not do that from webmin
neither in /etc/crontab
where is the wrong?

===========================
None of your task runs every 4 mintues
==========================


0 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_alarm.php

---run every hour at 1:00, 2:00 ....

0 12 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_batch_process.php

---runs every day at 12:00

0 2 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_bill_diduse.php
---runs every day at 2:00
0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_check_account.php

---runs every week on monday 6:00

0 6 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_invoice_cront.php

---runs every week on monday 6:00

4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php
==================================
--runs every hour on 1:04 or 2:04 or 3:04, if you want to run it every 4 mintues, please use the "*/4 * * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_subscription_fee.php" instead
===================================
0 6 * * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/currencies_update_yahoo.php

---runs every day 6:00



I actually wanted to run subscription fee every 4 minutes but my grammer
was wrong thanks to notice to me
You are right it acually run every 1.04 2:04 times
but do not know from which command it actually running
from webmin setup or crontab -e editor
now in crontab i editted or changed there */4 but no result
i start crond again. nop nothing waiting at 5:04 what it happens.
in webmin when to execute in cront job

minutes selected adn 4 minutes
hrs selected all and nothing same way other things and saved

Mushfiq


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2009 10:36 pm 
Offline

Joined: Thu Nov 20, 2008 6:02 am
Posts: 68
Would you like to type crontab -l and see what is the result?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 6:08 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
Hi charlie,

following result comes up
crontab -l

* * 1 * * /etc/webmin/cluster-cron/cron.pl 1235072775-26287

This result shows up for the a2billing_batch_process.php
where i set it up for every 1 day thats why
but it did not run at all not even from run now command
if it run now command it gaves error
"no recurring service to run"

I will give the result for the one which we were talking about
a2billing_subscription_fee.php which actually run from run now command
and also some automated process by which it occur every 1.04, 2.04

Thanks

Added after 57 minutes:

Ok
crontab -l
for a2billing_subscription_fee.php

6 * * * * /etc/webmin/cluster-cron/cron.pl 1234507275-26284

which means every 6 minutes(but according to your grammer it should save as */6 but it did not show up like that) from run now commands it runs fine but automated way it never run after 6 minutes later.

Added after 17 minutes:

If i go as user asterisk
su asterisk
and run crontab -l
no crontab for asterisk

is this could be a reason?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 10:56 pm 
Offline

Joined: Thu Nov 20, 2008 6:02 am
Posts: 68
mushfiq wrote:
Hi charlie,

following result comes up
crontab -l

* * 1 * * /etc/webmin/cluster-cron/cron.pl 1235072775-26287

This result shows up for the a2billing_batch_process.php
where i set it up for every 1 day thats why
but it did not run at all not even from run now command
if it run now command it gaves error
"no recurring service to run"

I will give the result for the one which we were talking about
a2billing_subscription_fee.php which actually run from run now command
and also some automated process by which it occur every 1.04, 2.04

Thanks

Added after 57 minutes:

Ok
crontab -l
for a2billing_subscription_fee.php

6 * * * * /etc/webmin/cluster-cron/cron.pl 1234507275-26284

which means every 6 minutes(but according to your grammer it should save as */6 but it did not show up like that) from run now commands it runs fine but automated way it never run after 6 minutes later.

Added after 17 minutes:

If i go as user asterisk
su asterisk
and run crontab -l
no crontab for asterisk

is this could be a reason?


I have never used webmin before. But

6 * * * * /etc/webmin/cluster-cron/cron.pl 1234507275-26284

means that the cronjob runs 10:06, 11:06 and so on.

But suggestion will be

su asterisk
crontab -e (remember to save before exit)

and add all your php script into the cront job list

save and exit;

use crontab -l to give it a double check

and wait and see whether all of them works.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 4:59 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
here is to the point question

after crontab -e under su asterisk
the blank editor open and pasted everything but it did not saved
or there is no option in the editor to save or i dont know how to save so when i open it again nothing shows up.

what could be done?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 25, 2009 11:19 am 
Offline

Joined: Thu Nov 20, 2008 6:02 am
Posts: 68
What is your default editor in your linux system?

Added after 1 minutes:

Are you familiar editors in linux? If not, you need to be familiar with them. Or at least the one which is used in your linux box.

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 25, 2009 5:15 pm 
Offline

Joined: Wed Jul 11, 2007 9:27 pm
Posts: 55
Location: USA
charlie wrote:
What is your default editor in your linux system?

Added after 1 minutes:

Are you familiar editors in linux? If not, you need to be familiar with them. Or at least the one which is used in your linux box.

Charlie


after the command
crontab -e
the editor that comes probably vi
in vi editor after inserting any text i save it with
esc than ZZ which is the grammer
But again when i open crontab -e there is nothing i am doing this
all under su asterisk.

I do not know why you got mad about that not knowing which editor
and how to work with it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 25, 2009 6:15 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Quote:
I do not know why you got mad about that not knowing which editor and how to work with it.
Charlie didn't seem at all mad to me. His suggestions seemed quite reasonable given your previous assertion that you didn't know how to save the file. :shock:
Quote:
But again when i open crontab -e there is nothing i am doing this all under su asterisk.
Perhaps you might establish whether or not you can successfully modify root's crontab. Maybe you need to add 'asterisk' to the 'cron' group.
For further help you should really consult the documentation and support mechanisms for your Linux distribution; your problem with editing crontabs is not within the scope of this forum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 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 3 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