asterisk2billing.org
http://forum.asterisk2billing.org/

menu language customization
http://forum.asterisk2billing.org/viewtopic.php?f=14&t=2970
Page 1 of 1

Author:  pradi [ Tue Dec 25, 2007 3:07 am ]
Post subject:  menu language customization

I have configures A2billing 1.3 with Asterisk 1.4. I would like to do more customization for A2billing on the menu language. Create extensions for different language.

For example

When a user call in extension 100 it plays english voice prompts for a2billing like balance, call duration etc

When user call in extension 200 it plays French voice prompts for a2billing like balance, call duration etc

When user call in extension 300 it plays Chinese voice prompts for a2billing like balance, call duration etc


Can anyone please tell me if this is possible? If yes how can I do it?

Thanks inadvance

Author:  stavros [ Tue Dec 25, 2007 3:32 am ]
Post subject: 

extensions.conf:
Code:
exten => 100,1,Answer
exten => 100,n,DeadAGI(a2billing.php|1)
exten => 200,1,Answer
exten => 200,n,DeadAGI(a2billing.php|2)
exten => 300,1,Answer
exten => 300,n,DeadAGI(a2billing.php|3)
a2billing.conf:
Code:
[agi-conf1]
...
force_language = EN
...
[agi-conf2]
...
force_language = FR
...
[agi-conf3]
...
force_language = CN
...

Author:  pradi [ Wed Dec 26, 2007 4:45 am ]
Post subject: 

thanks a lot starvos.

Added after 2 hours 13 minutes:

I configured my extensions and a2billing.conf as below and also have installed EN, ES, FR sound files under /var/lib/asterisk/sounds/

But when I enable force language to ES or FR or EN it doesnt work. I get no sound and it hangup. Can anyone please help.



Connected to Asterisk 1.4.15 currently running on www (pid = 26562)
Verbosity is at least 4
-- Executing [200@a2billing:1] Answer("SIP/1238044468-0928c958", "") in new stack
-- Executing [200@a2billing:2] Wait("SIP/1238044468-0928c958", "2") in new stack
-- Executing [200@a2billing:3] DeadAGI("SIP/1238044468-0928c958", "a2billing.php|2") in new stack
[Dec 26 12:54:24] WARNING[26989]: res_agi.c:2116 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|2: A2Billing AGI internal configuration:
a2billing.php|2: Array
a2billing.php|2: (
a2billing.php|2: [debug] => 1
a2billing.php|2: [asterisk_version] => 1_2
a2billing.php|2: [answer_call] => 1
a2billing.php|2: [play_audio] => 1
a2billing.php|2: [say_goodbye] =>
a2billing.php|2: [play_menulanguage] =>
a2billing.php|2: [force_language] => fr
a2billing.php|2: [intro_prompt] =>
a2billing.php|2: [min_credit_2call] => 0
a2billing.php|2: [min_duration_2bill] => 0
a2billing.php|2: [notenoughcredit_cardnumber] => 1
a2billing.php|2: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php|2: [use_dnid] =>
a2billing.php|2: [no_auth_dnid] => Array
a2billing.php|2: (
a2billing.php|2: [0] => 2400
a2billing.php|2: [1] => 2300
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [number_try] => 3
a2billing.php|2: [force_callplan_id] =>
a2billing.php|2: [say_balance_after_auth] =>
a2billing.php|2: [say_balance_after_call] =>
a2billing.php|2: [say_rateinitial] =>
a2billing.php|2: [say_timetocall] =>
a2billing.php|2: [auto_setcallerid] => 1
a2billing.php|2: [force_callerid] =>
a2billing.php|2: [cid_sanitize] =>
a2billing.php|2: [cid_enable] =>
a2billing.php|2: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|2: [cid_auto_assign_card_to_cid] => 1
a2billing.php|2: [cid_auto_create_card] =>
a2billing.php|2: [cid_auto_create_card_len] => 10
a2billing.php|2: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|2: [cid_auto_create_card_credit] => 0
a2billing.php|2: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|2: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|2: [callerid_authentication_over_cardnumber] =>
a2billing.php|2: [sip_iax_friends] => 1
a2billing.php|2: [sip_iax_pstn_direct_call_prefix] => 9
a2billing.php|2: [sip_iax_pstn_direct_call] =>
a2billing.php|2: [ivr_voucher] =>
a2billing.php|2: [ivr_voucher_prefix] => 8
a2billing.php|2: [jump_voucher_if_min_credit] =>
a2billing.php|2: [extracharge_did] => Array
a2billing.php|2: (
a2billing.php|2: [0] =>
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [extracharge_fee] => Array
a2billing.php|2: (
a2billing.php|2: [0] =>
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
a2billing.php|2: [dialcommand_param_sipiax_friend] => |60|HL(3600000:61000:30000)
a2billing.php|2: [switchdialcommand] =>
a2billing.php|2: [failover_recursive_limit] => 2
a2billing.php|2: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|2: [send_reminder] =>
a2billing.php|2: [record_call] =>
a2billing.php|2: [monitor_formatfile] => gsm
a2billing.php|2: [agi_force_currency] =>
a2billing.php|2: [currency_association] => Array
a2billing.php|2: (
a2billing.php|2: [0] => usd:dollars
a2billing.php|2: [1] => mxn:pesos
a2billing.php|2: [2] => eur:euros
a2billing.php|2: [3] => all:credit
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|2: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|2: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|2: [logger_enable] => 1
a2billing.php|2: [log_file] => /tmp/a2billing.log
a2billing.php|2: [currency_association_internal] => Array
a2billing.php|2: (
a2billing.php|2: [usd] => dollars
a2billing.php|2: [mxn] => pesos
a2billing.php|2: [eur] => euros
a2billing.php|2: [all] => credit
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: [ivr_voucher_prefixe] => 8
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: file:a2billing.php - line:75 - IDCONFIG : 2
a2billing.php|2: file:a2billing.php - line:76 - MODE : standard
a2billing.php|2: file:a2billing.php - line:88 - AGI Request:
a2billing.php|2: file:a2billing.php - line:89 - Array
a2billing.php|2: (
a2billing.php|2: [agi_request] => a2billing.php
a2billing.php|2: [agi_channel] => SIP/1238044468-0928c958
a2billing.php|2: [agi_language] => en
a2billing.php|2: [agi_type] => SIP
a2billing.php|2: [agi_uniqueid] => 1198644861.19
a2billing.php|2: [agi_callerid] => 9459208260
a2billing.php|2: [agi_calleridname] => unknown
a2billing.php|2: [agi_callingpres] => 0
a2billing.php|2: [agi_callingani2] => 0
a2billing.php|2: [agi_callington] => 0
a2billing.php|2: [agi_callingtns] => 0
a2billing.php|2: [agi_dnid] => 200
a2billing.php|2: [agi_rdnis] => unknown
a2billing.php|2: [agi_context] => a2billing
a2billing.php|2: [agi_extension] => 200
a2billing.php|2: [agi_priority] => 3
a2billing.php|2: [agi_enhanced] => 0.0
a2billing.php|2: [agi_accountcode] => 1238044468
a2billing.php|2: )
a2billing.php|2:
a2billing.php|2: file:Class.A2Billing.php - line:601 - get_agi_request_parameter = 9459208260 ; SIP/1238044468-0928c958 ; 1198644861.19 ; 1238044468 ; 200
a2billing.php|2: file:a2billing.php - line:138 - [ANSWER CALL]
a2billing.php|2: file:Class.A2Billing.php - line:568 - FORCE LANGUAGE : fr
-- AGI Script a2billing.php completed, returning 0
-- Executing [200@a2billing:4] Wait("SIP/1238044468-0928c958", "2") in new stack
-- Executing [200@a2billing:5] Hangup("SIP/1238044468-0928c958", "") in new stack
== Spawn extension (a2billing, 200, 5) exited non-zero on 'SIP/1238044468-0928c958'




extensions.conf

exten => 100,1,Answer
exten => 100,2,Wait,2
exten => 100,3,DeadAGI(a2billing.php|1)
exten => 100,4,Wait,2
exten => 100,5,Hangup

exten => 200,1,Answer
exten => 200,2,Wait,2
exten => 200,3,DeadAGI(a2billing.php|2)
exten => 200,4,Wait,2
exten => 200,5,Hangup

exten => 300,1,Answer
exten => 300,2,Wait,2
exten => 300,3,DeadAGI(a2billing.php|3)
exten => 300,4,Wait,2
exten => 300,5,Hangup

a2billing.conf

[agi-conf1]

play_menulanguage = NO

force_language = EN

[agi-conf2]

play_menulanguage = NO

force_language = FR

[agi-conf3]

play_menulanguage = NO

force_language = ES

Author:  jroper [ Wed Dec 26, 2007 9:29 am ]
Post subject: 

Hi

When you say "...installed EN, ES, FR sound files under /var/lib/asterisk/sounds/" you do mean /var/lib/asterisk/sounds/en/
/var/lib/asterisk/sounds/es/ and /var/lib/asterisk/sounds/fr/ don't you ?

Have you also given the new soundfiles the correct ownership -usually Asterisk.

Joe

Author:  stavros [ Wed Dec 26, 2007 1:26 pm ]
Post subject: 

Also there was a bug related to menu language fixed in v1.3.1 so you might want to upgrade if you are running an earlier version.

Author:  pradi [ Wed Dec 26, 2007 3:27 pm ]
Post subject: 

thanks a lot guys. After I upgraded my version from 1.3 to 1.3.1 the issue was fixed.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/