Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 28, 2017 5:49 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Balance Notifications trigger
PostPosted: Sun Jan 03, 2010 10:34 am 
Offline

Joined: Thu Dec 03, 2009 11:18 am
Posts: 62
It looks like it is triggered by the customer balance relative to ZERO. shouldn't it be triggered by relative to balance plus the credit limit?
so the customer is only notified if his phone is about to be cut off?


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sun Jan 03, 2010 5:24 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
Hi Sergiocesar,

The latest A2billing 1.4.4.1 allows the client to be notified at any amount before balance reaches 0.

For me its an absolute must that prepaid clients are notified before balance becomes 0.

Lot of business include including myself want to give client a notice before their balance gets to 0. The extra credit is a privilege to some clients who have good credit, made deposit or signed proper documentation.

Post paid is not always 100% pure post-paid (at least how I use a2billing) but rather a blend of prepaid with some credit. In this case clients are to be notified when balance reach ZERO or any amount they choose above ZERO balance so they have time to pay before extra credit depletes.

Best regards
Sam


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Mon Jan 04, 2010 2:41 pm 
Offline

Joined: Mon Jan 04, 2010 2:33 pm
Posts: 1
Hello,

I agree with Sam that it is very good that customer hears how much credit he has left.
I've setup this option for everycall my customers (prepaid) make.

Nevertheless, it seems that customers can't dial a number while asterisk/a2billing is telling them how much money they have left. For people that are n hurry, it is not so good.

Is there any way that a user can dial the number he wants to call during the "how much you have credit left" message plays? This will stop the voice and dial automatically the number.

Thx
G.


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Mon Jan 04, 2010 9:07 pm 
Offline

Joined: Thu Dec 03, 2009 11:18 am
Posts: 62
perhaps I should be a bit more clear.

we need to send alerts only IF the customer TRUE limit is below the set point.

my request should not change the way prepaid customer works since they have their credit limit at ZERO.

my request will only affect the customer that have a credit limit other than ZERO.

what is happening is:
for those customers that have a credit limit of $50 and the warning set to $10, he is allowed to make calls up to $50 below zero BUT he will be getting emails every day that he is below 10 and it would be nice if he only receive an email when it gets actual to -$40.00


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Fri Jan 08, 2010 12:03 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
I v been trying to make a fix on the trunk for this.

I define a "real_credit" which is the sum of the Credit Limit plus the current balance
and we trigger now notification if this "real_credit" is below the notification threshold.

Fixed in Rev2646

Let me know if this work for all of you.

Cheers,
/Areski


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 10:32 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
gma222 wrote:
Hello,

Is there any way that a user can dial the number he wants to call during the "how much you have credit left" message plays? This will stop the voice and dial automatically the number.

Thx
G.


Hi gma222,
I agree 100% with you on that. Before switching to a2billing for my calling card clients I used all custom windows applications and always I had options to allow a client to begin dialing his destination number while any voice or balance voice prompt was playing. A well written telecom application should allow this. In the past I have had programmer modify a2billing so a client can dial their destination number during any voice prompt which costed me $200 and I had my programmer submit patches to Areski but he never put it into a later verison of a2b for some reason nor did I ever find out why.

I believe i also submitted patches that allowed voice prompts to play when balance depletes to a certain level . Example. If a client wanted HEAR his balance when it gets to $4 I would put that value in the cc_card table.. I think i have some of the Agi files but not the complete agi so I am not able to get it working in the latest version of a2b.


Last edited by Sam on Sat Jan 09, 2010 11:06 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 10:47 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
sergiocesar wrote:
It looks like it is triggered by the customer balance relative to ZERO. shouldn't it be triggered by relative to balance plus the credit limit?
so the customer is only notified if his phone is about to be cut off?


You can do that in asterisk ext or dialplan before sending the call to a2billing. Here is an dialplan i wrote which plays a voice prompt and connects the client to my office when His or hers balance is 35 cents or less. If greater than 0.35 it sends the call on to a2billing.
Its very simple to instead have it play the clients balance + credit limit and send the call directly to a2billing. You could even put a extra field into the cc_card table so the balance would only play which it reaches that level. Each client can choose when to have thier balance play.
Than all you have to do is turn the balance player off in a2billing.

You can also have Asterisk to run outside scripts to email everyone when thier balance gets to a certain amount and only once a day.


Code:
[bal_check]
exten => _.,1,MYSQL(Connect connid 66.XXX.XXX.XXX vps PASS mya2billing)
exten => _.,n,MYSQL(QUERY resultid ${connid} SELECT cc_card.credit + cc_card.creditlimit, cc_callerid.cid, cc_card.autorefill
FROM mya2billing.cc_card LEFT JOIN mya2billing.cc_callerid ON (cc_card.id = cc_callerid.id_cc_card) WHERE (cc_callerid.cid = ${CALLERID(number)}))

exten => _.,n,MYSQL(FETCH fetchid ${resultid} strcredit_creditlimit strcc_callerid strautorefill)
exten => _.,n,MYSQL(Clear ${resultid})
exten => _.,n,MYSQL(Disconnect ${connid})
exten => _.,n,GotoIf($[${LEN(${strcredit_creditlimit})}>0]?checkbal:diala2b)
exten => _.,n(checkbal),GotoIf($[${strcredit_creditlimit}>0.35]?checkagi:playfile)
exten => _.,n(checkagi),GotoIf($[${strautorefill}>0]?setagi:diala2b)
exten => _.,n(setagi),Set(agi_a2b=2)
exten => _.,n,NoOp(${agi_a2b})
exten => _.,n(diala2b),Goto(a2billing,${EXTEN},1)
exten => _.,n,Hangup()
exten => _.,n(playfile),Playback(your-account-balance-transferbilling)
exten => _.,n,Dial([email protected]))
exten => _.,n,Hangup()
exten => h,1,Hangup


As you can see in the dialplan you can even set which agi to send the client to And still use the same [a2billing] context you are sending the other clients to .


Code:
[a2billing] ; CallingCard application
exten => _X.,1,Answer
exten => _.,n,NoOp(${agi_a2b})
exten => _X.,n,Wait(3)
exten => _X.,n,AGI(a2billing.php,${agi_a2b})
exten => _X.,n,Hangup


Last edited by Sam on Sat Jan 09, 2010 6:14 pm, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 10:59 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4064
Hi

You may want a MySQL Disconnect statement in that dialplan, otherwise, the MySQL connection remains open, and when MySQL server hits the maximum number of open connections, no more queries will be allowed, and everything will stop working.

something like

exten => _.,n,MYSQL(Disconnect ${connid})

right after

exten => _.,n,MYSQL(Clear ${resultid})

Joe


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 11:01 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
sergiocesar wrote:
perhaps I should be a bit more clear.
for those customers that have a credit limit of $50 and the warning set to $10, he is allowed to make calls up to $50 below zero BUT he will be getting emails every day that he is below 10 and it would be nice if he only receive an email when it gets actual to -$40.00

hi sergiocesar
I believe you can put a negative value in the credit notification field. Give it a try. Example: if you give a client 50 credit. You can set to notify him when his balance gets to -$40.00. That should still = $10 before his balance runs out.

I believe under config "notifications" KEY "values_notifications" you can put
-6:-7:-8:-9:-10:-15:-20:-25:-30:-35:-40:-45:-50:-55:-60:-65:-70:-75:-80:-85:-90:-95:-100:1:2:3:4:5:6:7:8:9:10:15:20:25:30:35:40:45:50:55:60:65:70:75:80:85:90:95:100

you
Best Regards
Samuel


Last edited by Sam on Sat Jan 09, 2010 11:13 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 11:07 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
jroper wrote:
Hi

exten => _.,n,MYSQL(Disconnect ${connid})

right after

exten => _.,n,MYSQL(Clear ${resultid})

Joe


Thanks Joe

When I copied and pasted some of my code from other code I accidently missed that line
I edited my post and added 'exten => _.,n,MYSQL(Disconnect ${connid})'.

Sam


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 2:15 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
Quote:
I agree 100% with you on that. Before switching to a2billing for my calling card clients I used all custom windows applications and always I had options to allow a client to begin dialing his destination number while any voice or balance voice prompt was playing. A well written telecom application should allow this. In the past I have had programmer modify a2billing so a client can dial their destination number during any voice prompt which costed me $200 and I had my programmer submit patches to Areski but he never put it into a later verison of a2b for some reason nor did I ever find out why.


Nor you have been asking why this is not getting into the trunk. For recall, I sent you and your programmer many mails in order to sort out the patch and I had an hard time to make this work as parts was missing. If a patch is not correctly submitted, it ends into an countless hours on our side to find out how this is suppose to work. We cannot add something that is not completed or that we are not sure it does work!

I remind you that we have "Trac" (http://www.asterisk2billing.org/) which is suppose to fulfill the job of bug/enhancement tracking, so any fixes or enhancement should be committed there with the correct information so that me and "everybody else" from the A2Billing community can review and test. If everything is fine and the addition is interesting for the project, there is no reason for this not going to trunk.

Steps you should follow,

1) Log there :
http://www.asterisk2billing.org/

2) Open a ticket

3) Submit a patch over trunk if this is an enhancement or over a tag if this is a correction of a previous release.

4) Make sure you provide all information and documentation needed for other developers to understand what you do.


I hope this clarify.

Cheers,
/Areski


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 5:55 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
Hi Areski,

Yes.. I do recall getting some emails from you and I instructed you to contact my programmer which it seems you did so you are in the clear. Up until now I did not know he didn’t give you the patch in the right format nor did I know he didn't follow up with you. The only thing I knew was you saying at one point the code was written well. I paid my programmer extra to make sure he made patches that were supposed to be the right format so it could be put into a2billing without much modification.

One set of code for some auto billing service frees (which you eventually implemented your own verison of ) cost me $350 more than what it would have been if I didn’t have my programmer to make all the other changes in A2billing needed to prevent other feature from stop working and for the patch as well as a lot of extra testing. He was suppose to get the patches to you in the format listed on your site and explained what it did as well as follow up until it was added to a2billing and bill me any extra. That was what I was paying him for and would never have done all the extra work or spent the amount of money I did on some projects if I had known it wasn’t going to make it into a2billing.

Thanks a million for explaining, I guess it’s my fault I didn’t follow up and made sure my programmer got the work to you in a usable format.


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat Jan 09, 2010 8:02 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
The best way of following up a bug or an enhancement, is by using the Trac system, at least a ticket will be always open until a decision is taken and we have an easy way to recontact peoples involved even if it takes few weeks to check the addition.

So next time use the tools we provide you, they suppose to make life easier, it will be a big time-saver for all and more transparent for the community.

Yours,
/Areski


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Sat May 15, 2010 1:15 am 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
Hi Sam,
This is what I'm looking for saying balance only when below threshold.
I try the code below but strcredit_creditlimit strcc_callerid strautorefill all return nothing
Code:
exten => s,n,NoOp(Caller ID Number: ${CALLERID(num)})
exten => s,n,MYSQL(Connect connid localhost a2billinguser a2billing mya2billing)
exten => s,n,MYSQL(QUERY resultid ${connid} SELECT cc_card.credit + cc_card.creditlimit, cc_callerid.cid, cc_card.autorefill WHERE (cc_callerid.cid = ${CALLERID(num)}))
exten => s,n,MYSQL(FETCH fetchid ${resultid} strcredit_creditlimit strcc_callerid strautorefill)
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,NoOp(Credit: ${strcredit_creditlimit})
exten => s,n,NoOp(Caller ID: ${strcc_callerid})
exten => s,n,NoOp(Autorefill: ${strautorefill})

Any ideas?

Much appeciated,

Sukasem


Top
 Profile  
 
 Post subject: Re: Balance Notifications trigger
PostPosted: Tue Dec 14, 2010 12:19 am 
Offline

Joined: Thu Jun 17, 2010 1:14 pm
Posts: 13
Is it possible to see the code that allows ine to dial numbers 'during the voice prompts' ?

Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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