Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 9:10 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Interacting with the Voucher IVR on demand only
PostPosted: Mon May 26, 2014 3:57 pm 
Offline

Joined: Fri Apr 11, 2014 5:14 am
Posts: 13
Hi,

I would like the users to have the possibility to interact with a2billing in two ways: via the standard way, and via vouchers. However, I don't like the voucher menu to be prompted every time as it happens when I activate the voucher prompt in agi-conf. Is it possible to allow the two ways of interacting simultaneously, if so, how can I do it?

Thanks in advance,

carlos


Top
 Profile  
 
 Post subject: Re: Interacting with the Voucher IVR on demand only
PostPosted: Tue May 27, 2014 8:48 am 
Offline

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

You could set up an extension that calls a2billing.php in voucher mode.


Joe


Top
 Profile  
 
 Post subject: Re: Interacting with the Voucher IVR on demand only
PostPosted: Wed May 28, 2014 8:28 am 
Offline

Joined: Fri Apr 11, 2014 5:14 am
Posts: 13
Hi Joe,

Thanks a lot for you answer. Actually I have set up the voucher mode but it does not give me the functionality I am looking for, as I want the user to be able to make a call, right after they have entered the voucher number. I have managed to do that by creating two different agi-conf, and assigning each of them to a given extension. In one, the standard calling card is followed, in the other the user is asked by the voucher number and then a call can be made with that credit. Now, my question is, is there anyway the voucher_ivr_prefix audio can be skipped? I mean, that it asks straight away for the voucher number? I've left the filed empty for the prefix in the agi-conf, but still plays the audio. Any suggestion?

Thanks,

carlos


Top
 Profile  
 
 Post subject: Re: Interacting with the Voucher IVR on demand only
PostPosted: Wed May 28, 2014 8:35 am 
Offline

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

Some dialplan like this?

Code:
[a2billing-voucher]
exten => _X.,1,Answer(1)
exten => _X.,n,Agi(a2billing.php,1,voucher)
;exten => _X.,n,AGI(a2billing.php,1,voucher,44) ; will add 44 in front of the callerID for the CID authentication
exten => _X.,n,Hangup   


Joe


Top
 Profile  
 
 Post subject: Re: Interacting with the Voucher IVR on demand only
PostPosted: Wed May 28, 2014 8:46 am 
Offline

Joined: Fri Apr 11, 2014 5:14 am
Posts: 13
Hi Joe,

my code in the a2billing server looks like:
Code:
[a2billing]
include => a2billing_callingcard
include => a2billing_voucher

[a2billing_callingcard]
; CallingCard application
exten => 1,1,NoOp(A2Billing Start)
exten => 1,n,DeadAgi(a2billing.php,1)
exten => 1,n,Hangup

[a2billing_voucher]
exten => 2,1,Answer()
exten => 2,n,DeadAgi(a2billing.php,2)
exten => 2,n,Hangup


before I had what you suggested:
Code:
[a2billing_voucher]
exten => 2,1,Answer()
exten => 2,n,DeadAgi(a2billing.php,1,voucher)
exten => 2,n,Hangup


However, this second option did not allow me to make a call after the voucher number has been entered. That's why I created a new agi-conf that plays the voucher IVR and works fine. The only thing I would like now is to get rid off the message: "If you want to recharge your account with a voucher please enter 8 now", and play straight away the message "Enter you voucher number". Is this possible?

carlos


Top
 Profile  
 
 Post subject: Re: Interacting with the Voucher IVR on demand only
PostPosted: Wed May 28, 2014 8:53 am 
Offline

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

Re-record the soundfile.

Joe


Top
 Profile  
 
 Post subject: Re: Interacting with the Voucher IVR on demand only
PostPosted: Wed May 28, 2014 9:43 am 
Offline

Joined: Fri Apr 11, 2014 5:14 am
Posts: 13
With your suggestion, it waits for me to enter a number, and if not, it goes straight away to "enter the number you want to call"...

So I managed to solve it by modifying a2billing.php this way:
Code:
if ($A2B->agiconfig['ivr_voucher'] == 1) {
                /**$res_dtmf = $agi->get_data('prepaid-refill_card_with_voucher', 5000, 1);
                *$A2B->debug(DEBUG, $agi, __FILE__, __LINE__, "RES REFILL CARD VOUCHER DTMF : " . $res_dtmf["result"]);
                *$A2B->ivr_voucher = $res_dtmf["result"];
                **/
                $A2B->ivr_voucher = 8; /* This is a new line I have inserted. Enter 8, or whatever you have on the agi-conf*/
                if ((isset($A2B->ivr_voucher)) && ($A2B->ivr_voucher == $A2B->agiconfig['ivr_voucher_prefixe'])) {
                        $vou_res = $A2B->refill_card_with_voucher($agi, $i);
                }
}


This is probably not the most elegant solution, but it works.

carlos


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


All times are UTC


Who is online

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