voip视频通话项目过程 rfc3261协议学习笔记

  1. 下载linphone客户端
    1) 进入用户界面选择中文
    2) 回主界面-》点击组手-》使用一个sip账号-》填写sip服务器相关ip,填写设备地址

  2. 下载freeswitch服务器
    1) 配置

https://blog.csdn.net/lvwx369/article/details/121233934

2) Vars.Xml配置ip

voip视频通话项目过程 rfc3261协议学习笔记_第1张图片

3)配置sip服务端
voip视频通话项目过程 rfc3261协议学习笔记_第2张图片

4)服务器需要设置支持视频不然没办法进行视频通话

https://blog.csdn.net/qq_40170041/article/details/127013514

  1. sip信令相关文档

1) http://www.sip.org.cn/?p=188

2) https://blog.csdn.net/jeffrey0000/article/details/47397481

3) http://www.meeteasy.com.cn/archives/2901.htm

  1. 客户端编写及开发过程准备与发现
    1)sip相关库交叉编译
    1)).osip
    ./configure --host=aarch64-himix210-linux CC=aarch64-himix210-linux-gcc --prefix=/home/lsh/Documents/lib_3dr/libosip_lib --enable-shared --disable-static

    2)).exosip
    ./configure --host=aarch64-himix210-linux --prefix=/home/lsh/Documents/lib_3dr/libosip_lib --enable-shared --disable-static CC=aarch64-himix210-linux-gcc PKG_CONFIG_PATH=/home/lsh/Documents/lib_3dr/libosip_lib/lib/pkgconfig/:/home/lsh/Documents/lib_3dr/openssl/lib/pkgconfig

    3)). Rtp音频发送设置mark = true表示开始音频发送 ;一般mark=false不然会自动断开;H264视频发送中注意sps 、pps、sei(可忽略)用单包发送;I和P用分片发送方式并且I\PPS\SPS三个发送是统一时间戳\PPS\SPS marK值为false;

    ss << “a=rtpmap:8 PCMA/8000\r\n”; //格式数值要对 不然会检测断开 rtp音频载重是8

4)).h264nal
NAL_SLICE = 1 非关键帧
NAL_SLICE_DPA = 2
NAL_SLICE_DPB = 3
NAL_SLICE_DPC =4
NAL_SLICE_IDR =5 关键帧
NAL_SEI = 6
NAL_SPS = 7 SPS帧
NAL_PPS = 8 PPS帧
NAL_AUD = 9
NAL_FILLER = 12

5)).Rtp时间戳很重要:会影响对端解码效果
rtp_head_tmp.timestamp = htonl(getCurrentMillisecond() * baseSample / 1000); //getCurrentMillisecond()获取1970年至今的毫秒数

6)).拨号申请
osip_message_set_supported(invite ,“100rel”);//必须加上

sdp:
ss << “v=0\r\n”;
ss << "o=sipPhone 1703033472 1703033473 IN IP4 " << local_ip << “\r\n”;
ss << “s=sipPhone\r\n”;
ss << "c=IN IP4 " << local_ip << “\r\n”;
ss << “t=0 0\r\n”;
ss << “m=audio " << aRtpMediaPort << " RTP/AVP 8 101\r\n”;
ss << “a=rtpmap:8 PCMA/8000\r\n”;
ss << “a=rtpmap:101 telephone-event/8000\r\n”;
ss << “a=fmtp:101 0-16\r\n”;
ss << “a=ptime:20\r\n”;
ss << “m=video " << vRtpMediaPort << " RTP/AVP 96\r\n”;
ss << “a=rtpmap:96 H264/90000\r\n”;
ss << “a=fmtp:96 profile-level-id=42801F\r\n”;//;max-br=768; ;packetization-mode=1
ss << “a=rtcp-fb:* trr-int 1000\r\n”;
ss << “a=rtcp-fb:* ccm tmmbr\r\n”;
ss << “a=rtcp-fb:96 nack pli\r\n”;
ss << “a=rtcp-fb:96 ccm fir\r\n”;

7)).呼叫流程;

https://blog.csdn.net/szkbsgy/article/details/124930070

你可能感兴趣的:(音视频,学习,笔记)