Я поставил
Код: Выделить всё
exten => 230,1,Answer()
exten => *2911,n,System(cat /tmp/test.txt)
exten => *2911,n,Set(SUMM=${FILE(/tmp/test.txt)})
exten => *2911,n,NoOp(test.txt is not ${SUMM})
exten => *2911,n,SayNumber(${SUMM})
exten => *2911,n,HangUp()
и у меня прочиталось
Код: Выделить всё
-- Executing [*2911@from-internal:1] Festival("SIP/721-000003d6", "Привет, чудики!") in new stack
== Parsing '/etc/asterisk/festival.conf': Found
-- Executing [*2911@from-internal:2] Festival("SIP/721-000003d6", "Что за наваждение?") in new stack
== Parsing '/etc/asterisk/festival.conf': Found
-- Executing [*2911@from-internal:3] Set("SIP/721-000003d6", "SUMM=123454321
-- ") in new stack
-- Executing [*2911@from-internal:4] NoOp("SIP/721-000003d6", "test.txt is not 123454321
-- ") in new stack
-- Executing [*2911@from-internal:5] SayNumber("SIP/721-000003d6", "123454321
-- ") in new stack
-- <SIP/721-000003d6> Playing 'digits/1.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/hundred.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/20.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/3.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/million.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/4.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/hundred.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/50.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/4.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/thousand.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/3.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/hundred.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/20.ulaw' (language 'en')
-- <SIP/721-000003d6> Playing 'digits/1.ulaw' (language 'en')
Потом добавил обрезание
exten => *2911,n,Set(SUMM=${FILE(/tmp/test.txtб4)})
и прочиталось 5 цифр
Код: Выделить всё
-- Executing [*2911@from-internal:3] Set("SIP/721-000003d7", "SUMM=54321
-- ") in new stack
-- Executing [*2911@from-internal:4] NoOp("SIP/721-000003d7", "test.txt is not 54321
-- ") in new stack
-- Executing [*2911@from-internal:5] SayNumber("SIP/721-000003d7", "54321