Asterisk 在 android 中静音,但可以在 PC 上使用

Asterisk goes mute in android but works on PC

我有一个星号用于网络(仅在网站上调用)在 PC 上工作,但是当我 运行 在我的 android 5 上使用相同的客户端时没有声音,至少在我的android,它确实向PC发送语音,但无法重现传入的语音。

我的星号似乎一切都很好,它显示在通话中:

servidor-asterisk*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/002670-0000003d  (None)               Up      AppDial((Outgoing Line))
SIP/000001-0000003c  002670@from-internal Up      Dial(SIP/002670,60)
2 active channels
1 active call
31 calls processed

但是在 Eclipse 控制台中我从 android 收到代码 405:

"__tsip_transport_ws_onmessage", source: http://IP/videoNodeJs/scripts/sip_api.js (1)
"recv=OPTIONS sip:000001@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=ws SIP/2.0
"Not implemented", source: http://IP/videoNodeJs/scripts/sip_api.js (1)
"SEND: SIP/2.0 405 Method Not Allowed

有什么建议吗?

更新:

SIPML5 客户端:

<audio id="audio-remote"/>

var opcoes_chamada = {
    audio_remote: document.getElementById('audio-remote'),
    screencast_window_id: 0x00000000, // entire desktop
    bandwidth: { audio:undefined, video:undefined },
    video_size: { minWidth:undefined, minHeight:undefined, maxWidth:undefined, maxHeight:undefined },
    events_listener: { events: '*', listener: sipEventsListener },
    sip_caps: [
                    { name: '+g.oma.sip-im' },
                    { name: 'language', value: '\"en,fr\"' }
                ]
};

拨打电话:

callSession = sipStack.newSession('call-audio', opcoes_chamada);
callSession.call(sip_id_d);

接听电话:

e.newSession.setConfiguration(opcoes_chamada);
e.newSession.accept();

405 方法不允许

The method specified in the Request-Line is understood, but not 
allowed for the address identified by the Request-URI.
The response MUST include an Allow header field containing a 
list of valid methods for the indicated address.

对此的一些解释,是否有可能一切都很好,但音频 TAG 是移动客户端中的问题?如果不是,那'address identified by the Request-URI'是什么?

所以,它正在工作。

这就是交易,SIP 就好了,客户端来了。漏洞问题是一个 chrome 限制,使得用户必须点击才能在浏览器中播放任何声音,它是这样的:

我有我的音频标签:

<audio id="audio-remote"/>

后来我用 sipml5 提供源代码:

var opcoes_chamada = {
audio_remote: document.getElementById('audio-remote'),
screencast_window_id: 0x00000000, // entire desktop
bandwidth: { audio:undefined, video:undefined },
video_size: { minWidth:undefined, minHeight:undefined, maxWidth:undefined, maxHeight:undefined },
events_listener: { events: '*', listener: sipEventsListener },
sip_caps: [
                { name: '+g.oma.sip-im' },
                { name: 'language', value: '\"en,fr\"' }
            ]
};

这里有一个问题,音频标签是用 SIPML5 源提供的,但它处于暂停状态(或保持,不知道是什么...),只要用户不提供 onclick 操作,所以在拨打和接听电话的 2 行之后,我添加了一个按钮:

onClick="document.getElementById('audio-remote').play();"

一切终于成功了!