“RFC 2833 RTP事件”连续事件和E“结束”少量
为什么E位为0时有dtmf声音,为1时没有声音? (RTP 数据包以任何方式出现在wireshark 中)
背景:
我可以发送 RFC 2833 dtmf 事件,如 http://www.ietf.org/rfc/rfc2833.txt 当未设置 E 位时,将获得以下行为:
例如,如果按下 7874556332111111145855885#3
键,则所有事件都会发送并显示在像wireshark这样的程序中,但只有 87456321458585# 3 声音。 因此,第一个键(我认为这可能是一个单独的问题)和事件的任何重复(即 11111)都无法发出声音。
在上述链接文档的第 3.9 节图 2 中,他们给出了一个 911 示例,其中除了最后一个事件之外的所有事件都设置了 E 位。
当我将所有数字的“E”位设置为 1 时,我永远不会听到事件的声音。
我想到了一些可能的原因,但不知道是否是原因:
1)图2显示了发送的96和97的有效负载类型。我还没有发送这些标头。在第 3.8 节中,代码 96 和 97 被描述为“动态负载类型 96 和 97 已分别分配给冗余机制和电话事件负载”
2) 在第 3.5 节中,“E:”,“发送方可以延迟设置直到重新传输最后一个数据包以获取音调,而不是在第一次传输时结束位”有人知道如何实际执行此操作吗?
3)我有一个单独的输出流,它也在播放,所以想知道它是否会干扰听到这个流。
4) 还摆弄了时间戳间隔和 RTP 标记。
非常感谢任何帮助。以下是相关区域的 Wireshark 事件捕获示例:
6590 31.159045000 xx.x.x.xxx --.--.---.-- RTP EVENT Payload type=RTP Event, DTMF Pound # (end)
Real-Time Transport Protocol
Stream setup by SDP (frame 6225)
Setup frame: 6225
Setup Method: SDP
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 .... = Extension: False
.... 0000 = Contributing source identifiers count: 0
0... .... = Marker: False
Payload type: telephone-event (101)
Sequence number: 0
Extended sequence number: 65536
Timestamp: 2000
Synchronization Source identifier: 0x15f27104 (368210180)
RFC 2833 RTP Event
Event ID: DTMF Pound # (11)
1... .... = End of Event: True
.0.. .... = Reserved: False
..00 0000 = Volume: 0
Event Duration: 1000
请注意:音量为零是可获得的最大音量,如 ietf.org/rfc/rfc2833.txt 规范中所述:
“音量:对于 DTMF 数字和其他可表示为音调的事件, 该字段描述了音调的功率级别,表示为 去掉符号后以 dBm0 为单位。功率级别范围从 0 到 -63dBm0。有效 DTMF 范围为 0 至 -36 dBm0(必须 接受);低于 -55 dBm0 必须被拒绝(TR-TSY-000181, ITU-T Q.24A)。因此,较大的值表示较小的体积。这 值仅针对 DTMF 数字定义。对于其他事件,它 被发送者设置为零并被接收者忽略。” 问题出在“事件结束”位打开时。
Why do I get a dtmf sound when the E bit is 0 and no sound when it is 1? (RTP packets appear in wireshark either way)
Background:
I can send out a RFC 2833 dtmf event as outlined at http://www.ietf.org/rfc/rfc2833.txt
obtaining the following behaviour when the E bit is NOT set:
If for example keys 7874556332111111145855885#3
are pressed, then ALL events are sent and show up in a program like wireshark, however only 87456321458585#3
sound.
So the first key (which I figure could be a separate issue) and any repeats of an event (ie 11111) are failing to sound.
In section 3.9, figure 2 of the above linked document, they give a 911 example where all but the last event have the E bit set.
When I set the 'E' bit to 1 for all numbers, I never get an event to sound.
I have thought of some possible causes but do not know if they are the reason:
1) figure 2 shows payload types of 96 and 97 sent. I have not sent these headers. In section 3.8, codes 96 and 97 are described as "the dynamic payload types 96 and 97 have been assigned for the redundancy mechanism and the telephone event payload respectively"
2) In section 3.5, "E:", "A sender MAY delay setting the end bit until retransmitting the last packet for a tone, rather than on its first transmission" Does anyone have an idea of how to actually do this?
3) I have a separate output stream that also plays so wonder if it might be interfering with hearing this stream.
4) have also fiddled around with timestamp intervals and the RTP marker.
Any help is greatly appreciated. Here is a sample wireshark event capture of the relevant areas:
6590 31.159045000 xx.x.x.xxx --.--.---.-- RTP EVENT Payload type=RTP Event, DTMF Pound # (end)
Real-Time Transport Protocol
Stream setup by SDP (frame 6225)
Setup frame: 6225
Setup Method: SDP
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 .... = Extension: False
.... 0000 = Contributing source identifiers count: 0
0... .... = Marker: False
Payload type: telephone-event (101)
Sequence number: 0
Extended sequence number: 65536
Timestamp: 2000
Synchronization Source identifier: 0x15f27104 (368210180)
RFC 2833 RTP Event
Event ID: DTMF Pound # (11)
1... .... = End of Event: True
.0.. .... = Reserved: False
..00 0000 = Volume: 0
Event Duration: 1000
Please note: A volume of zero is the loudest obtainable level as explained in the ietf.org/rfc/rfc2833.txt specification:
"volume: For DTMF digits and other events representable as tones,
this field describes the power level of the tone, expressed
in dBm0 after dropping the sign. Power levels range from 0 to
-63 dBm0. The range of valid DTMF is from 0 to -36 dBm0 (must
accept); lower than -55 dBm0 must be rejected (TR-TSY-000181,
ITU-T Q.24A). Thus, larger values denote lower volume. This
value is defined only for DTMF digits. For other events, it
is set to zero by the sender and is ignored by the receiver."
The issue is when the "End of Event" bit is switched on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议您从 RFC 4733 开始,原因有两个:
以下是我对如何发送 DTMF 数字的理解:
为什么要为一个事件发送多个数据包?因为网络并不总是完美的,并且可能会发生一些丢失:
RFC 声明(2.5.1.2.“事件数据包的传输”):
<块引用>
为了稳健性,发送者应该
重传“状态”事件
定期。
:
并且(2.5.1.4.“最终数据包的重传”):
<块引用>
每个事件的最终数据包以及
对于每个段应该发送
间隔期间总共 3 次
由源用于更新。
这确保了持续时间
可以识别事件或片段
正确地即使是一个实例
最后一个数据包丢失。
至于你的问题:
如果没有 WireShark 跟踪,很难判断发生了什么,但我怀疑重复的
1
数字被忽略,因为连续事件之间没有区别;第一个1
数字被识别,其他数字被视为事件的重传。I recommend you to start with the RFC 4733 for two reasons:
Here is my understanding of how a DTMF digit should be sent:
Why should several packets be sent for one event ? Because the network is not always perfect and some loss can occur:
The RFC states (2.5.1.2. "Transmission of Event Packets") that:
And (2.5.1.4. "Retransmission of Final Packet") that:
As for your problem:
Without a WireShark trace, it is hard to tell what is going on, but I suspect that the repeating
1
digits are ignored because there is not distinction between successive events; the first1
digit is recognized and the others are considered as retransmissions of the event.我注意到您的音量设置为
0
;这似乎是听不到任何声音的可能原因?I notice your Volume is set to
0
; that seems like a likely reason to not be hearing any sound?美丽!非常感谢劳伦特。我已经根据您的建议实施了一个可行的解决方案。 (只是作为另一个答案发布以获得更好的文本格式 - 我会给你赏金)
总结出什么问题:
这是一个总结的流程示例:
*注意:刚刚查看了第 5 节中建议的 rfc4733 第一个示例,非常棒!比2833好多了
beauty! thanks a lot laurent. i have implemented a working solution based on your recommendations. (just posting as another answer to get better text formatting - I will give you the bounty)
to sum up what was wrong:
Here is a summarized flow example:
*note: just looked at the suggested rfc4733 first example in section 5 and it is great! much better than the 2833 ones