File transfer using SIP

守給你的承諾、 提交于 2019-12-11 02:04:46

问题


The question is - is there any way to transfer files using my sip provider - I'd like to make an android application - sip client with the only function to send files.
You enter your sip account information, number to deal and choose the file to send. You deal your friend, he answers and file transfer begins. The files can be any format.
I read a lot of information but didn't find the way to do the project. Any ideas?


回答1:


You probably should have went with jabber instead of SIP.

Anyway, there must be a way to negotiate a file transfer in SDP.

Google is my friend: http://tools.ietf.org/html/draft-ietf-mmusic-file-transfer-mech-11

If I had to do it, I'd involve a server to upload to, and just pass the URL and encryption key in SIP.




回答2:


SIP is abused in many ways, but this may be the worst of them ;)

Since each message should fit in a reasonably low MTU (some routers can't handle fragmented UDP), each message is 25% or so of headers and each message is confirmed from the other side... this would be both a very slow and very bandwidth intensive process. Also not very reliable.

If you're developing both ends, you might have a better off just sending a NOTIFY to the other client with a new event type value. In the message specify where are you waiting with connection and just transfer the file directly over TCP. That of course has it's own share of NAT handling issues, but at least it will be quite reliable once it's started.



来源:https://stackoverflow.com/questions/7240934/file-transfer-using-sip

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!