我正在尝试通过我的应用程序中的jingle实现文件传输。有人可以帮忙吗
我有这个错误吗?我不知道为什么服务器可以处理文件时服务不可用使用spark传输,所以我想我可能会忘记提供商或扩展程序
应该添加。
我已经有了这个:
pm.addIQProvider("jingle", "http://jabber.org/protocol/jingle",
new org.jivesoftware.smackx.provider.JingleProvider());
pm.addExtensionProvider("description", "http://jabber.org/protocol/jingle/description/audio",
new org.jivesoftware.smackx.provider.JingleContentDescriptionProvider.Audio());
pm.addExtensionProvider("description", "http://jabber.org/protocol/jingle/description/audio",
new org.jivesoftware.smackx.provider.JingleContentDescriptionProvider.Audio());
pm.addExtensionProvider("transport", "http://jabber.org/protocol/jingle/transport/ice",
new org.jivesoftware.smackx.provider.JingleTransportProvider.Ice());
pm.addExtensionProvider("transport", "http://jabber.org/protocol/jingle/transport/raw-udp",
new org.jivesoftware.smackx.provider.JingleTransportProvider.RawUdp());
pm.addExtensionProvider("busy", "http://jabber.org/protocol/jingle/info/audio",
new org.jivesoftware.smackx.provider.JingleContentInfoProvider.Audio.Busy());
pm.addExtensionProvider("hold", "http://jabber.org/protocol/jingle/info/audio",
new org.jivesoftware.smackx.provider.JingleContentInfoProvider.Audio.Hold());
pm.addExtensionProvider("mute", "http://jabber.org/protocol/jingle/info/audio",
new org.jivesoftware.smackx.provider.JingleContentInfoProvider.Audio.Mute());
pm.addExtensionProvider("queued", "http://jabber.org/protocol/jingle/info/audio",
new org.jivesoftware.smackx.provider.JingleContentInfoProvider.Audio.Queued());
pm.addExtensionProvider("ringing", "http://jabber.org/protocol/jingle/info/audio",
new org.jivesoftware.smackx.provider.JingleContentInfoProvider.Audio.Ringing());
日志说:
D / SMACK(19570):07:57:35 PM RCV(1079353408): <iq type="error" id="u63Ey-6"
from="1@localhost.localdomain/Smack"
to="a@localhost.localdomain/Smack">
<jingle xmlns="urn:xmpp:jingle:1"
initiator="a@localhost.localdomain/Smack"
responder="1@localhost.localdomain/Smack"
action="transport-info" sid="4522287730196205154">
<content creator="initiator" name="JingleMediaManager">
<description xmlns="urn:xmpp:jingle:apps:rtp:1">
<payload-type id="0" name="PCMU" channels="1" clockrate="16000"/>
<payload-type id="3" name="gsm" channels="1" clockrate="0"/>
<payload-type id="4" name="g723" channels="1" clockrate="0"/>
</description>
<transport xmlns="http://www.xmpp.org/extensions/xep-0177.html#ns"/>
<transport xmlns="http://www.xmpp.org/extensions/xep-0177.html#ns">
<candidate generation="0" ip="192.168.123.102" port="10562"/>
</transport>
</content>
</jingle>
<error code="503" type="cancel">
<service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error></iq>
答案 0 :(得分:0)
对于Smack Jingle文件传输“服务不可用”表示另一方无法接受请求。