FreeSWITCH mod_verto 採用 json-rpc 信令格式

登錄信令

{
    "jsonrpc": "2.0",
    "method": "login",
    "id": 1,
    "params": {
        "login": "1000@MY-IP-ADDRESS",
        "loginParams": {},
        "userVariables": {},
        "passwd": "1234",
        "sessid": "53FB0781-B586-4CDA-98C6-558680663B46"
    }
}

登錄信令響應

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "message": "logged in",
        "sessid": "53FB0781-B586-4CDA-98C6-558680663B46"
    }
}

發起呼叫信令

{
    "jsonrpc": "2.0",
    "method": "verto.invite",
    "id": 2,
    "params": {
        "dialogParams": {
            "remote_caller_id_number": "1008",
            "useVideo": false,
            "useMic": "any",
            "useStereo": false,
            "tag": "webcam",
            "login": "[email protected]",
            "useCamera": "any",
            "videoParams": {
                "minFrameRate": 30,
                "minWidth": "1280",
                "minHeight": "720"
            },
            "destination_number": "1008",
            "screenShare": false,
            "caller_id_name": "FreeSWITCH User",
            "caller_id_number": "1000",
            "callID": "0CD433FC-A909-4DF2-BC46-0A4A94E9B800",
            "remote_caller_id_name": "Outbound Call",
            "useSpeak": "any"
        },
        "sessid": "53FB0781-B586-4CDA-98C6-558680663B46",
        "sdp": "v=0\r\n
                o=- 8564086442942257834 2 IN IP4 127.0.0.1\r\n
                s=-\r\n
                t=0 0\r\n
                a=group:BUNDLE audio video\r\n
                a=msid-semantic: WMS\r\n
                m=audio 58157 UDP\/TLS\/RTP\/SAVPF 111 103 104 9 102 0 8 106 105 13 127 126\r\n
                c=IN IP4 82.166.93.197\r\n
                a=rtcp:52576 IN IP4 82.166.93.197\r\n
                a=candidate:3168280865 1 udp 2122260223 11.0.0.244 58157 typ host generation 0\r\n
                a=candidate:1260196625 1 udp 2122194687 10.134.172.254 58951 typ host generation 0\r\n
                a=candidate:3168280865 2 udp 2122260222 11.0.0.244 52576 typ host generation 0\r\n
                a=candidate:1260196625 2 udp 2122194686 10.134.172.254 58945 typ host generation 0\r\n
                a=candidate:4066106833 1 tcp 1518280447 11.0.0.244 60562 typ host tcptype passive generation 0\r\n
                a=candidate:94302177 1 tcp 1518214911 10.134.172.254 60563 typ host tcptype passive generation 0\r\n
                a=candidate:4066106833 2 tcp 1518280446 11.0.0.244 60564 typ host tcptype passive generation 0\r\n
                a=candidate:94302177 2 tcp 1518214910 10.134.172.254 60565 typ host tcptype passive generation 0\r\n
                a=candidate:1610196941 1 udp 1686052607 82.166.93.197 58157 typ srflx raddr 11.0.0.244 rport 58157 generation 0\r\n
                a=candidate:1610196941 2 udp 1686052606 82.166.93.197 52576 typ srflx raddr 11.0.0.244 rport 52576 generation 0\r\n
                a=candidate:2274372738 2 udp 1685987070 176.13.15.205 5834 typ srflx raddr 10.134.172.254 rport 58945 generation 0\r\n
                a=candidate:2274372738 1 udp 1685987071 176.13.15.205 5840 typ srflx raddr 10.134.172.254 rport 58951 generation 0\r\n
                a=ice-ufrag:g8lHDtPwH7m5xRex\r\n
                a=ice-pwd:Q6jcBJNTWAyu0JTuIaQAeNI3\r\n
                a=fingerprint:sha-256 0F:A1:68:51:87:3E:B4:C1:0D:33:97:40:78:22:2A:8C:D2:B6:46:23:F5:99:C9:88:5D:34:DB:E2:C5:94:B3:DD\r\n
                a=setup:actpass\r\n
                a=mid:audio\r\n
                a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n
                a=extmap:3 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time\r\n
                a=recvonly\r\n
                a=rtcp-mux\r\n
                a=rtpmap:111 opus\/48000\/2\r\n
                a=fmtp:111 minptime=10; useinbandfec=1\r\n
                a=rtpmap:103 ISAC\/16000\r\n
                a=rtpmap:104 ISAC\/32000\r\n
                a=rtpmap:9 G722\/8000\r\n
                a=rtpmap:102 ILBC\/8000\r\n
                a=rtpmap:0 PCMU\/8000\r\n
                a=rtpmap:8 PCMA\/8000\r\n
                a=rtpmap:106 CN\/32000\r\n
                a=rtpmap:105 CN\/16000\r\n
                a=rtpmap:13 CN\/8000\r\n
                a=rtpmap:127 red\/8000\r\n
                a=rtpmap:126 telephone-event\/8000\r\n
                a=maxptime:60\r\n
                m=video 61966 UDP\/TLS\/RTP\/SAVPF 100 101 116 117 96\r\n
                c=IN IP4 82.166.93.197\r\n
                a=rtcp:63816 IN IP4 82.166.93.197\r\n
                a=candidate:3168280865 1 udp 2122260223 11.0.0.244 61966 typ host generation 0\r\n
                a=candidate:1260196625 1 udp 2122194687 10.134.172.254 50435 typ host generation 0\r\n
                a=candidate:3168280865 2 udp 2122260222 11.0.0.244 63816 typ host generation 0\r\n
                a=candidate:1260196625 2 udp 2122194686 10.134.172.254 63396 typ host generation 0\r\n
                a=candidate:4066106833 1 tcp 1518280447 11.0.0.244 60566 typ host tcptype passive generation 0\r\n
                a=candidate:94302177 1 tcp 1518214911 10.134.172.254 60567 typ host tcptype passive generation 0\r\n
                a=candidate:4066106833 2 tcp 1518280446 11.0.0.244 60568 typ host tcptype passive generation 0\r\n
                a=candidate:94302177 2 tcp 1518214910 10.134.172.254 60569 typ host tcptype passive generation 0\r\n
                a=candidate:1610196941 1 udp 1686052607 82.166.93.197 61966 typ srflx raddr 11.0.0.244 rport 61966 generation 0\r\n
                a=candidate:1610196941 2 udp 1686052606 82.166.93.197 63816 typ srflx raddr 11.0.0.244 rport 63816 generation 0\r\n
                a=candidate:2274372738 1 udp 1685987071 176.13.15.205 5879 typ srflx raddr 10.134.172.254 rport 50435 generation 0\r\n
                a=candidate:2274372738 2 udp 1685987070 176.13.15.205 5860 typ srflx raddr 10.134.172.254 rport 63396 generation 0\r\n
                a=ice-ufrag:g8lHDtPwH7m5xRex\r\n
                a=ice-pwd:Q6jcBJNTWAyu0JTuIaQAeNI3\r\n
                a=fingerprint:sha-256 0F:A1:68:51:87:3E:B4:C1:0D:33:97:40:78:22:2A:8C:D2:B6:46:23:F5:99:C9:88:5D:34:DB:E2:C5:94:B3:DD\r\n
                a=setup:actpass\r\n
                a=mid:video\r\n
                a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\n
                a=extmap:3 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time\r\n
                a=extmap:4 urn:3gpp:video-orientation\r\n
                a=recvonly\r\n
                a=rtcp-mux\r\n
                a=rtpmap:100 VP8\/90000\r\n
                a=rtcp-fb:100 ccm fir\r\n
                a=rtcp-fb:100 nack\r\n
                a=rtcp-fb:100 nack pli\r\n
                a=rtcp-fb:100 goog-remb\r\n
                a=rtcp-fb:100 transport-cc\r\n
                a=rtpmap:101 VP9\/90000\r\n
                a=rtcp-fb:101 ccm fir\r\n
                a=rtcp-fb:101 nack\r\n
                a=rtcp-fb:101 nack pli\r\n
                a=rtcp-fb:101 goog-remb\r\n
                a=rtcp-fb:101 transport-cc\r\n
                a=rtpmap:116 red\/90000\r\n
                a=rtpmap:117 ulpfec\/90000\r\n
                a=rtpmap:96 rtx\/90000\r\n
                a=fmtp:96 apt=100\r\n
                "
    }
}

發起呼叫信令響應

{
    "jsonrpc": "2.0",
    "id": 2,
    "result": {
        "message": "CALL CREATED",
        "callID": "0CD433FC-A909-4DF2-BC46-0A4A94E9B800",
        "sessid": "53FB0781-B586-4CDA-98C6-558680663B46"
    }
}

會議被邀請信令

{
    "jsonrpc": "2.0",
    "method": "verto.media",
    "id": 637,
    "params": {
        "sdp": "v=0\n
                o=FreeSWITCH 1457232832 1457232833 IN IP4 159.203.164.7\n
                s=FreeSWITCH\n
                c=IN IP4 159.203.164.7\n
                t=0 0\n
                a=msid-semantic: WMS TcxpBqoS0j04fOIzkIArKYrlV7LCs9Ub\n
                m=audio 30784 UDP/TLS/RTP/SAVPF 111 126\n
                a=rtpmap:111 opus/48000/2\n
                a=fmtp:111 useinbandfec=1; minptime=10\n
                a=rtpmap:126 telephone-event/8000\n
                a=silenceSupp:off - - - -\n
                a=ptime:20\n
                a=sendonly\n
                a=fingerprint:sha-256 FE:CD:54:3E:2A:D7:DB:00:57:B7:D4:55:A8:EB:79:08:16:BB:B0:EA:43:44:42:9A:90:01:49:37:7B:31:48:F8\n
                a=setup:active\n
                a=rtcp-mux\n
                a=rtcp:30784 IN IP4 159.203.164.7\n
                a=ice-ufrag:qLh1zzclxONPNyQO\n
                a=ice-pwd:G7g4Drkist37beYsP5jfvlqS\n
                a=candidate:9922185636 1 udp 659136 159.203.164.7 30784 typ host generation 0\n
                a=ssrc:1323504502 cname:bhqCyFkpPbjUPSk0\n
                a=ssrc:1323504502 msid:TcxpBqoS0j04fOIzkIArKYrlV7LCs9Ub a0\n
                a=ssrc:1323504502 mslabel:TcxpBqoS0j04fOIzkIArKYrlV7LCs9Ub\n
                a=ssrc:1323504502 label:TcxpBqoS0j04fOIzkIArKYrlV7LCs9Uba0\n
                m=video 31380 UDP/TLS/RTP/SAVPF 100\n
                a=rtpmap:100 VP8/90000\n
                a=sendonly\n
                a=fingerprint:sha-256 FE:CD:54:3E:2A:D7:DB:00:57:B7:D4:55:A8:EB:79:08:16:BB:B0:EA:43:44:42:9A:90:01:49:37:7B:31:48:F8\n
                a=setup:active\n
                a=rtcp-mux\n
                a=rtcp:31380 IN IP4 159.203.164.7\n
                b=AS:1024\n
                a=rtcp-fb:100 ccm fir\n
                a=rtcp-fb:100 nack\n
                a=rtcp-fb:100 nack pli\n
                a=ssrc:594893571 cname:bhqCyFkpPbjUPSk0\n
                a=ssrc:594893571 msid:TcxpBqoS0j04fOIzkIArKYrlV7LCs9Ub v0\n
                a=ssrc:594893571 mslabel:TcxpBqoS0j04fOIzkIArKYrlV7LCs9Ub\n
                a=ssrc:594893571 label:TcxpBqoS0j04fOIzkIArKYrlV7LCs9Ubv0\n
                a=ice-ufrag:2KDK4wDMYuAuVdAZ\n
                a=ice-pwd:YTpxObqpLuBEfig7TKHN6bqU\n
                a=candidate:7508673635 1 udp 659136 159.203.164.7 31380 typ host generation 0\n
                ",
        "callID": "0CD433FC-A909-4DF2-BC46-0A4A94E9B800"
    }
}

會議被邀請信令響應

{
    "jsonrpc": "2.0",
    "method": "verto.answer",
    "id": 638,
    "params": {
        "callID": "0CD433FC-A909-4DF2-BC46-0A4A94E9B800"
    }
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章