[jdev] Regarding XMPP Voice Message Processing
Jonathan Dickinson
jonathan.dickinson at k2.com
Mon May 11 04:15:07 CDT 2009
> -----Original Message-----
> From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On
> Behalf Of Charles Zhou
> Sent: 11 May 2009 10:43 AM
> To: jdev at jabber.org
> Subject: Re: [jdev] Regarding XMPP Voice Message Processing
>
> [...]
>
> The flow in our application now is as below:
> 1. First Client A setup the connection with Server, login
> 2. Get the list of friends, check the online frends, etc
> 3. Client A select one friend, chose send voice message
> 4. Start the voice record, voice will record as one AMR file
> 5. Send the AMR data to server
> 6. Server will check the destination user status, see wether
> it's online or not.
> 7. If the dest-user online, server will send the notification
> to him, "one voice message, do you want to receive? "
> 8. If it chose receive, then server will send the voice data to
> it.
> 9. All these communication base on socket communication.
>
> So now we're finding the solution on XMPP.... how we can do?
> thanks very much
Back in the day XMPP transfers were facilitated with FTP/HTTP. Both are *really* easy to implement (especially HTTP - as it probably has a client library on your platform). You also still get the delayed delivery. I can't remember the XEP; but I am sure someone else on the list could fill you in.
1. First Client A setup the connection with Server, login.
2. Get the list of friends, check the online friends, etc.
3. Client A select one friend, chose send voice message.
4. Start the voice record, voice will record as one AMR file.
5. Upload AMR to server over HTTP/FTP.
i. If HTTP the server responds with the URL to the file.
ii. If FTP you will first need to communicate with an XMPP component to get the file name to use.
6. Send a <message> to the other user; and include the upload URL (you will need to refer to the XEP for the element to use).
7. According to the normal <message> processing rules the message will be delivered when the destination is online.
8. They can then choose to download the message at any time. The XMPP server is not responsible for sending it - the HTTP/FTP one is.
i. The HTTP/FTP server could delete the message automatically when it is successfully downloaded.
There is a further benefit to using HTTP - GPRS networks are often shaped; so anything over port 80 will be faster than the rest.
>
> Regards
> Charles
>
More information about the JDev
mailing list