From 3a438a22ff383ecd6cb33a9dcb41aabd275c2f95 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 7 May 2024 22:41:13 -0500 Subject: [PATCH] Try new TTS style Old one does not work well for our self hosted one --- lib/customer_ogm.rb | 2 +- test/test_customer_ogm.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/customer_ogm.rb b/lib/customer_ogm.rb index dbdd67e..960edc6 100644 --- a/lib/customer_ogm.rb +++ b/lib/customer_ogm.rb @@ -56,7 +56,7 @@ module CustomerOGM end def formatted_tel - @tel.sub(/\A\+?1?(\d{3})(\d{3})/, "(\\1) \\2-") + @tel.sub(/\A\+?1(\d{3})(\d{3})(\d+)/, "\\1.\\2.\\3").gsub(/(?=\d)/, " ") end def to_render diff --git a/test/test_customer_ogm.rb b/test/test_customer_ogm.rb index 3093ad5..c86f63c 100644 --- a/test/test_customer_ogm.rb +++ b/test/test_customer_ogm.rb @@ -26,7 +26,7 @@ class CustomerOGMTest < Minitest::Test XML assert_equal( - [:voicemail_ogm_tts, { locals: { fn: "(555) 123-4567" } }], + [:voicemail_ogm_tts, { locals: { fn: " 5 5 5. 1 2 3. 4 5 6 7" } }], CustomerOGM::TTS.new("+15551234567", vcard).to_render ) end -- 2.45.2