Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Oct 16, 2018 4:08 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: agi-conf
PostPosted: Wed Mar 14, 2007 6:12 pm 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
hello all.

can some tell me if it is possible to have a scenario like this, please ?

we have an incoming number that asks clients for PIN and so on. works very nice.

but we also want registered clients (softphone, avm fritzbox, iaxy, and so on) just to make calls without getting asked for PIN.

is that possible ? i need some help with that.

thanks :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 6:37 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Yes you can do that. You can have several different options, its all there in the agi-conf. If I understand you right, I use 2 different conf's for that situation. One will go to the Conf and always ask for the PIN and and number to call (inbound TDM). Another will recognize the user and if he entered a number to dial on his system (like a hard sip phone) it will call automatically and just say how long to talk for. yet another I have setup for wholesale, and it gives zero prompts and just passes the call through while billing.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 9:37 pm 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
si senor ...

thats what i want ...

the inbound number asks for pin, tells the balance after auth.
you type your number and system tells you how long you can call.

registered soft-/hardphones can make phonecalls without any prompts.

can you tell me how to do that ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 10:22 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
OK man ... here you go, lots of extra crap, but this'll work: Mod as you like :)

[a2billing-sip]
exten => _X.,1,DeadAGI(a2billing.php|8|)
exten => _X.,2,Hangup

[a2billing-CC-DIAL]
exten => _X.,1,Answer
exten => _X.,2,Wait,1
exten => _X.,3,DeadAGI(a2billing.php|9|)
exten => _X.,4,Congestion
exten => _X.,5,Wait,1
exten => _X.,6,Hangup

[agi-conf8]

; this CONFIG will be for wholesale - no voice prompts
; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug=1


; Manage the answer on the call
answer_call=no

; Activate application logging
; logging is optimized to write all the logs at once :D
logger_enable=YES

; File to log
log_file=/tmp/a2billing.log


; 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
; parlezplus-intro_013centimes
intro_prompt=

; length of the cardnumber (number of of digits)
len_cardnumber=7

; Alias-Card length
len_aliasnumber = 7

; Voucher length
len_voucher = 7

; 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=YES


; 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

; 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 presentation of a callerID number
auto_setcallerid=YES

; If set, and auto_setcallerid is enabled, the number is sent as CID always
force_callerid=

; If force_callerid is not set, then this ensures that CID is set to one of the ccard'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, you can then ask for a cardnumber from the calling party in order to authenticate the caller
cid_askpincode_ifnot_callerid=YES

; if the callerID, this option will allow the system to add it automatically and create a cardnumber to hook them up.
cid_auto_create_card=NO

; if the callerID authenticate is on, this option will allow the assign the cardnumber enter to the callerID if the callerID wasnt in the DB
cid_auto_assign_card_to_cid=YES

; If cid_auto_create_card has been set to YES, the following option will define with which parameters the card will be create
;
; 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

; if we want to check the 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=8

; 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=NO changed 10/29/06
sip_iax_pstn_direct_call=YES


; 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=


; 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.
2; H: Allow the caller to hang up by dialing *
; r: Generate a ringing tone for the calling party
; 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|HL(%timeout%:60000:00000)"

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

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


; 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=YES

; 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


;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = USD

; 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:prepaid-dollar,mxn:pesos,eur:euro,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

[agi-conf9]

; this is for pre-paid calling card NOW

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


; Manage the answer on the call
answer_call=yes

; Activate application logging
; logging is optimized to write all the logs at once :D
logger_enable=YES

; File to log
log_file=/tmp/a2billing.log


; 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
; parlezplus-intro_013centimes
intro_prompt=

; length of the cardnumber (number of of digits)
len_cardnumber=7

; Alias-Card length
len_aliasnumber = 7

; Voucher length
len_voucher = 7

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

; 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=YES

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


; 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

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

; 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=YES

; enable the presentation of a callerID number
auto_setcallerid=YES

; If set, and auto_setcallerid is enabled, the number is sent as CID always
force_callerid=YES

; If force_callerid is not set, then this ensures that CID is set to one of the ccard'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=YES

; if the CID does not exist, you can then ask for a cardnumber from the calling party in order to authenticate the caller
cid_askpincode_ifnot_callerid=YES

; if the callerID, this option will allow the system to add it automatically and create a cardnumber to hook them up.
cid_auto_create_card=NO

; if the callerID authenticate is on, this option will allow the assign the cardnumber enter to the callerID if the callerID wasnt in the DB
cid_auto_assign_card_to_cid=YES

; If cid_auto_create_card has been set to YES, the following option will define with which parameters the card will be create
;
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid=PREPAY
; 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

; if we want to check the 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=8

; 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=NO changed 10/29/06
sip_iax_pstn_direct_call=YES


; 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=


; 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.
2; H: Allow the caller to hang up by dialing *
; r: Generate a ringing tone for the calling party
; 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|HL(%timeout%:61000:30000)"
dialcommand_param="|60|HL(%timeout%:60000:00000)"

; by default (3600000 = 1HOUR MAX CALL)
dialcommand_param_sipiax_friend="|30|HL(3600000:6000:000000)"

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


; 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=YES

; 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


;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = USD

; 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:prepaid-dollar,mxn:pesos,eur:euro,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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 2:58 pm 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
:D

thank you very much mate :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 5:52 pm 
Offline

Joined: Wed Apr 11, 2007 5:49 pm
Posts: 8
all these changes must be done in a2billing.conf ?

thnx


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 10:44 pm 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
yes

you can set several [agi-conf#] there


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 6:18 pm 
Offline
User avatar

Joined: Mon Apr 09, 2007 3:19 pm
Posts: 11
Location: Denmark
Hi microcosmic and krzykat

I also try to setup 2 agi configs in order to have some extensions setup without authentication and postpay while all others require authenication and have prepaid accounts.

... But somehow I must be doing something wrong: :(

First, I added an additional agi-conf [agi-conf2] and set all options per your [agi-conf8] but when I start A2B in browser, I get:

Quote:
Warning: Error parsing /etc/asterisk/a2billing.conf on line 346 in /var/www/html/a2billing/lib/Class.A2Billing.php on line 222

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/a2billing/lib/Class.A2Billing.php:222) in /var/www/html/a2billing/lib/defines.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/a2billing/lib/Class.A2Billing.php:222) in /var/www/html/a2billing/lib/module.access.php on line 35


(Line 346 in my a2billing.conf reads:)
Code:
exten => _X.,1,DeadAGI(a2billing.php|2|)



After I tried to keep my original [agi-conf1] section of a2billing.conf and added the 2 agi-config sections from your above post. - Still same error.

Maybe I am missing on something?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 6:29 pm 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
pantau wrote:
(Line 346 in my a2billing.conf reads:)
Code:
exten => _X.,1,DeadAGI(a2billing.php|2|)



I think the second pipe '|' is wrong: it should read as:
Code:
...DeadAGI(a2billing.php|2)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 7:01 pm 
Offline
User avatar

Joined: Mon Apr 09, 2007 3:19 pm
Posts: 11
Location: Denmark
Thanks, xrg

I removed 2nd pipes, but still get the same error. :cry:

Another note: I need to use both features only for outbound calls, no DID, no sip friends either.


Last edited by pantau on Wed Apr 25, 2007 9:16 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 7:12 pm 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
I just thought an empty param would be bad enough. It seems not to be.

Anyway, your problem happens inside an 'parse_ini_file()'. That is, there is some kind of syntax error in your conf. Not a logical, it is just that your file is not INI-like. Example, I would guess writing 'var => value' instead of 'var = value' would be bad enough.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 26, 2007 12:33 am 
Offline
User avatar

Joined: Mon Apr 09, 2007 3:19 pm
Posts: 11
Location: Denmark
I figured, that the entries:

Code:
[a2billing-sip]
exten => _X.,1,DeadAGI(a2billing.php|2)
exten => _X.,2,Hangup

[a2billing-CC-DIAL]
exten => _X.,1,Answer
exten => _X.,2,Wait,1
exten => _X.,3,DeadAGI(a2billing.php|1)
exten => _X.,4,Congestion
exten => _X.,5,Wait,1
exten => _X.,6,Hangup


actually don't go into the a2billing.conf but perhaps into the extensions.conf.

After having done this, I have no-longer the error I've posted earlier, but it's still not working.

Can someone with lots of "agi-conf"-experience advice me further?
:shock:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 28, 2007 5:06 pm 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
exten => _X.,1,DeadAGI,a2billing.php|2

i did that... worked


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 8:56 am 
Offline

Joined: Mon Jun 18, 2007 2:55 am
Posts: 5
Hey Guys i hope you can help me....
I to am trying to create the following:
- agi-conf1:default (authenticated phones only give balance and connect)
- agi-conf2:wholesale (no prompts just connect and bill)
- agi-conf3:public phones (ask for card number and pin everytime)

Code:
[agi-conf1]

; 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 = YES

; 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 = YES

; 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 = YES


; 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 = 555

; 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 = NO

; 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 =


; 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
:    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|HRrL(%timeout%:61000:30000)"

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

; Define the order to make the outbound call
; YES -> SIP/[email protected]_ip - NO  SIP/gateway_ip/dialedphonenumber
; Both should work exactly the same but i experimented one case when gateway was supporting [email protected]_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


Here is my second configuration which is intended to be used for wholesale accounts
Code:
[agi-conf2]

; this CONFIG will be for wholesale - no voice prompts
; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug=1

; Manage the answer on the call
answer_call=no

; Activate application logging
; logging is optimized to write all the logs at once Very Happy
logger_enable=YES

; File to log
log_file=/tmp/a2billing.log


; 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ñ Pressez 3 pour Françs
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
; parlezplus-intro_013centimes
intro_prompt=

; length of the cardnumber (number of of digits)
len_cardnumber=7

; Alias-Card length
len_aliasnumber = 7

; Voucher length
len_voucher = 7

; 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=YES


; 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

; 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 presentation of a callerID number
auto_setcallerid=YES

; If set, and auto_setcallerid is enabled, the number is sent as CID always
force_callerid=

; If force_callerid is not set, then this ensures that CID is set to one of the ccard'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, you can then ask for a cardnumber from the calling party in order to authenticate the caller
cid_askpincode_ifnot_callerid=YES

; if the callerID, this option will allow the system to add it automatically and create a cardnumber to hook them up.
cid_auto_create_card=NO

; if the callerID authenticate is on, this option will allow the assign the cardnumber enter to the callerID if the callerID wasnt in the DB
cid_auto_assign_card_to_cid=YES

; If cid_auto_create_card has been set to YES, the following option will define with which parameters the card will be create
;
; 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

; if we want to check the 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=8

; 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=NO changed 10/29/06
sip_iax_pstn_direct_call=YES


; 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=


; 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.
2; H: Allow the caller to hang up by dialing *
; r: Generate a ringing tone for the calling party
; 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|HL(%timeout%:60000:00000)"

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

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


; 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=YES

; 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


;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = AUD

; 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:prepaid-dollar,mxn:pesos,eur:euro,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


Third configuration for public phones which requires card number and also pin number before dailing:
Code:
[agi-conf3]
; this is for pre-paid calling card NOW

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


; Manage the answer on the call
answer_call=yes

; Activate application logging
; logging is optimized to write all the logs at once Very Happy
logger_enable=YES

; File to log
log_file=/tmp/a2billing.log


; 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ñ Pressez 3 pour Françs
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
; parlezplus-intro_013centimes
intro_prompt=

; length of the cardnumber (number of of digits)
len_cardnumber=7

; Alias-Card length
len_aliasnumber = 7

; Voucher length
len_voucher = 7

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

; 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=YES

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


; 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

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

; 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=YES

; enable the presentation of a callerID number
auto_setcallerid=YES

; If set, and auto_setcallerid is enabled, the number is sent as CID always
force_callerid=YES

; If force_callerid is not set, then this ensures that CID is set to one of the ccard'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=YES

; if the CID does not exist, you can then ask for a cardnumber from the calling party in order to authenticate the caller
cid_askpincode_ifnot_callerid=YES

; if the callerID, this option will allow the system to add it automatically and create a cardnumber to hook them up.
cid_auto_create_card=NO

; if the callerID authenticate is on, this option will allow the assign the cardnumber enter to the callerID if the callerID wasnt in the DB
cid_auto_assign_card_to_cid=YES

; If cid_auto_create_card has been set to YES, the following option will define with which parameters the card will be create
;
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid=PREPAY
; 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

; if we want to check the 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=8

; 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=NO changed 10/29/06
sip_iax_pstn_direct_call=YES


; 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=


; 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.
2; H: Allow the caller to hang up by dialing *
; r: Generate a ringing tone for the calling party
; 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|HL(%timeout%:61000:30000)"
dialcommand_param="|60|HL(%timeout%:60000:00000)"

; by default (3600000 = 1HOUR MAX CALL)
dialcommand_param_sipiax_friend="|30|HL(3600000:6000:000000)"

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


; 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=YES

; 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


;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = AUD

; 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:prepaid-dollar,mxn:pesos,eur:euro,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


Above is a break down of my agi files i will also include my ext breakdown:

Code:
[jizzleinc-peer]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup

[jizzleinc-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|callback)
exten => _X.,n,Hangup

[a2billing-cid-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|cid-callback|34) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-all-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|all-callback|34) ;last parameter is the callback area code
exten => _X.,n,Hangup

[jizzleinc-predictivedialer]
exten => _X.,1,DeadAGI(a2billing.php|1|predictivedialer)
exten => _X.,n,Hangup

[jizzle-did]
exten => _X.,1,DeadAGI(a2billing.php|1|did)
exten => _X.,2,Hangup

[a2billing-voucher]
exten => _X.,1,DeadAGI(a2billing.php|1|voucher)
exten => _X.,n,Hangup

[jizzleinc-sip]
exten => _X.,1,DeadAGI(a2billing.php|2)
exten => _X.,n,Hangup

[jizzle-CC-DIAL]
exten => _X.,1,Answer
exten => _X.,n,Wait,(1)
exten => _X.,n,DeadAGI(a2billing.php|3)
exten => _X.,n,Congestion
exten => _X.,n,Wait,(1)
exten => _X.,n,Hangup


I understand how context's work and did get the CC system to work but now want more features, i used the guide in this post but say if i used context jizzle-CC-DIAL the following would happen:

1. Dial number on phone
2. IVR prompts me to dial number (problem)
The prompt says "Please enter the number you wish to dial" when it should say "Please enter your card number" etc

Second issue:
When I use context jizzleinc-sip i should not get any prompts but i do, i think the problem is with authentication but have no idea on how to properly setup the the agi

Third issue:
Can someone explain this to me? I live in Australia should i chage the USD to AUD? I did change all the default currency selections to aud, except for this one as i have no idea what it does nor how to structure it.
Code:
; 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 help :D or is there a guide on agi's and exts or maybe a semi scenario based guide where it outlines the configuration changes needed to emulate the scenario?


Top
 Profile  
 
 Post subject: Re: agi-conf
PostPosted: Wed Aug 25, 2010 8:11 am 
Offline

Joined: Tue Aug 24, 2010 12:31 pm
Posts: 2
Hi,

on version 1.7.1 i had the same problem with USE_NDID. i thought that i could do the same with the currency which i couldn't change from a2billing.conf file.
the currency was changed from the a2billing web interface on the system settings ---> global list. i searched for CURRENCY on the KEY section with CONTAINS chosen. you will see the BASE CURRENCY. press the pencil on the right and change the the default usd to whatever you want. then you have to update the currencies from billing----> currency list and press the update.

now for the USE_NDID which was not working for me when i inserted it to the a2billing.conf i did a search on the global list as for the currency. i used the NDID on the description with CONTAINS chosen and i found it. pressed the pencil and changed the NO to YES and pressed confirm. And it worked.


hope that helps you.


E.D


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


All times are UTC


Who is online

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