From cecd0f4505e981041b416017bce1b1b2c19623dc Mon Sep 17 00:00:00 2001 From: Mahdi Moradi Date: Wed, 24 Oct 2012 18:59:36 +0330 Subject: [PATCH] With this changes, can say mobile numbers better. --- src/mod/say/mod_say_fa/mod_say_fa.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mod/say/mod_say_fa/mod_say_fa.c b/src/mod/say/mod_say_fa/mod_say_fa.c index e044fca7b6..838465b612 100644 --- a/src/mod/say/mod_say_fa/mod_say_fa.c +++ b/src/mod/say/mod_say_fa/mod_say_fa.c @@ -502,8 +502,16 @@ static switch_status_t fa_say_telephone(switch_core_session_t *session, char *to } else { - play_group(SSM_PRONOUNCED,0,tosay[0] - 48,tosay[1] - 48,NULL,session,args); - fa_say_telephone(session,tosay + 2,say_args,args); + if ( tosay_length == 10 && (tosay[0] != '2' || tosay[1] != '1') ) + { + play_group(SSM_PRONOUNCED,tosay[0] - 48,tosay[1] - 48,tosay[2] - 48,NULL,session,args); + fa_say_telephone(session,tosay + 3,say_args,args); + } + else + { + play_group(SSM_PRONOUNCED,0,tosay[0] - 48,tosay[1] - 48,NULL,session,args); + fa_say_telephone(session,tosay + 2,say_args,args); + } } return SWITCH_STATUS_SUCCESS; }