freeswitch之h264视频通话问题

  安装freeswitch后,使用账号A给账号B发起视频通话(h264编码)请求,发现B收到的呼叫是音频通话,这是由于freeswitch没有启用h26x模块的原因。

一、修改配置

将mod_h26x一行的注释去掉,重启freeswitch
conf/autoload_configs/modules.conf.xml

<load module="mod_h26x"/>

二、报文分析

2.1 修改配置前

A发给服务器INVITE

INVITE sip:[email protected]:5060;transport=udp SIP/2.0
....................................
....................................

v=0
o=- 3902365913 3902365913 IN IP4 192.168.1.16
s=SDP
c=IN IP4 192.168.1.16
b=AS:2116
t=0 0
m=audio 10036 RTP/AVP 8 9 102 97 101
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 opus/48000
a=fmtp:102 maxplaybackrate=24000;sprop-maxcapturerate=24000;maxcodedaudiobandwidth=24000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 10038 RTP/AVP 99
b=TIAS:2000000
a=sendrecv
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=42801f;max-br=2000;packetization-mode=1
a=rtcp-fb:* ccm fir=

服务器发送INVITE到B

INVITE sip:[email protected]:5060 SIP/2.0
.....................................
.....................................

v=0
o=FreeSWITCH 1693344831 1693344832 IN IP4 192.168.1.102
s=FreeSWITCH
c=IN IP4 192.168.1.102
t=0 0
m=audio 32282 RTP/AVP 8 9 102 101 103
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 opus/48000/2
a=fmtp:102 useinbandfec=1; maxaveragebitrate=30000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:103 telephone-event/48000
a=fmtp:103 0-15
a=ptime:20

注:可以看到服务器发给B的INVITE消息中,只有音频参数

2.2 修改配置后

A发给服务器INVITE

INVITE sip:[email protected]:5060;transport=udp SIP/2.0
.............
Content-Type: application/sdp
Content-Length:   648

v=0
o=- 3902369924 3902369924 IN IP4 192.168.1.16
s=SDP
c=IN IP4 192.168.1.16
b=AS:2116
t=0 0
m=audio 10040 RTP/AVP 8 9 102 97 101
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 opus/48000
a=fmtp:102 maxplaybackrate=24000;sprop-maxcapturerate=24000;maxcodedaudiobandwidth=24000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 10042 RTP/AVP 99
b=TIAS:2000000
a=sendrecv
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=42801f;max-br=2000;packetization-mode=1
a=rtcp-fb:* ccm fir=

服务器发送INVITE到B

INVITE sip:[email protected]:5060 SIP/2.0
...................................
...................................
v=0
o=FreeSWITCH 1693352818 1693352819 IN IP4 192.168.1.102
s=FreeSWITCH
c=IN IP4 192.168.1.102
t=0 0
m=audio 28306 RTP/AVP 8 9 102 101 103
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 opus/48000/2
a=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:103 telephone-event/48000
a=fmtp:103 0-15
a=ptime:20
m=video 16646 RTP/AVP 99
b=AS:3072
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=42801f;max-br=2000;packetization-mode=1
a=rtcp-fb:99 ccm fir
a=rtcp-fb:99 ccm tmmbr
a=rtcp-fb:99 nack
a=rtcp-fb:99 nack pli

注:可以看到服务器发给B的INVITE消息中,同时含有音频和视频参数

你可能感兴趣的:(freeSwitch,freeswitch,h264,mod_h26x,视频,INVITE)