代码改变世界
[登录 · 注册]
  • freeswitch笔记(6)会议功能简介
  • 电话会议是一个常用功能,freeswitch当然支持,下面是基本用法:

    一、发起会议

    conference test bgdial user/1004
    

    上面的命令表示,发起1个名为test的会话,同时拨打1004用户,如果该用户接听了,就相当于加入会议。注:如果1004是第1个加入会议的人,此时会议室还没有人,只能听到背景音乐等待其它人加入。

    如果再拉1个人进来,即:

    conference test bgdial user/1000
    

    这时1000与1004,就可以相互听见对方的声音了。

    二、查看会议的人员列表

    conference test list
    

    上面的命令,表示查看会议test的用户列表,结果如下图: 

    注意:每行最开始的数字,即为用户的member-id,这个很有用,后面会讲到。 

    三、将某人从会议中踢出

    conference test kick 9
    

    将member-id为9的用户(即:1004)从会议test中踢出

    四、对某人静音/解除静音

    conference test mute 10
    

    表示在会议test中,对member-id为10的用户静音。如果把mute换成tmute即为解除静音。

    五、让某人听不到会议内容

    conference test deaf 10
    

    表示让member-id为10的用户,听不到test会议的内容,如果deaf换成undeaf即为恢复。 

    六、结束会议

    conference test hup all
    

    表示结束会议test,hup即为hangup的缩写 

    当然,还有其它很多命令,可以在freeswitch控制台下输入conference help查看,下面是完整列表:

    canvas-auto-clear <canvas_id> <true|false>
    count
    list [delim <string>]|[count]
    xml_list
    json_list [compact]
    energy <member_id|all|last|non_moderator> [<newval>]
    auto-energy <member_id|all|last|non_moderator> [<newval>]
    max-energy <member_id|all|last|non_moderator> [<newval>]
    agc <member_id|all|last|non_moderator> [<newval>]
    vid-canvas <member_id|all|last|non_moderator> [<newval>]
    vid-watching-canvas <member_id|all|last|non_moderator> [<newval>]
    vid-layer <member_id|all|last|non_moderator> [<newval>]
    volume_in <member_id|all|last|non_moderator> [<newval>]
    volume_out <member_id|all|last|non_moderator> [<newval>]
    position <member_id> <x>:<y>:<z>
    auto-3d-position [on|off]
    play <file_path> [async|<member_id> [nomux]]
    moh <file_path>|toggle|[on|off]
    pause [<member_id>]
    play_status [<member_id>]
    file_seek [+-]<val> [<member_id>]
    say <text>
    saymember <member_id> <text>
    cam
    stop <[current|all|async|last]> [<member_id>]
    dtmf <[member_id|all|last|non_moderator]> <digits>
    kick <[member_id|all|last|non_moderator]> [<optional sound file>]
    vid-flip <[member_id|all|last|non_moderator]>
    vid-border <[member_id|all|last|non_moderator]>
    hup <[member_id|all|last|non_moderator]>
    hold <[member_id|all]|last|non_moderator> [file]
    unhold <[member_id|all]|last|non_moderator>
    mute <[member_id|all]|last|non_moderator> [<quiet>]
    tmute <[member_id|all]|last|non_moderator> [<quiet>]
    unmute <[member_id|all]|last|non_moderator> [<quiet>]
    vmute <[member_id|all]|last|non_moderator> [<quiet>]
    tvmute <[member_id|all]|last|non_moderator> [<quiet>]
    vmute-snap <[member_id|all]|last|non_moderator>
    unvmute <[member_id|all]|last|non_moderator> [<quiet>]
    vblind <[member_id|all]|last|non_moderator> [<quiet>]
    tvblind <[member_id|all]|last|non_moderator> [<quiet>]
    unvblind <[member_id|all]|last|non_moderator> [<quiet>]
    deaf <[member_id|all]|last|non_moderator>
    undeaf <[member_id|all]|last|non_moderator>
    vid-filter <[member_id|all]|last|non_moderator> <string>
    relate <member_id>[,<member_id>] <other_member_id>[,<other_member_id>] [nospeak|nohear|clear]
    lock
    unlock
    dial <endpoint_module_name>/<destination> <callerid number> <callerid name>
    bgdial <endpoint_module_name>/<destination> <callerid number> <callerid name>
    transfer <conference_name> <member id> [...<member id>]
    record <filename>
    chkrecord <confname>
    norecord <[filename|all]>
    pause <filename>
    resume <filename>
    recording [start|stop|check|pause|resume] [<filename>|all]
    exit_sound on|off|none|file <filename>
    enter_sound on|off|none|file <filename>
    pin <pin#>
    nopin
    get <parameter-name>
    set <max_members|sound_prefix|caller_id_name|caller_id_number|endconference_grace_time> <value>
    file-vol <vol#>
    floor <member_id|last>
    vid-floor <member_id|last> [force]
    vid-banner <member_id|last> <text>
    vid-mute-img <member_id|last> [<path>|clear]
    vid-logo-img <member_id|last> [<path>|clear]
    vid-codec-group <member_id|last> [<group>|clear]
    vid-res-id <member_id>|all <val>|clear [force]
    vid-role-id <member_id|last> <val>|clear
    get-uuid <member_id|last>
    clear-vid-floor
    vid-layout <layout name>|group <group name> [<canvas id>]
    vid-write-png <path>
    vid-fps <fps>
    vid-res <WxH>
    vid-fgimg <file> | clear [<canvas-id>]
    vid-bgimg <file> | clear [<canvas-id>]
    vid-bandwidth <BW>
    vid-personal [on|off]
    

    这些命令不用死记,遇到新需求时,可以先大概猜名字,然后到最后参考文章链接中搜索,比如:会议中不想再让新人进来来,想锁定本次会议,看着lock好象是干这样的,到官网上看一下解释,就是它!

    参考文章:

    https://freeswitch.org/confluence/display/FREESWITCH/mod_conference

    https://www.jianshu.com/p/2302f3033c60

  • 上一篇:JVM问题典型案例定位学习
    下一篇:NIO复习(3):selector
  • 【推广】 阿里云小站-上云优惠聚集地(新老客户同享)更有每天限时秒杀!
    【推广】 云服务器低至0.95折 1核2G ECS云服务器8.1元/月
    【推广】 阿里云老用户升级四重礼遇享6.5折限时折扣!
  • 原文:https://www.cnblogs.com/yjmyzz/p/freeswitch-conference-intro.html
走看看 - 开发者的网上家园