VOIP using XMPP Framework in iPhone [closed] - iphone

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am able to implement Facebook and Gmail chat with the help of XMPP Framework in my iPhone app. Wanted to know if its possible to implement VOIP(SIP) in a similar manner using XMPP.

You can use jingle framework.This is what jingle wiki says:
"Jingle is an extension to the Extensible Messaging and Presence Protocol (XMPP) which adds peer-to-peer (P2P) session control (signaling) for multimedia interactions such as in Voice over IP (VoIP) or videoconferencing communications. It was designed by Google and the XMPP Standards Foundation. The multimedia streams are delivered using the Real-time Transport Protocol (RTP). If needed, NAT traversal is assisted using Interactive Connectivity Establishment (ICE)."
The libjingle library, used by Google Talk to implement Jingle, has been released to the public under a BSD license. It implements both the current standard protocol and the older, pre-standard version
Also there is a framework in Google project repository.
http://code.google.com/p/libjingle/
Also, one more link related to this:
iOS: Open Source VoIP/SIP Objective-C Code
May be this will give you an idea.

Its possible to implement VOIP using XMPP. For ios many are providind SDK's which you can easily implement in your code. Among that one of the best is QuickBlox, which is very useful and easy to implement. Its providing P2P video chat, text chat , group chat and file transfer facilities.
But now WebRTC is gaining much popularity for VOIP purposes.WebRTC (Web Real-Time Communication) is an API definition being drafted by the World Wide Web Consortium (W3C) to enable browser to browser applications for voice calling, video chat and P2P file sharing without plugins.
Open Tok is a rather useful product which can be used for VOIP calling in ios devices. They are also providing a basic IOS sdk for easy implementation.

checkout these two products:
1- monal: https://itunes.apple.com/us/app/monal/id317711500?mt=8
2- talkonaut: https://itunes.apple.com/us/app/talkonaut/id375113323?mt=8
they both claim to support jingle

Related

what is the best server to make chat app in android? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to develop a chat app for android users app will be native and I want to know which will be more easy for me using firebase or XMPP?
Firebase
Firebase is a real-time database that uses Websockets and MongoDB. You are given full control over the database schema and all the code that’s used to interact with the server is defined on the client side. Here are some benefits and drawbacks:
Performance Websockets and MongoDB allow high performance and a lot of concurrent connections
Flexibility You can make the data structures you need. If you wanted to send new message types like a survey message, you could. You could also support WebRTC and use Firebase for signalling.
Persistence You can automatically back up messages on the server so if a user loses their device, they could just synch with server and get their messages back.
Frameworks There are existing frameworks that already provide messaging on Firebase. The Chat SDK has a framework for iOS and Android which are available for free on Github.
Fat client All the messaging logic is defined in client code which means to add a new platform, you have to re-write all the code.
Not Specialised Firebase doesn’t define any protocols so you would have to invent this yourself. You would have to decide what information to include on a message, and how to structure the database
XMPP
XMPP is a server that is specifically designed for messaging. As far as one exists, it is the industry standard messaging protocol. It’s used by big companies to power messaging for millions of users. It’s used in Skype, Facebook messenger, WhatsApp and Google Hangouts.
Performance XMPP servers can be clustered scaling to tens of millions of users
Open Source There are a number of excellent open source XMPP servers - ejabberd, OpenFire, Prosody
Defined Protocol XMPP is a well defined protocol. This means that in theory, any XMPP app can function with any XMPP server
Thin Client The XMPP server provides all the business logic and the client just sends and interprets a stream of XML messages. This makes it easier to deploy on multiple platforms.
Hard to setup XMPP servers can be difficult to setup and maintain
Complex development Developing a client for an XMPP server can be much more difficult and time consuming that using Firebase because the protocol seems dense and archaic at times
Bugs Unfortunately the protocol isn’t always followed correctly which can lead to bugs

Suitable protocol for Instant Messaging

We have to develop a native mobile app for Instant Messaging using a SUITABLE protocol.
Also we are to develop a website for that application so that those who cannot login to mobile can continue their Instant Messaging through the website.
Later on, we would be adding the facilities of voice and video calls to the both native mobile app as well as the website.
Now my question is that, based on the above situation, which protocol we should go with?
I did some research on the internet about that and am unable to choose amongst XMPP, MQTT and MUMBLE.
Which one would be the best among them for the above criteria?
Also should I be using the same protocol for both the mobile app as well as the website? (no idea at all). Does choosing either the same or different protocols for native mobile apps as well as a website matter at all?
Consider me a novice here.
Your response would really mean a lot to me.
I am new to web development so correct me wherever I am wrong.
The answer to your question XMPP vs MQTT vs mumble really depends upon a number of factors that you did not describe in your question. Mainly on your non functional requirements.
XMPP is an xml based protocol originally designed as an instant messaging protocol. It has quite a high overhead in terms of number and size of messages in handling presence between all the clients. You could certainly base your implementation on XMPP. Google talk is based on XMPP and it uses XMPP to set up VOIP sessions using an extension to XMPP called Jingle.
MQTT is a general purpose low overhead publish/subscribe protocol. It is not specifically targeted at implementing instant messaging however Facebook uses it as the basis for their Facebook messenger. MQTT is a more efficient protocol in terms of its message size and its keepalive requirements so you might choose this if you plan to scale up to very large numbers of users or if you need your mobile clients to be highly responsive, even on low capability devices. If you choose MQTT then you will be left to design the "application level" protocol messages yourself, rather than following a standard. MQTT can certainly be used as the transport over which to set up voice chat and video streams.
You do not need to use the same protocol for mobile client versus website as long as your server side can appropriately process the interactions with mobile clients and web clients you could choose different protocols.
Facebook messenger does support voice messaging....
http://mashable.com/2013/02/21/facebook-voice-messages/

How can I start to build voice chat application iPhone? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 months ago.
Improve this question
I want to build voice chat application for iphone.
After surfing and searching i conclude that for making of voice chat app i have to use VOIP/SIP protocol.
So my question is that,
It's necessary to use VOIP/SIP protocol for voice chat? If YES then how can i use VOIP/SIP in my app? Is there any tutorial or blog which explain step by step implementation?
And if it's not necessary to use VOIP/SIP then what is the alternate way for developing Chat application ?
Thanks in advance.
It is not necessary to use SIP. SIP is one of the umbrella standards that enable you to create multimedia sessions of any kind, however with SIP you will also have to implement a number of other things - Offer/Answer model using SDP (Session Description Protocol), use a RTP (Real time protocol) for actual voice transmission, likely MSRP (Message Session Relay Protocol) for session oriented messaging and then possibly look at Presence and whole slew of standards under SIP/SIMPLE.
Now you don't have to do it all and it all depends on what you want to do and how many and what types of other clients and 3rd party servers you want to interface with.
Have a look at existing free SIP software and see what makes sense for you.
Alternatively have a look at XMPP which is more suited for chat and presence kind of requirements. Specifically look at Jabber and see if that makes sense.
You do not need to use SIP. For example, ConnectyCube video solution is based on XMPP for chat and signaling to establish the connection before the call and WebRTC standard for video calls. You can check code samples to see how they implemented it on iOS.
To try the solution you can register a free account. If it suits you, you can use their SDK to speed up the development.
The benefit of using a ready backend with SDK is also that you do not need to worry about setting up a STUN/TURN server for routing video calls. They have a shared one you can use.

iOS devices as web server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I saw there are several apps on App Store that allow other computers to make a http connection to the iPhone/iPad devices to transfer files. It seemed like a web service is running on the iOS device. Just curious how is it done /what class was used?
Thanks.
Just display the devices IP address, open a socket for listening in an app running on the iOS device, and implement the http protocol. There are several 3rd party libraries that can do most of the heavy lifting for you:
CocoaHTTPServer or iPhoneHTTPServer3, or SimpleWebSocketServer, or MultithreadedHTTPServer3
You can use GCDWebServer
It's a modern web server for iOS and MacOS based on grand central dispatch.
Like answered before the best choice is to use a 3rd party library for this. There exist mainly two libraries to get the job done: CocoaHTTPServer and MongooseDaemon.
Both of them have an Objective-C API but MongooseDaemon is just a wrapper around the Mongoose HTTP server written in plain c, whereas CocoaHTTPServer is completely written in Objective-C.
We decided to go with CocoaHTTPServer because of a few simple reasons:
Even the simplest property like setting the document directory for the HTTP server does not exist in MongooseDaemon. You have to change a #define in an included source file to be able to change it from the default one, which points to NSHomeDirectory().
As of now the MongooseDaemon library contains warnings about deprecated methods used within the Objective-C wrapper.
CocoaHTTPServer is aware of things like Bonjour or WebDav whereas Mongoose just delivers the basics.
CocoaHTTPServer comes with many examples that range from simple HTTP servers, passwd, SSL/TLS or WebDav HTTP server.
CocoaHTTPServer works with GCD to enable multithreading.
MongooseDaemon is also a good choice.
https://github.com/face/MongooseDaemon

How to do peer-to-peer communication in an iPhone app?

I'm trying to write a simple chat application for the iPhone (as an experiment). Is there a simple way for two devices to discover each others' IP addresses, and given the addresses is there a simple API or protocol that would let me send text messages back and forth?
I've investigated SIP (specifically Sofia and eXosip), but these tools exist as C libraries and are beyond my current ability to port them to the iPhone.
Update: I'm trying to connect two devices over the Internet (i.e. not over Bluetooth or a local wireless network, which is what GameKit does).
You're going to need a server that provides the match making service. Game Center makes this pretty easy, but your users will have to have Game Center accounts.
Alternatively, you can set up an XMPP (formerly Jabber, it's what powers Google Chat) server (I've never done this, but there are several available) and use the XMPP Framework for Cocoa. There are instructions for using it in iPhone apps here.
I'm sure there are other chat servers and client source also available. IRC and Mobile Colloquy come to mind.
Finally, you could write your own server using your favorite server language / framework. This isn't too hard (I've done it myself), but it's far from what I'd call simple, and I wouldn't use it for a production system.
There is support for exactly this kind of ad-hoc peer-to-peer networking in GameKit. Have a look at the second half of the GameKit documentation for details:
http://developer.apple.com/library/ios/#documentation/...
NSNetService is a good option.
Take a look at WebRTC Datachannels. WebRTC is a newer option with native iOS support a standard that is still being finalized, but it is more flexible should the iOS app need to communicate with browser or even android peers