首页 > sip > 是SDP sendonly意味着在这种情况下打开一个RTP音频流?

是SDP sendonly意味着在这种情况下打开一个RTP音频流? (is SDP sendonly means to open one RTP Audio stream in this case?)

2012-06-29 sipsdpfreeswitch

问题

我是sip / sdp世界的新手。
根据我对SDP协议的理解,如果我们将sip服务器中的a = sendonly定义为客户端软电话,则软电话应打开一个RTP会话进行监听,但不应将任何RTP数据包发送到目的地。我对么?

在我的情况下,我听不到任何声音,并且有一个RTP流来上传音频。注意:我正在使用多播地址。

这是SIP / SDP转储(从服务器到客户端软电话):

    SIP / 2.0 200 OK
    通过:SIP / 2.0 / UDP 192.168.8.219:5060; branch=z9hG4bK-d8754z-b394381274917501-1---d8754z-;rport=5060
    来自:; tag = d67855ee
    要:; tag = KQQHgQ93Sjg1F
    呼叫ID:YTExMzkwZDdhMGM1NTJmMDJlMGFiYjgxMGI1ZDNmMDI。
    CSeq:2邀请
    联系: 
    User-Agent:FreeSWITCH-mod_sofia / 1.2.0-rc2 + git~20120623T054003Z~65b2f2d2e7 + unclean~20120623T083401Z
    接受:application / sdp
    允许:邀请,确认,再见,取消,选项,消息,更新,信息,注册,转发,通知,发布,订阅
    支持:计时器,前置条件,路径,替换
    Allow-Events:talk,hold,presence,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer
    内容类型:application / sdp
    内容处理:会话
    内容长度:265

    V = 0
    o = FreeSWITCH 1340907341 1340907343 IN IP4 224.168.168.168
    S = FreeSWITCH的
    c = IN IP4 224.168.168.168
    t = 0 0
    A =只发送
    m =音频34567 RTP / AVP 0 101
    a = rtpmap:0 PCMU / 8000
    a = rtpmap:101电话事件/ 8000
    a = fmtp:101 0-16
    a = silenceSupp:off  -   -   -   - 
    A =的ptime:20

我使用另一个软电话在该地址和端口上组播声音(通过wireshark验证)。为什么我听不到声音?

顺便说一句,我使用xlite的软电话,服务器是freeswitch。

解决方法

a=sendonly正如您所怀疑的那样,是一个单向流。服务器说它将发送数据而不会接收数据,因此客户端必须打开一个监听端口。你正在做正确的事。

如果您没有获得音频,可能需要时间来运送像Wireshark这样的分析工具来查看服务器是否实际发送了任何RTP数据。

问题

I am a newbie to sip/sdp world.
From my understanding of SDP protocol, if we define a=sendonly from sip server to client softphone, the softphone should open one RTP session for listening, but it should not send any RTP packets to destination. Am I correct?

In my case, I can not hear any sounds coming in, and there is a RTP stream to upload audio. Note: I am using the multicast address.

here is a SIP/SDP dump (from server to client softphone):


    SIP/2.0 200 OK
    Via: SIP/2.0/UDP 192.168.8.219:5060;branch=z9hG4bK-d8754z-b394381274917501-1---d8754z-;rport=5060
    From: ;tag=d67855ee
    To: ;tag=KQQHgQ93Sjg1F
    Call-ID: YTExMzkwZDdhMGM1NTJmMDJlMGFiYjgxMGI1ZDNmMDI.
    CSeq: 2 INVITE
    Contact: 
    User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120623T054003Z~65b2f2d2e7+unclean~20120623T083401Z
    Accept: application/sdp
    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
    Supported: timer, precondition, path, replaces
    Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
    Content-Type: application/sdp
    Content-Disposition: session
    Content-Length: 265

    v=0
    o=FreeSWITCH 1340907341 1340907343 IN IP4 224.168.168.168
    s=FreeSWITCH
    c=IN IP4 224.168.168.168
    t=0 0
    a=sendonly
    m=audio 34567 RTP/AVP 0 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=silenceSupp:off - - - -
    a=ptime:20

I use another softphone to multicast sound(verify by wireshark) on that address and port. why can not I hear the sound?

by the way, softphone i am using xlite, the server is freeswitch.

解决方法

a=sendonly is, as you suspect, a unidirectional stream. The server says that it will send data and will not receive data, so the client must open a listening port. You're doing the right thing.

If you're not getting audio, it might be time to haul out an analysis tool like Wireshark to see if the server's actually sending any RTP data.

相似信息