Bukoka Budoka
2005-Nov-10 16:42 UTC
[Asterisk-Users] A2billing problem.The system disconnects me immediatelly after asking me the PIN
Hi, i installed A2billing according to instructions. GUI works fine, i entered a new card and i put the appopriate context in my extensions.conf: [callingcard] exten => _123,1,Answer exten => _123,2,Wait,2 exten => _123,3,DeadAGI,a2billing.php exten => _123,4,Wait,2 exten => _123,5,Hangup However when i enter the Calling card system, it did not ask my to put my account-code. I found that in the a2billing.conf file there is a option for the intro_prompt which was empty. I put there the prepaid-enter-card-num gsm file and now when i enter the calling card system i have the following behavior: It asks me to enter the prepaid card number but immediatelly after it disconnects me with a message of "authentication failed - goodbye"... Why the system does not "wait" for the PIN number to be entered? Any ideas? Thank you, Budoka. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ My a2billing.conf is as follows: ; config file for the A2Billing Callingcard platform ; Global Database Setup [database] hostname=localhost port=5432 user=a2billinguser password=a2billing dbname=mya2billing ;dbtype=postgres dbtype=mysql ; configuration for the Web interface [webui] ; Path to store the asterisk configuration files buddyfilepath = /etc/asterisk/ ; Email of the admin (not used yet) email_admin = info@areski.net ; Card lenght len_cardnumber = 4 ; Voucher lenght len_voucher = 5 ;amount of MOH class you have created in musiconhold.conf : acc_1, acc_2... acc_10 class etc... num_musiconhold_class = 10 ;MANAGER CONNECTION PARAMETERS manager_host = localhost manager_username = panos manager_secret = panos123 ; Allow to display the help section inside the admin interface (YES - NO) show_help="YES" ; Parameter of the upload ; PLEASE CHECK ALSO THE VALUE IN YOUR PHP.INI THE LIMIT IF 2MG BY DEFAULT my_max_file_size_import = 512000 my_max_file_size = 512000 ; in bytes ; Not used yet, goal is to upload files and use them directly in the IVR dir_store_audio = /var/lib/asterisk/sounds/a2billing ;Parameter of the upload my_max_file_size_audio=3072000 ; in bytes ; the file type extensions allowed to be uploaded such as "gsm, mp3, wav" (separate by ,) file_ext_allow = gsm, mp3, wav ; the file type extensions allowed to be uploaded for the musiconhold such as "gsm, mp3, wav" (separate by ,) file_ext_allow_musiconhold = mp3 ; ENABLE THE CDR VIEWER TO LINK ON THE MONITOR FILES (YES - NO) link_audio_file = "NO" ; PATH TO LINK ON THE RECORDED MONITOR FILES monitor_path = /var/spool/asterisk/monitor // grant access to apache user on read mode for the directory :> chmod 755 /var/spool/asterisk/monitor/ ; FORMAT OF THE RECORDED MONITOR FILE monitor_formatfile = gsm ; Display the icon in the invoice show_icon_invoice = "YES" ; Display the top frame (useful if you want to save space on your little tiny screen ) show_top_frame = "YES" ;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 ; currency_choose allow you to great a set of currencies to let the customer select the most appropriate ("all" can be used) currency_choose = usd, eur, cad, hkd ; configuration for the Reccurring process (cront) [recprocess] batch_log_file=/tmp/batch-a2billing.log ; configuration for the AGI, different configuration can be defined, ie "agi-conf1", "agi-conf2", etc... ; the groupid parameter will define which process_sections to use. Usage : DeadAGI(a2billing.php|%groupid%) ; by default agi-conf1 is used [agi-conf1] ; the debug level ; 0=none, 1=low, 2=normal, 3=all debug=3 ; Active the logging of the application ; logging is optimized to write all the logs at once :D logger_enable=YES ; File to log log_file=/tmp/a2billing.log ; if YES Use Set(LANGUAGE()=fr) instead, for me it didnt work from AGI ; ### if (SETLANGUAGE_DEPRECATE==YES) $myres = $agi->agi_exec("EXEC Set('LANGUAGE()=$language')"); setlanguage_deprecate=YES ; play the goodbye message when the user finish say_goodbye=YES ; 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 install) force_language=EN ; Introduction prompt : to specify an additional prompt to play at the beginning of the application ; parlezplus-intro_013centimes intro_prompt=prepaid-enter-card-num ; lenght of the cardnumber (amount of digits) len_cardnumber=4 ; Voucher lenght len_voucher = 5 ; this is the minimum amount of credit to use the application min_credit_2call=1 ; if YES it will catch the DNID and try to dial it out directly 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 time 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 time the user can call (values : yes - no) say_timetocall=YES ; enable the callerid authentication ; if this option is active the CC system will check the CID of caller cid_enable=NO ; if the cid doesnt exist you can then ask a cardnumber to 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 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 here 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 ; enable the option to call sip/iax friend for free (values : YES - NO) sip_iax_friends=NO ; if SIP_IAX_FRIENDS is active, you define a prefix for the dialed phonenumber to call directly a pstn number ; values : number sip_iax_pstn_direct_call_prefix=9 ; this will enable a prompt to enter your destination number_try ; 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 ; 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 ; 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="|30|HL(%timeout%:61000:30000)" ; 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/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 troubles, try it out switchdialcommand=NO ; enable to monitor the call (to record all the conversation) ; 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 extension) 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 here the file you want to play when we prompt the calling party to enter his destination number ; file_conf_enter_destination = prepaid-enter-number-u-calling-1-or-011 file_conf_enter_destination = prepaid-enter-dest ; Please enter here the file 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 ; the debug shell (ONLY FOR THE DEVELOPERS) ; 0=no, 1=yes debugshell=0 _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/
Administrator TOOTAI
2005-Nov-11 03:22 UTC
[Asterisk-Users] A2billing problem.The system disconnects me immediatelly after asking me the PIN
Bukoka Budoka a ?crit :> Hi, > > i installed A2billing according to instructions. GUI works fine, i > entered a new card and i put the appopriate context in my > extensions.conf: > > [callingcard] > exten => _123,1,Answer > exten => _123,2,Wait,2 > exten => _123,3,DeadAGI,a2billing.php > exten => _123,4,Wait,2 > exten => _123,5,Hangup > > However when i enter the Calling card system, it did not ask my to put > my account-code. I found that in the a2billing.conf file there is a > option for the intro_prompt which was empty. I put there the > prepaid-enter-card-num gsm file and now when i enter the calling card > system i have the following behavior: > > It asks me to enter the prepaid card number but immediatelly after it > disconnects me with a message of "authentication failed - goodbye"... > > Why the system does not "wait" for the PIN number to be entered?cid_enable=yes Daniel> > Any ideas? > > Thank you, > > Budoka. > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > My a2billing.conf is as follows: > > ; config file for the A2Billing Callingcard platform > ; Global Database Setup > > [database] > hostname=localhost > port=5432 > user=a2billinguser > password=a2billing > dbname=mya2billing > ;dbtype=postgres > dbtype=mysql > > ; configuration for the Web interface > [webui] > > ; Path to store the asterisk configuration files > buddyfilepath = /etc/asterisk/ > > ; Email of the admin (not used yet) > email_admin = info@areski.net > > ; Card lenght > len_cardnumber = 4 > > ; Voucher lenght > len_voucher = 5 > > ;amount of MOH class you have created in musiconhold.conf : acc_1, > acc_2... acc_10 class etc... > num_musiconhold_class = 10 > > > ;MANAGER CONNECTION PARAMETERS > manager_host = localhost > manager_username = panos > manager_secret = panos123 > > ; Allow to display the help section inside the admin interface (YES - > NO) > show_help="YES" > > ; Parameter of the upload > ; PLEASE CHECK ALSO THE VALUE IN YOUR PHP.INI THE LIMIT IF 2MG BY DEFAULT > my_max_file_size_import = 512000 > my_max_file_size = 512000 ; in bytes > ; Not used yet, goal is to upload files and use them directly in the IVR > dir_store_audio = /var/lib/asterisk/sounds/a2billing > > ;Parameter of the upload > my_max_file_size_audio=3072000 ; in bytes > > ; the file type extensions allowed to be uploaded such as "gsm, mp3, > wav" (separate by ,) > file_ext_allow = gsm, mp3, wav > > ; the file type extensions allowed to be uploaded for the musiconhold > such as "gsm, mp3, wav" (separate by ,) > file_ext_allow_musiconhold = mp3 > > > > ; ENABLE THE CDR VIEWER TO LINK ON THE MONITOR FILES (YES - NO) > link_audio_file = "NO" > > > ; PATH TO LINK ON THE RECORDED MONITOR FILES > monitor_path = /var/spool/asterisk/monitor > // grant access to apache user on read mode for the directory :> > chmod 755 /var/spool/asterisk/monitor/ > > > ; FORMAT OF THE RECORDED MONITOR FILE > monitor_formatfile = gsm > > ; Display the icon in the invoice > show_icon_invoice = "YES" > > ; Display the top frame (useful if you want to save space on your > little tiny screen ) > show_top_frame = "YES" > > > ;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 > > ; currency_choose allow you to great a set of currencies to let the > customer select the most appropriate ("all" can be used) > currency_choose = usd, eur, cad, hkd > > > ; configuration for the Reccurring process (cront) > [recprocess] > batch_log_file=/tmp/batch-a2billing.log > > ; configuration for the AGI, different configuration can be defined, > ie "agi-conf1", "agi-conf2", etc... > ; the groupid parameter will define which process_sections to use. > Usage : DeadAGI(a2billing.php|%groupid%) > ; by default agi-conf1 is used > [agi-conf1] > > ; the debug level > ; 0=none, 1=low, 2=normal, 3=all > debug=3 > > > ; Active the logging of the application > ; logging is optimized to write all the logs at once :D > logger_enable=YES > > ; File to log > log_file=/tmp/a2billing.log > > ; if YES Use Set(LANGUAGE()=fr) instead, for me it didnt work from AGI > ; ### if (SETLANGUAGE_DEPRECATE==YES) $myres = $agi->agi_exec("EXEC > Set('LANGUAGE()=$language')"); > setlanguage_deprecate=YES > > ; play the goodbye message when the user finish > say_goodbye=YES > > ; 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 install) > force_language=EN > > ; Introduction prompt : to specify an additional prompt to play at the > beginning of the application > ; parlezplus-intro_013centimes > intro_prompt=prepaid-enter-card-num > > ; lenght of the cardnumber (amount of digits) > len_cardnumber=4 > ; Voucher lenght > len_voucher = 5 > > ; this is the minimum amount of credit to use the application > min_credit_2call=1 > > ; if YES it will catch the DNID and try to dial it out directly > 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 time 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 time the user can call (values : yes - no) > say_timetocall=YES > > ; enable the callerid authentication > ; if this option is active the CC system will check the CID of caller > cid_enable=NO > > > ; if the cid doesnt exist you can then ask a cardnumber to 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 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 here 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 > > ; enable the option to call sip/iax friend for free (values : YES - NO) > sip_iax_friends=NO > > ; if SIP_IAX_FRIENDS is active, you define a prefix for the dialed > phonenumber to call directly a pstn number > ; values : number > sip_iax_pstn_direct_call_prefix=9 > > ; this will enable a prompt to enter your destination number_try > ; 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 > > ; 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 > ; 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="|30|HL(%timeout%:61000:30000)" > > ; 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/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 troubles, try it out > switchdialcommand=NO > ; enable to monitor the call (to record all the conversation) > ; 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 extension) 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 here the file you want to play when we prompt the > calling party to enter his destination number > ; file_conf_enter_destination = prepaid-enter-number-u-calling-1-or-011 > file_conf_enter_destination = prepaid-enter-dest > > ; Please enter here the file 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 > > ; the debug shell (ONLY FOR THE DEVELOPERS) > ; 0=no, 1=yes > debugshell=0 > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.com/ > > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >