Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 1.2.9
-
Component/s: mod_say_en
-
Labels:None
-
Environment:Debian
-
Platform:Linux x86/gcc
-
FreeSWITCH GIT Revision:
-
Reproduced with GIT HEAD?:Yes
-
Target Version:
Description
Hi,
I have created a small patch which allows you to use USD, GBP or EUR currencies when using phrase macros e.g.
<macro name="balanceavailusd">
<input pattern="(.*)">
<match>
<action function="play-file" data="the_balance_on_your_account_is.wav" />
<action function="say" data="$1" method="pronounced" type="currency_usd" />
</match>
</input>
</macro>
<macro name="balanceavailgbp">
<input pattern="(.*)">
<match>
<action function="play-file" data="the_balance_on_your_account_is.wav" />
<action function="say" data="$1" method="pronounced" type="currency_gbp" />
</match>
</input>
</macro>
I have only committed mod_say_en however I am willing to do this for the other mod_say languages if you think it is an ok solution:
https://github.com/pbaines/FreeSWITCH/commit/e82c228f54d13ac88dfc1ae47b91ab178901e057
The default for 'currency' is still dollars/cents so it shouldn't break existing installations.
Ideally I would like to be able to define the currency sound files in the XML however for a first patch I thought I would start small.
Regards,
Pete
I have created a small patch which allows you to use USD, GBP or EUR currencies when using phrase macros e.g.
<macro name="balanceavailusd">
<input pattern="(.*)">
<match>
<action function="play-file" data="the_balance_on_your_account_is.wav" />
<action function="say" data="$1" method="pronounced" type="currency_usd" />
</match>
</input>
</macro>
<macro name="balanceavailgbp">
<input pattern="(.*)">
<match>
<action function="play-file" data="the_balance_on_your_account_is.wav" />
<action function="say" data="$1" method="pronounced" type="currency_gbp" />
</match>
</input>
</macro>
I have only committed mod_say_en however I am willing to do this for the other mod_say languages if you think it is an ok solution:
https://github.com/pbaines/FreeSWITCH/commit/e82c228f54d13ac88dfc1ae47b91ab178901e057
The default for 'currency' is still dollars/cents so it shouldn't break existing installations.
Ideally I would like to be able to define the currency sound files in the XML however for a first patch I thought I would start small.
Regards,
Pete