Hi,
I hope this can help some one:
To add new voice prompts to a2billing, first add new voiceprompts to asterisk putting the rigths dir sound in /usr/share/asterisk/sounds or /var/lib/asterisk/sounds (depends on your linux distro).
For example, in my case, i add "it" language sound directory with all subfolder like "digits", etc.
Then, look for the file /usr/share/asterisk/agi-bin/lib_a2billing/Class.A2Billing.php, line 448.
This his the little code i added to add italian sound:
Code:
$this -> languageselected = $res_dtmf ["result"];
if ($this->languageselected=="2")
$language = 'es';
elseif ($this->languageselected=="3")
$language = 'fr';
elseif ($this->languageselected=="4")
$language = 'it';
else
$language = 'en';
How you can see, is sufficent add a line like this:
Code:
elseif ($this->languageselected=="4")
$language = 'it';
Where "4" is the pressed digit and "it" is the country code for the new sounds prompts.
Then you've to change the file prepaid-menulang to add the new language options.
I hope in the next version of a2billing the voice prompts are not hardcoded even if the patch is very simpe.
Regards,
Alessandro Marzini
Digilab/YouPhone