我制作了一个基本的ruby程序来制作调用文件并将它们发送到星号的传出文件。
outbound = [<phone numbers>]
for number in outbound
call_file = File.new("#{number}.call", "w")
call_file.puts("Channel: SIP/ext-sip-account/#{number}",
"Context: test",
"Extension: 100")
call_file.close
File.rename "#{number}.call", "/var/spool/asterisk/outgoing/#{number}.call"
end
运行此文件会创建文件并成功将其移动到目标位置,但Asterisk不会读取该文件或将其删除。