cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2470
Views
2
Helpful
9
Replies

Jabber API to send files

Jayant Kohli
Cisco Employee
Cisco Employee

Hi Team,

DO we have APIs available wherein we can setup the Jabber to send/receive the files within the participants?

regards,

Jayant

9 Replies 9

tinghche
Contributor
Contributor

Hi Jayant,

Sorry, the file transfer feature is not current implemented in CAXL.

Will update you if there is any plan in the roadmap.

Thanks,

Howard

Per the CUP documentation, it will route requests containing the XEP-0096 'file transfer' XMPP extensions (i.e. not block/reject), however CUP does not participate at all in the actual interpretation or processing of XEP-0096.  As I understand it, this means if both endpoints support XEP-0096, they could send low-level XMPP messages (via CAXL) to each other which contain the XEP-0096 schema elements, and therefore negotiate and implement file transfer between themselves.

There is no higher-level function in CAXL exposed for file transfer, the apps would need to build and send lower-level XMPP stanzas with XEP-0096 contents.

Hi David,

Based on the suggestion we tried following:

1. Using strophe.js unable to connect with the cups server , always we get the response as connecting , there is no response from our cups server after that  . is there any other approach to achieve the file transfer?

Strophe.js is roughly equivalent to CAXL, in that it represents a javascript library which implements XMPP over BOSH (note CUP does not support websockets.)  As Cisco does not support integrating directly via the BOSH interface (SIMPLE, CAXL and direct XMPP are supported) its possible that strophe.js 'might just work', but would not be officially supported.

Can you determine at the HTTP or XMPP level what the issue/error is?  I.e. a pcap of an attempted connection (non-secure) might be helpful...

As mentioned before, it may be possible to implement XEP-0096 using low-level CAXL requests (in much the same way that I assume the 'outofband' strophe.js plugin does it using low-level strophe.js requests)...not aware of any easier solution.

HI David,

As you recommended, we are working on XEP-0096 via CAXL.

But whenever we fire Stream Initiation(SI), getting <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></feature-not-implemented> without <text> information according to XEP-0020: Feature Negotiation.


I've attached all requests and responses, can you please help what was the problem?

1. Requesting Disco Information From Receiver

<body xmlns="http://jabber.org/protocol/httpbind" sid="5679F49E16" rid="1218099237">
<iq xmlns="jabber:client" to="preddy2@cisco.com/xep099tester" type="get">
<query xmlns="http://jabber.org/protocol/disco#info"></query>

</iq>

</body>

2. Receiver Disco Information Result

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams">
<iq from="preddy2@cisco.com/xep099tester" to="shahhuss@cisco.com/xep099tester" type="result" xmlns="jabber:client">
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="client" name="Cisco AJAX XMPP Library" type="pc"></identity>

<feature var="http://jabber.org/protocol/bytestreams"></feature>

<feature var="http://jabber.org/protocol/caps"></feature>

<feature var="http://jabber.org/protocol/chatstates"></feature>

<feature var="http://jabber.org/protocol/disco#info"></feature>

<feature var="http://jabber.org/protocol/ibb"></feature>

<feature var="http://jabber.org/protocol/muc"></feature>

<feature var="http://jabber.org/protocol/muc#user"></feature>

<feature var="http://jabber.org/protocol/si"></feature>

<feature var="http://jabber.org/protocol/si/profile/file-transfer"></feature>

<feature var="http://jabber.org/protocol/xhtml-im"></feature>

</query>

</iq>

</body>

3. Offer Stream Initiation

<body xmlns="http://jabber.org/protocol/httpbind" sid="58587F1758" rid="248678858">
<iq id="offer1" xmlns="jabber:client" to="preddy2@cisco.com/xep099tester" type="set">
<si id="a0" xmlns="http://jabber.org/protocol/si" mime-type="text/plain" profile="http://jabber.org/protocol/si/profile/file-transfer">
<file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="test.txt" size="1022"></file>

<feature xmlns="http://jabber.org/protocol/feature-neg">

<x xmlns="jabber:x:data" type="form">
<field var="stream-method" type="list-single">
<option>

<option>

<value>http://jabber.org/protocol/ibb</value>

</option>

</field>

</x>

</feature>

</si>

</iq>

</body>

4. Error

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams">

  <iq id="offer1" from="preddy2@cisco.com/xep099tester" to="shahhuss@cisco.com/xep099tester"

  type="error" xmlns="jabber:client">

  <si id="a0" mime-type="text/plain"

  profile="http://jabber.org/protocol/si/profile/file-transfer" xmlns="http://jabber.org/protocol/si">

  <file name="test.txt" size="1022"

  xmlns="http://jabber.org/protocol/si/profile/file-transfer"></file>

  <feature xmlns="http://jabber.org/protocol/feature-neg">

  <x type="form" xmlns="jabber:x:data">

  <field type="list-single" var="stream-method">

  <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">

  <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></feature-not-implemented>

  </error>

  </iq>

</body>

---------------------------------------------------------------------------------------

Thanks,

Hyun

Hi Hyun,

Have you checked if your CUPS server has the file transfer feature turned on?

Configuration and Administration of IM and Presence Service on Cisco Unified Communications Manager, Release 10.0(1) - …

Regards,

Howard

Hi Howard,

Thanks for you reply!

The configuration of CUPS were on. 

Fortunately we got it work.

What we need to do was not only implement sender side of logic but also implement for receiver side of logic.

Regards,

Hyun

Hi Hyun,

God to hear that...:)

Did you managed to use CAXL, or Strophe.js?

Do you might share the code sample to the forum so that others can follow?

Regards,

Howard

We refer Cryptocat filetransfer logic and added some amount of code to jabberwerx.js. :-)

I uploaded my sample code in here:

https://communities.cisco.com/docs/DOC-53445

-Hyun-


Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers