2

这是我的日志,我的通话总是以超时结束

我也在使用 angularjs,所以我正在做的是在 app.js 中启动 sinchClient(来自工厂)并添加 onIncoming 侦听器,然后最终在控制器中进行调用(来自工厂)

GET http://localhost:63342/chatome/www/cordova.js 
i {sinch: f, eventListeners: Array[0], callBuffert: Object, localMediaStream: undefined, incomingCallCustomStream: undefined…}
Notification {progress: 0, message: "Get authentication token", object: undefined}
Notification {progress: 0.2, message: "Get instance using auth token", object: undefined}
Notification {progress: 0.4, message: "Get MXP configuration", object: undefined}
Notification {progress: 0.6, message: "Create MXP object", object: undefined}
Notification {progress: 0.8, message: "Will start active connection", object: undefined}
Notification {progress: 0.8, message: "Manually starting active connection", object: undefined}
Notification {progress: 0, message: "SinchClient started", object: undefined}
Notification {progress: 1, message: "Successfully started SinchClient", object: undefined}
Notification {progress: 0, message: "CallUser method called", object: "brenty"}
Notification {progress: 0, message: "Will retrieve new Mic for stream", object: undefined}
Notification {progress: 0, message: "Call was muted using mute().", object: undefined}
Notification {progress: 0, message: "Call PROGRESSING timeout. Will hangup call.", object: g}message: "Call PROGRESSING timeout. Will hangup call."object: gactiveInstance: undefinedautoAnswer: falseautoHangup: falsecallDomain: "data"callEndCause: 1callId: "bf5d5c3a-9b08-47ed-9275-5d03eb1447ed"callOutbound: truecallState: 3clientMap: Objectvirtual: Objectfs: "29987351-7351-4835-86c1-179ad669a45eS"fu: "brenty"__proto__: Object__proto__: Object__defineGetter__: __defineGetter__() { [native code] }__defineSetter__: __defineSetter__() { [native code] }__lookupGetter__: __lookupGetter__() { [native code] }__lookupSetter__: __lookupSetter__() { [native code] }constructor: Object() { [native code] }hasOwnProperty: hasOwnProperty() { [native code] }isPrototypeOf: isPrototypeOf() { [native code] }propertyIsEnumerable: propertyIsEnumerable() { [native code] }toLocaleString: toLocaleString() { [native code] }toString: toString() { [native code] }valueOf: valueOf() { [native code] }get __proto__: __proto__() { [native code] }set __proto__: __proto__() { [native code] }customHeaders: Objecttype: "voice"__proto__: ObjectdataChannels: Object__proto__: Objecterror: nulleventListeners: Array[3]0: Object1: Object2: Objectlength: 3__proto__: Array[0]fromId: "triniwiz"hangupRetries: 6iceMapRx: Object__proto__: ObjecticeMapTx: Array[0]length: 0__proto__: Array[0]incomingStream: undefinedincomingStreamURL: undefinedjoinBuffer: Object__proto__: ObjectoutgoingOffer: RTCSessionDescriptionsdp: "v=0
↵o=- 2486728347566751432 2 IN IP4 127.0.0.1
↵s=-
↵t=0 0
↵a=group:BUNDLE audio video
↵a=msid-semantic: WMS nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵m=audio 9 RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
↵c=IN IP4 0.0.0.0
↵a=rtcp:9 IN IP4 0.0.0.0
↵a=ice-ufrag:9XgGQPNJQUYrwuC3
↵a=ice-pwd:7Y30gM1zjN0Vnt5y6IoOoNYD
↵a=fingerprint:sha-256 99:E8:0A:BB:55:9A:5F:C6:21:01:06:32:4B:5A:5E:B7:F0:A7:87:49:68:0A:20:4E:5C:AA:ED:66:87:6E:A3:AB
↵a=setup:actpass
↵a=mid:audio
↵a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
↵a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
↵a=sendrecv
↵a=rtcp-mux
↵a=rtpmap:111 opus/48000/2
↵a=fmtp:111 minptime=10; useinbandfec=1
↵a=rtpmap:103 ISAC/16000
↵a=rtpmap:104 ISAC/32000
↵a=rtpmap:9 G722/8000
↵a=rtpmap:0 PCMU/8000
↵a=rtpmap:8 PCMA/8000
↵a=rtpmap:106 CN/32000
↵a=rtpmap:105 CN/16000
↵a=rtpmap:13 CN/8000
↵a=rtpmap:126 telephone-event/8000
↵a=maxptime:60
↵a=ssrc:885316323 cname:joI6MrZklmLX+lvZ
↵a=ssrc:885316323 msid:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG a7565e73-846b-495a-b50a-42aff6d70d06
↵a=ssrc:885316323 mslabel:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵a=ssrc:885316323 label:a7565e73-846b-495a-b50a-42aff6d70d06
↵m=video 9 RTP/SAVPF 100 116 117 96
↵c=IN IP4 0.0.0.0
↵a=rtcp:9 IN IP4 0.0.0.0
↵a=ice-ufrag:9XgGQPNJQUYrwuC3
↵a=ice-pwd:7Y30gM1zjN0Vnt5y6IoOoNYD
↵a=fingerprint:sha-256 99:E8:0A:BB:55:9A:5F:C6:21:01:06:32:4B:5A:5E:B7:F0:A7:87:49:68:0A:20:4E:5C:AA:ED:66:87:6E:A3:AB
↵a=setup:actpass
↵a=mid:video
↵a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
↵a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
↵a=extmap:4 urn:3gpp:video-orientation
↵a=sendrecv
↵a=rtcp-mux
↵a=rtpmap:100 VP8/90000
↵a=rtcp-fb:100 ccm fir
↵a=rtcp-fb:100 nack
↵a=rtcp-fb:100 nack pli
↵a=rtcp-fb:100 goog-remb
↵a=rtpmap:116 red/90000
↵a=rtpmap:117 ulpfec/90000
↵a=rtpmap:96 rtx/90000
↵a=fmtp:96 apt=100
↵a=ssrc-group:FID 3499157865 1266786744
↵a=ssrc:3499157865 cname:joI6MrZklmLX+lvZ
↵a=ssrc:3499157865 msid:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG c62982b1-d511-4e38-99dc-f212c2f334bc
↵a=ssrc:3499157865 mslabel:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵a=ssrc:3499157865 label:c62982b1-d511-4e38-99dc-f212c2f334bc
↵a=ssrc:1266786744 cname:joI6MrZklmLX+lvZ
↵a=ssrc:1266786744 msid:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG c62982b1-d511-4e38-99dc-f212c2f334bc
↵a=ssrc:1266786744 mslabel:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵a=ssrc:1266786744 label:c62982b1-d511-4e38-99dc-f212c2f334bc
↵"type: "offer"__proto__: RTCSessionDescriptionoutgoingStream: MediaStreamactive: trueended: falseid: "nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG"label: "nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG"onactive: nullonaddtrack: nullonended: nulloninactive: nullonremovetrack: null__proto__: MediaStreamoutgoingStreamURL: "blob:http%3A//localhost%3A63342/72a45df9-ae1f-4098-b7e3-743589f5cc74"pcMap: ObjectproxyUrl: "audio:ISAC/0.0.0.0/0/81.19.110.135:23526"sdpAnswerBuffer: ObjectsdpMap: Objectsinch: fPAPI: Object_appKey: "appKey"_appSecret: undefined_autoStartMxp: true_customStream: undefined_expiresIn: 86400_logHandler: (message) {_logMxpHandler: (){}_multiCall: true_onlineCapability: true_sessionId: "91cf12c2-2b03-47f9-b02f-1ebcdfb97e04"_sessionSecret: "M1sdRn5z2UCTYVMGrAc6FQ=="_subInstanceId: 2586157107_supportVideo: true_url: ObjectapplicationKey: "appKey"authenticate: () { [native code] }authenticateNumber: () { [native code] }authenticateUsername: () { [native code] }callClient: icallData: () { [native code] }callPSTN: () { [native code] }callReporting: () { [native code] }capabilities: ObjectchangePassword: () { [native code] }confirmUserSMS: () { [native code] }createUser: () { [native code] }firefox: falsegetConfiguration: () { [native code] }getInstance: () { [native code] }getInstances: () { [native code] }getServerTime: () { [native code] }getTransportById: () { [native code] }getTransportByParticipants: () { [native code] }getUserProfile: () { [native code] }messageReporting: () { [native code] }mxp: ppostMedia: () { [native code] }pushMessage: () { [native code] }renewInstance: () { [native code] }renewSecret: () { [native code] }started: truetimeDelta: -252updateUser: () { [native code] }user: nverifyUserSMS: () { [native code] }__proto__: ftimeEnded: Thu Jul 02 2015 22:08:18 GMT-0400 (AST)__proto__: Invalid DatetimeEstablished: nulltimeProgressing: nulltoId: "brenty"videoSupport: truewebRtcConfig: ObjecticeServers: Array[2]0: Objecturl: "stun:23.21.150.121"__proto__: Object1: Objectlength: 2__proto__: Array[0]__proto__: Object__proto__: gprogress: 0__proto__: Notification
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Call HANGUP Received", object: undefined}
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
TIMEOUT
MXPLog {message: "Added meta data to MXP message", object: q}message: "Added meta data to MXP message"object: q__proto__: MXPLog
TypeError: Cannot read property 'key' of undefined
    at p.17.p.identifyEnKey (sinch.min.js:6)
    at d (sinch.min.js:4)
    at 8.p.then.l.nextTick.h.promiseDispatch.j (sinch.min.js:4)
    at p.8.d.promiseDispatch (sinch.min.js:4)
    at sinch.min.js:4
    at Array.a (sinch.min.js:4)
    at d (sinch.min.js:4)
TypeError: Cannot read property 'key' of undefined
    at p.17.p.identifyEnKey (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:6:27539)
    at d (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:9844)
    at 8.p.then.l.nextTick.h.promiseDispatch.j (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:10117)
    at p.8.d.promiseDispatch (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:4377)
    at http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:3382
    at Array.a (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:7540)
    at d (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:836)
Notification {progress: 0, message: "Successfully initiated call, waiting for MXP signalling.", object: Object}
4

2 回答 2

1

由于某种原因,启动数据调用的 API 调用似乎没有正确进行,这可能是由于您集成 SDK 的方式、SDK 中的错误或其他问题。示例应用程序(随 SDK 提供)是否可以在您的环境中使用您的应用程序密钥?

此外,您能否确保(通过在拨打电话时查看 chrome 中的“网络”选项卡)正确发出发起呼叫的请求并且没有错误。

如果可以,您能否分享有关您的设置和/或代码的更多详细信息?

编辑:我正在寻找这样的请求; 在此处输入图像描述

于 2015-07-06T08:54:45.403 回答
0

我也收到了控制台消息Notification {progress: 0, message: "Will retrieve new Mic for stream", object: undefined}在为此苦苦挣扎了一段时间后,我找到了一个可以为我解决问题的解决方案。基本上,Sinch 要求页面上出现 HTML5 音频元素。查看您的onCallProgressingonCallEstablished事件处理程序,您会看到如下所示的行:

'onCallProgressing': function (TheSinchCall) {

    $('#SinchRingtone').trigger("play");
},

'onCallEstablished': function (TheSinchCall) {

    $('#SinchIncoming').attr('src', TheSinchCall['incomingStreamURL']);
    $('#SinchRingtone').trigger('pause');
},

当HTML 标签不在页面上$('#SinchRingtone')并且不返回 jQuery 元素时,Sinch 将不起作用。$('#SinchIncoming')

于 2015-07-22T15:12:51.497 回答