如何实现“传真协议”?
我想编写一个以编程方式发送传真的程序。或者接收传真。 但不能使用调制解调器。我想我正在尝试编写一个传真模拟器。硬件所做的一切,我想用软件来做。
关于这个主题有十亿个这样的问题,但他们要么建议使用在线服务,要么向我指出一个图书馆,它与我的计算机的调制解调器通信。以下是我的具体问题:
当我发送传真时,我可以听到电话线上的颤音。这告诉我,我的传真机正在生成可供收件人使用的提示音。 该协议是什么?是否有 RFC 指定如何将“像素”转换为“频率”? 机器是否来回通信,还是单向通信?
如果我们同意传真机将声音频率转换为图像,那么我们应该能够编写一个程序获取传真传输的 MP3 并输出图形。 为了做到这一点,我需要知道什么?
这些问题是否基于任何有缺陷的假设?我应该从哪里开始才能实现上面的目标#2?
I want to write a program that programmatically sends faxes. Or receives faxes. But not with a modem. I guess I'm trying to write a fax simulator. Everything that the hardware does, I want to do using software.
There are a billion SO questions on the topic, but they either suggest an online service to use or they point me to a library, which talks to my computer's modem. So here are my specific questions:
When I send a fax, I can hear the warbling on the telephone line. This tells me that my fax machine is generating tones that are consumable by the recipient's. What is that protocol? Is there an RFC which specifies how a "pixel" is converted to a "frequency"? Do the machines communicate back and forth, or is it one-way?
If we can agree that a fax machine translates sound frequencies to images, then one ought to be able to write a program which takes an MP3 of a fax transmission and outputs a graphic. What do I need to know in order to do this?
Are these questions based on any flawed assumptions? Where should I start so that I can accomplish goal #2 from above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
实际上,在调制解调器中,一个名为“DSP => 数字信号处理”的芯片负责将音频信号转换为数字数据。同样可以使用软件库来完成。已经有一个名为 SpanDSP 的开源 DSP 库,由“Steve Underwood”http://www.soft-switch 开发。 org/.
您可以在使用 SpanDSP 库时构建自己的应用程序,但明智的做法是使用 SpanDSP 的一些现有实现。目前SpanDSP已在开源FreeSwitch、CallWeaver和Asterisk PBX系统中实现。
但是,如果您只想发送和接收传真而不关心底层开发,那么请尝试ICTFAX 开源传真系统。
Actually in modem a chip called "DSP => Digital Signal Processing" is responsible to convert audio signals into digital DATA. and same can be done with a software library. there is already an open source DSP library called SpanDSP developed by "Steve Underwood" http://www.soft-switch.org/.
You can build your own application while using SpanDSP library, but it is wise to use some existing implementation of SpanDSP. Currently SpanDSP is implemented in open source FreeSwitch, CallWeaver and Asterisk PBX systems.
But if you only want to send and receive faxes without bothering low level development then try out ICTFAX Open Source FAX system.
您需要的传真规范是 ITU T4 和 T30,这要花费很多钱,而且几乎故意难以理解,而且它们会向您推荐各种调制解调器标准,以了解实际的“颤音”是如何完成的。
如果您希望获得像 RFC 这样免费/简单的东西,那么您现在可能应该放弃。
如果您确实想要解码音频文件,则需要将其视为两个完全独立的任务 - 首先将音调解码为数据流(构建多个软调制解调器,用于传真机可以同意通信的各种方式),以及然后将数据流解码为像素(编写传真机软件)。
传真机将光和暗转换为声音然后再返回,或者可以窃听两台传真机之间的对话并恢复图像(实时或通过某种捕获文件),这并没有从根本上错误,虽然我不确定 MP3 是否有效),但我怀疑您极大、极大地低估了所涉及的工作量。
The fax specifications you would need are ITU T4 and T30, which costs lots of money and are almost wilfully difficult to understand, and they'll refer you to the various modem standard for how the actual 'warbling' is done.
If you're hoping for something free/easy like an RFC, then you should probably give up now.
If you did want to decode an audio file, you would need to view that as two completely separate tasks - firstly decoding the tones to a data stream (build several soft-modems, for the various ways fax machines can agree to communicate), and then secondly decoding the data-stream to pixels (write a fax machine's software).
You are not fundamentally wrong that a fax machine converts light and dark into sound and then back again, or that it's possible to eavesdrop on a conversation between two fax machines and recover the image (either in real-time or via some kind of capture file, though I'm not sure that MP3 would work), but I suspect you've hugely, hugely underestimated the amount of work involved.
http://en.wikipedia.org/wiki/Fax
有很多背景知识。
ITU 协议非常复杂,IIRC 的确切规范不是免费的。
http://en.wikipedia.org/wiki/Fax
has plenty of background.
The ITU protocols are very involved, IIRC the exact specifications are not free.