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.
Related
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
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I m working on a iPhone application to make a call from SIP protocol to landline phones, i got some samples to make a call from SIP to SIP but i did not get any solutions to make landline call from SIP protocol, please help me to do this.
Thanks.
From Apple Documentation ...
A Voice over Internet Protocol (VoIP) app allows the user to make phone calls using an Internet connection instead of the device’s cellular service. Such an app needs to maintain a persistent network connection to its associated service so that it can receive incoming calls and other relevant data. Rather than keep VoIP apps awake all the time, the system allows them to be suspended and provides facilities for monitoring their sockets for them. When incoming traffic is detected, the system wakes up the VoIP app and returns control of its sockets to it.
There are several requirements for implementing a VoIP app:
Add the UIBackgroundModes key to your app’s Info.plist file. Set the value of this key to an array that includes the voip string.
Configure one of the app’s sockets for VoIP usage.
Before moving to the background, call the setKeepAliveTimeout:handler: method to install a handler to be executed periodically. Your app can use this handler to maintain its service connection.
Configure your audio session to handle transitions to and from active use.
To ensure a better user experience on iPhone, use the Core Telephony framework to adjust your behavior in relation to cell-based phone calls; see Core Telephony Framework Reference.
To ensure good performance for your VoIP app, use the System Configuration framework to detect network changes and allow your app to sleep as much as possible.
Including the voip value in the UIBackgroundModes key lets the system know that it should allow the app to run in the background as needed to manage its network sockets. This key also permits your app to play background audio (although including the audio value for the UIBackgroundModes key is still encouraged). An app with this key is also relaunched in the background immediately after system boot to ensure that the VoIP services are always available. For more information about the UIBackgroundModes key, see Information Property List Key Reference.
Try this link .. this might help
enter link description here
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
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
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 want to develop an online multiplayer game for iphone.
I have developed two iphone applications but they weren't games.
so This is my first game .
so Basically I know nothing about how online multiplayer games works on iphone.
I just want to know the strategy , beginner's precautions and other design elements that helps me in understanding multiplayer games in iphone .
e.g.: If there is an online casino game (not bluetooth) ,how the connections and sessions work between all players.How they manage turns , results .
EDIT
I have put these questions separately also as suggested by Brad Larson and ChrisF :
How the game will search for other online users and will display the list of all users ?
How one can request someone to join the game and then visible to other users ?
How the connection and session will work between players of a table ? (Sockets ?)
What sort of network programming is necessary as part of the server and client ?
please tell me how all these works ? ( Just concepts )
Thanks .
How the game will search for other online users and will display the list of all users ?
You'll need a server that returns a list of online players to your iPhone client is some kind of data format, maybe XML or JSON.
How one can request someone to join the game and then visible to other users ?
The easiest approach would be the person who wants to to join the game sends that command to the server, the server tells that other person they want to join. Wait for a response. If player two says "yes", returns to the server which forwards to the first player.
It's basically a series of commands sent to and from the server. This is how all multiplayer games work - for example the Quake engine sends very compact commands, as little as 4 bytes for things like "get me all players on a server". Given the flakeyness of the iPhone connection this would be a good model to copy, as the Quake networking code was designed for 56k modems.
How the connection and session will work between players of a table ? (Sockets ?)
The connection could either be a continuous stream (UDP would be best), or polling from the client. You'll need to consider scaling for both, as it's possible 100 people playing could bring your server to its knees.
The session will be dropped if one player loses their connection. Alternatively as it's turn based, each player can simply send a command when they're online and the other client picks this up when he's online - there's no need for session in this model, and the commands are stored on the server in a datastore.
What sort of network programming is necessary as part of the server and client ?
I'll broaden this out:
An in depth knowledge of byte and bit manipulation including bit shifting
A knowledge of creating and reading UDP packets
Network programming in C (Objective-C may simplify a lot of this)
The server: writing daemons on Linux, or services on Windows to listen for commands
A knowledge of SOAP, XML or JSON if you're not concerned with bandwidth and connection drops
One thing you might need is a server to store the game state as you can't guarantee that both (all?) players will be on-line at the same time. One of the things this would store would be whose turn it was.
Then when a player turns on his/her phone or starts the game they would see a message saying it's their turn.
You could use this server to store high scores and tables too.