Openfire + XMPPFramework:使用TURNsocket进行文件传输不起作用

时间:2013-01-02 05:31:23

标签: ios file-transfer openfire xmppframework

由于Openfire,我安装了http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-xmpp-integration/并创建了一个iOS客户端。我可以在Spark和Adium之间完美地发送文件,并在它们和我的iOS客户端之间发送消息(在模拟器上运行)。但是我无法从/向我的iOS客户端向/从Spark和Adium发送文件。所有Spark,Adium&模拟器在我的Mac上运行。

以下是一些设置:

  

xmpp.domain:openfire.local

     

xmpp.proxy.enabled:true

     

xmpp.proxy.externalip:proxy.openfire.local

     

xmpp.proxy.port:7777

我还将此行添加到/ private / etc / hosts中,否则我无法telnet proxy.openfire.local 7777:

  

192.xxx.xxx.xxx proxy.openfire.local

接收文件时记录

RCV: <iq xmlns="jabber:client" id="UKp3O-91" to="test1@openfire.local/77cd3862" from="test2@openfire.local/Spark 2.6.3" type="set"><si xmlns="http://jabber.org/protocol/si" id="jsi_4009669764706051217" mime-type="image/png" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="Screen Shot 3 PM.png" size="136871"><desc>Sending file</desc></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option><option><value>http://jabber.org/protocol/ibb</value></option></field></x></feature></si></iq>

SEND: <iq type="error" to="test2@openfire.local/Spark 2.6.3" id="UKp3O-91"><si xmlns="http://jabber.org/protocol/si" id="jsi_4009669764706051217" mime-type="image/png" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="Screen Shot 3 PM.png" size="136871"><desc>Sending file</desc></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option><option><value>http://jabber.org/protocol/ibb</value></option></field></x></feature></si><error type="cancel" code="501"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

发送文件时记录

SEND: <iq type="get" to="test2@openfire.local/Spark 2.6.3" id="123"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>

RCV: <iq xmlns="jabber:client" id="123" to="test1@openfire.local/e1d61d2" type="result" from="test2@openfire.local/Spark 2.6.3"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="Smack" type="pc"/><feature var="http://jabber.org/protocol/xhtml-im"/><feature var="http://jabber.org/protocol/muc"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/commands"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/ibb"/></query></iq>

SEND: <iq type="set" to="test2@openfire.local/Spark 2.6.3" id="1235"><si xmlns="http://jabber.org/protocol/si" id="jabber200" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="image.jpg" size="18699"/><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option><option><value>http://jabber.org/protocol/ibb</value></option></field></x></feature></si></iq>

RCV: <iq xmlns="jabber:client" id="1235" to="test1@openfire.local/e1d61d2" from="test2@openfire.local/Spark 2.6.3" type="result"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value><value>http://jabber.org/protocol/ibb</value></field></x></feature></si></iq>

SEND: <iq type="get" to="openfire.local" id="3AB85477-DE06-4D17-9B85-977F38B746BA"><query xmlns="http://jabber.org/protocol/disco#items"></query></iq>

RCV: <iq xmlns="jabber:client" type="result" id="3AB85477-DE06-4D17-9B85-977F38B746BA" from="openfire.local" to="test1@openfire.local/e1d61d2"><query xmlns="http://jabber.org/protocol/disco#items"><item jid="rtpbridge.openfire.local" name="Media Proxy Service"/><item jid="proxy.openfire.local" name="Socks 5 Bytestreams Proxy"/><item jid="pubsub.openfire.local" name="Publish-Subscribe service"/><item jid="conference.openfire.local" name="Public Chatrooms"/></query></iq>

SEND: <iq type="get" to="proxy.openfire.local" id="8C8DCC93-A591-4051-BDB1-C76D22E15527"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>

RCV: <iq xmlns="jabber:client" type="result" id="8C8DCC93-A591-4051-BDB1-C76D22E15527" from="proxy.openfire.local" to="test1@openfire.local/e1d61d2"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="proxy" name="SOCKS5 Bytestreams Service" type="bytestreams"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/></query></iq>

SEND: <iq type="get" to="proxy.openfire.local" id="ECE4ADBB-27FB-45BF-8423-75656DED7C05"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>

RCV: <iq xmlns="jabber:client" type="result" id="ECE4ADBB-27FB-45BF-8423-75656DED7C05" from="proxy.openfire.local" to="test1@openfire.local/e1d61d2"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost jid="proxy.openfire.local" host="192.xxx.xxx.xxx" port="7777"/></query></iq>

SEND: <iq type="set" to="test2@openfire.local/Spark 2.6.3" id="E5FFB7B6-670E-4308-9203-B73527950D8C"><query xmlns="http://jabber.org/protocol/bytestreams" sid="jabber200" mode="tcp"><streamhost jid="proxy.openfire.local" host="192.xxx.xxx.xxx" port="7777"></streamhost></query></iq>

RCV: <iq xmlns="jabber:client" id="E5FFB7B6-670E-4308-9203-B73527950D8C" to="test1@openfire.local/e1d61d2" type="result" from="test2@openfire.local/Spark 2.6.3"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost-used jid="proxy.openfire.local"/></query></iq>

最后调用了这个方法:

[TURNSocket doTotalTimeout]

我希望有经验的人可以指出问题所在。提前谢谢!

0 个答案:

没有答案