Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 10:56 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Callback Installation wthe trixbox 2.6 and A2billing 1.3.4
PostPosted: Sat Oct 18, 2008 8:23 pm 
Offline

Joined: Sat Oct 18, 2008 10:10 am
Posts: 3
Location: Sweden
Dear all
In this example we will use callback-all method.

Step1: Installing callback module

Make sure that this package is installed:perl-DBD-MySQl

At the command prompt type:

mkdir /var/lib/asterisk/a2billing/
mv /usr/src/a2billing/CallBack/callback-daemon /var/lib/asterisk/a2billing/

echo "*******************************************************************"
echo "Now installing callback"
echo "-------------------------------------------------"
echo "Go with the defaults in the following script - when prompted, but in your country"
echo ""
echo ""
echo "When you see the CPAN prompt, and the script has halted, you will need to type the following"
echo "SO TAKE NOTES"
echo "*******************************************************************"
echo "*******************************************************************"
echo "install Config::IniFiles"
echo "reload"
echo "quit"
echo "*******************************************************************"

sleep 10

pear install --alldeps SOAP-0.9.4
perl -MCPAN -e shell
cd /var/lib/asterisk/a2billing/callback-daemon/

install --owner=root --group=root --mode=700 a2billing-callback-daemon.rc /etc/rc.d/init.d/a2billing-callback-daemon

chkconfig --add a2billing-callback-daemon && chkconfig a2billing-callback-daemon on
service a2billing-callback-daemon start


tail -F /var/log/asterisk/a2billing-daemon-callback.log

Step2: Configure manager

You have to enable manager connections on the servers where is runningthe callback daemon .

Using Conf Edit trixbox utility, open manager_custom.conf file

[a2billinguser]
secret=a2billing
;deny=0.0.0.0/0.0.0.0
;permit=127.0.0.1/255.255.255.0
read=system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,agent,user


This will allow connection from anywhere , so you can be more restrictive using deny and permit like:

deny=0.0.0.0/0.0.0.0
permit=**my-ip**/255.255.255.0

That will allow connections only from **my-ip**

Save the file and reload asterisk!


Step3: Create agi-conf2

We will need to create another agi-conf context named agi-conf2 just after agi-conf1:

[agi-conf2]

; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug = 1

; Asterisk Version Information
; 1_1,1_2,1_4 By Default it will take 1_2 or higher
asterisk_version = 1_2

; Manage the answer on the call
answer_call = YES

; Play audio - this will disable all stream file but not the Get Data
; for wholesale ensure that the authentication works and than number_try = 1
play_audio = YES

; play the goodbye message when the user has finished.
say_goodbye = NO

; enable the menu to choose the language
; press 1 for English, pulsa 2 para el español, Pressez 3 pour Français
play_menulanguage = NO


; force the use of a language, if you dont want to use it leave the option empty
; Values : ES, EN, FR, etc... (according to the audio you have installed)
force_language =

; Introduction prompt : to specify an additional prompt to play at the beginning of the application
intro_prompt =

; Minimum amount of credit to use the application
min_credit_2call = 0

; this is the minimum duration in seconds of a call in order to be billed
; any call with a length less than min_duration_2bill will have a 0 cost
; useful not to charge callers for system errors when a call was answered but it actually didn't connect
min_duration_2bill = 0

; if user doesn't have enough credit to call a destination, prompt him to enter another cardnumber
notenoughcredit_cardnumber = NO

; if notenoughcredit_cardnumber = YES then assign the CallerID to the new cardnumber
notenoughcredit_assign_newcardnumber_cid = YES


; if YES it will use the DNID and try to dial out, without asking for the phonenumber to call
; value : YES, NO
use_dnid = NO

; list the dnid on which you want to avoid the use of the previous option "use_dnid"
no_auth_dnid = 2400,2300

; number of times the user can dial different number
number_try = 3

; this will force to select a specific call plan by the Rate Engine
force_callplan_id =

; Play the balance to the user after the authentication (values : yes - no)
say_balance_after_auth = NO

; Play the balance to the user after the call (values : yes - no)
say_balance_after_call = NO

; Play the initial cost of the route (values : yes - no)
say_rateinitial = NO

; Play the amount of time that the user can call (values : yes - no)
say_timetocall = NO


; enable the setup of the callerID number before the outbound is made, by default the user callerID value will be use
auto_setcallerid = YES

; If auto_setcallerid is enabled, the value of force_callerid will be set as CallerID
force_callerid =

; If force_callerid is not set, then the following option ensures that CID is set to one of the card's configured caller IDs or blank if none available.
; NO - disable this feature, caller ID can be anything.
; CID - Caller ID must be one of the customers caller IDs
; DID - Caller ID must be one of the customers DID nos.
; BOTH - Caller ID must be one of the above two items.
cid_sanitize = NO


; enable the callerid authentication
; if this option is active the CC system will check the CID of caller
cid_enable = NO

; if the CID does not exist, then the caller will be prompt to enter his cardnumber
cid_askpincode_ifnot_callerid = YES

; if the callerID authentication is enable and the authentication fails then the user will be prompt to enter his cardnumber
; this option will bound the cardnumber entered to the current callerID so that next call will be directly authenticate
cid_auto_assign_card_to_cid = YES

; if the callerID is captured on a2billing, this option will create automatically a new card and add the callerID to it
cid_auto_create_card = NO

; set the length of the card that will be auto create (ie, 10)
cid_auto_create_card_len = 10

; If cid_auto_create_card has been set to YES, the following options will define with which configuration we will create the card
;
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid = POSTPAY

; amount of credit of the new card
cid_auto_create_card_credit = 0

; if postpay, define the credit limit for the card
cid_auto_create_card_credit_limit = 1000

; the tariffgroup to use for the new card (this is the ID that you can find on the admin web interface)
cid_auto_create_card_tariffgroup = 6

; to check callerID over the cardnumber authentication (to guard against spoofing)
callerid_authentication_over_cardnumber = NO

; enable the option to call sip/iax friend for free (values : YES - NO)
sip_iax_friends = YES

; if SIP_IAX_FRIENDS is active, you can define a prefix for the dialed digits to call a pstn number
; values : number
sip_iax_pstn_direct_call_prefix = 9

; this will enable a prompt to enter your destination number.
; if number start by sip_iax_pstn_direct_call_prefix we do directly a sip iax call, if not we do a normal call
sip_iax_pstn_direct_call = YES

; enable the option to refill card with voucher in IVR (values : YES - NO)
ivr_voucher = NO

; if ivr_voucher is active, you can define a prefix for the voucher number to refill your card
; values : number - don't forget to change prepaid-refill_card_with_voucher audio accordingly
ivr_voucher_prefix = 8

; When the user credit are below the minimum credit to call min_credit
; jump directly to the voucher IVR menu (values: YES - NO)
jump_voucher_if_min_credit = NO

; Extracharge DIDs, multiple numbers and fees must be separated by comma
; extracharge_did = 1800XXXXXXX,1888XXXXXXX
extracharge_did =
;extracharge_fee = 0.02,0.03
extracharge_fee =

; List the prefixes that will be stripped off if the call plan requires it
international_prefixes = 011,00,09

; More information about the Dial : http://voip-info.org/wiki-Asterisk+cmd+dial
; 30 : The timeout parameter is optional. If not specifed, the Dial command will wait indefinitely, exiting only when the originating channel hangs up, or all the dialed channels return a busy or error condition. Otherwise it specifies a maximum time, in seconds, that the Dial command is to wait for a channel to answer.
; H: Allow the caller to hang up by dialing *
; r: Generate a ringing tone for the calling party
; g: When the called party hangs up, exit to execute more commands in the current context. (new in 1.4)
; i: Asterisk will ignore any forwarding (302 Redirect) requests received. Essential for DID usage to prevent fraud. (new in 1.4) Useful if you are ringing a group of people and one person has set their phone to forwarded direct to voicemail on their cell or something which normally prevents any of the other phones from ringing.
; R: Indicate ringing to the calling party when the called party indicates ringing, pass no audio until answered.
; m: Provide Music on Hold to the calling party until the called channel answers.
; L(x[:y][:z]): Limit the call to 'x' ms, warning when 'y' ms are left, repeated every 'z' ms)
; %timeout% tag is replaced by the calculated timeout according the credit & destination rate!

dialcommand_param = "|60|HRgrL(%timeout%:61000:30000)"

; by default (3600000 = 1HOUR MAX CALL)
dialcommand_param_sipiax_friend = "|60|HRgirL(3600000:61000:30000)"

; Define the order to make the outbound call
; YES -> SIP/dialedphonenumber@gateway_ip - NO SIP/gateway_ip/dialedphonenumber
; Both should work exactly the same but i experimented one case when gateway was supporting dialedphonenumber@gateway_ip
; So in case of trouble, try it out
switchdialcommand = NO

; failover recursive search - define how many time we want to authorize the research of the failover trunk when a call fails (value : 0 - 20)
failover_recursive_limit = 2

; For free calls, limit the duration: amount in seconds
maxtime_tocall_negatif_free_route = 5400

; Send a reminder email to the user when they are under min_credit_2call
send_reminder = NO

; enable to monitor the call (to record all the conversations)
; value : YES - NO
record_call = NO

; format of the recorded monitor file
monitor_formatfile = gsm

; Force to play the balance to the caller in a predefined currency, to use the currency set for by the customer leave this field empty
agi_force_currency =

; CURRENCY SECTION
; Define all the audio (without file extensions) that you want to play according to currency (use , to separate, ie "usd:prepaid-dollar,mxn:pesos,eur:Euro,all:credit")
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit

; Please enter the file name you want to play when we prompt the calling party to enter the destination number
; file_conf_enter_destination = prepaid-enter-number-u-calling-1-or-011
file_conf_enter_destination = prepaid-enter-dest

; Please enter the file name you want to play when we prompt the calling party to choose the prefered language
; file_conf_enter_menulang = prepaid-menulang
file_conf_enter_menulang = prepaid-menulang2

; Define if you want to bill the 1st leg on callback even if the call is not connected to the destination
callback_bill_1stleg_ifcall_notconnected = YES



You also need to change the callback setting under /etc/asterisk/a2billing.conf file.

[callback]
; When web call-back is enabled this is the context to sent the call.
context_callback = custom-a2billing-callback

; this is the Extension to redirect the call when the web callback is returned
extension = 1000

; this is the number of seconds to wait before initiating the call back.
sec_wait_before_callback = 10

;Number of seconds before the call-back can be re-initiated from the web page
; to prevent repeated and unwanted calls.
sec_avoid_repeate = 30

; if the callback doesnt succeed within the value below, then the call is deemed to have failed.
timeout = 20

; if we want to manage the answer on the call
; Disabling this for callback trigger numbers makes it ring not hang up.
answer_call = yes


; PREDICTIVE DIALER
; number of calls an agent will do when the call button is clicked
nb_predictive_call = 10

; Number of days to wait before the number becomes available to call again.
nb_day_wait_before_retry = 1

; The context to redirect the call for the predictive dialer
context_preditctivedialer = a2billing-predictivedialer


; When a call is made we need to limit the call duration : amount in seconds
predictivedialer_maxtime_tocall = 3600

; set the callerID for the predictive dialer and call-back
callerid = 1112223333

; ID Call Plan to use when you use the all-callback mode, check the ID in the "list Call Plan" - WebUI
all_callback_tariff = 11

; Define the group of servers that are going to be used by the callback
id_server_group = 1

; Audio intro message when the callback is initiate
callback_audio_intro = prepaid-callback_intro


; CUSTOMISATION Of THE CUSTOMER INTERFACE


Save the a2billing.conf file and reload asterisk!.

I hope to show dialogue..... thanks


Riyadh


Top
 Profile  
 
 Post subject: information
PostPosted: Mon Oct 27, 2008 4:26 pm 
Offline
User avatar

Joined: Wed Feb 06, 2008 12:31 pm
Posts: 20
Location: Florianópolis
Hey friend,

I think u just copy and paste the information.

I cannot see where is the link that I can download the callback daemon?


Top
 Profile  
 
 Post subject: Re: Callback Installation wthe trixbox 2.6 and A2billing 1.3.4
PostPosted: Wed Jun 17, 2009 2:36 pm 
Offline

Joined: Mon Jun 15, 2009 4:14 pm
Posts: 17
Hey man, come on!!! The file is inside the CallBack's folder!

Because of this you need to create a new folder and move the file.

You don't need to download from anywhere ok! :)


Top
 Profile  
 
 Post subject: Re: Callback Installation wthe trixbox 2.6 and A2billing 1.3.4
PostPosted: Wed Jun 17, 2009 4:49 pm 
Offline

Joined: Wed Mar 15, 2006 11:58 pm
Posts: 325
Hey All,

I am using Elastix, and A2Billing 1.3 is installed on the system. After trying the forementioned installation instructions for A2billing-Callback-Daemon I am getting the following error:


Code:
[root@elastix callback-daemon]# service a2billing-callback-daemon restart
Stopping a2billing-callback-daemon:                        [FAILED]
Can't locate Config/IniFiles.pm in @INC (@INC contains: /var/lib/asterisk/a2billing/callback-daemon/lib /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /var/lib/asterisk/a2billing/callback-daemon/a2billing-callback-daemon line 10.
BEGIN failed--compilation aborted at /var/lib/asterisk/a2billing/callback-daemon/a2billing-callback-daemon line 10.
Starting a2billing-callback-daemon:                        [FAILED]


Top
 Profile  
 
 Post subject: Re: Callback Installation wthe trixbox 2.6 and A2billing 1.3.4
PostPosted: Wed Jun 17, 2009 7:12 pm 
Offline

Joined: Wed Mar 15, 2006 11:58 pm
Posts: 325
NVM my post. I found solution posted on the forum.

After one sees CPAN prompt the following should be entered:

install Config::IniFiles
reload
quit


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


All times are UTC


Who is online

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