Try new TTS style

Stephen Paul Weber created

Old one does not work well for our self hosted one

Change summary

lib/customer_ogm.rb       | 2 +-
test/test_customer_ogm.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Detailed changes

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

test/test_customer_ogm.rb 🔗

@@ -26,7 +26,7 @@ class CustomerOGMTest < Minitest::Test
 				</vcard4>
 			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