freeswitch rtmp 小程序实现sip通话构想


  1. 搭建rtmp服务器 livego
  2. 小程序先推流到rtmp 
  3. freeswitch 编译mod_av 需要ffmpeg 加速播放的rtmp的 avformat.c

     if(strstr(filename,lilinrtmp)){
      av_dict_set(&lilindic, "fflags", "nobuffer", 0);
      av_dict_set(&lilindic, "analyzeduration", "50000", 0);
      av_dict_set(&opts, "timeout", "6000", 0);  
      switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "lilin1 include rtmp");       
    }    
    if ((error = avformat_open_input(&context->fc, filename, NULL,  &lilindic)) < 0)  

4、呼叫手机

originate  {RECORD_READ_ONLY=true,execute_on_media='record_session rtmp://192.168.1.101/live/lilin1'}sofia/gateway/uckef/188xxxx &playback(av://rtmp://192.168.1.101/live/lilin)

5.小程序播放rtmp

没在小程序上测试  用其他工具播放了下感觉行

交流:https://item.taobao.com/item.htm?id=620078442889

你可能感兴趣的:(freeswitch,ffmpeg,sip,freeswitch,rtmp,小程序通话)