]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
With this changes, can say mobile numbers better.
authorMahdi Moradi <m.moradi@sepanta.net>
Wed, 24 Oct 2012 15:29:36 +0000 (18:59 +0330)
committerMahdi Moradi <m.moradi@sepanta.net>
Wed, 24 Oct 2012 15:47:56 +0000 (19:17 +0330)
src/mod/say/mod_say_fa/mod_say_fa.c

index e044fca7b6757c9cbdacd40e05ac306b60923732..838465b6122393603fe5d66cb3fbb9ebb59ce92b 100644 (file)
@@ -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;
 }