Is it possible to make a good voice call application with OpenSIPs server? - sip

I am building a free voice call application on Android. I used OpenSIPs open source to make a SIP server and successfully make a call to another phone in WIFI network. However, I couldn't make a call when the phone uses cellular network like 3G/4G. I found out that I should make a STUN and TURN server to find exact SIP address.
Someone told me that it is hard to find SIP address if the user uses 3G or 4G network. So, he said I should use SBC to redirect voice data if I want to make good connections. He said I should make redirect servers to have good quality of service.
Is it possible to make a good voice call service with OpenSIPs server? If it is true, is there voice call services who used OpenSIPs open source? I've searched all documents, but couldn't find the answer.
Thank you.

I decided to make a SIP server using FreeSwitch Open Source. It was much better than OpenSIPs. I didn't have worry about NAT problem on FreeSwitch. It is also very easy to install a SIP server on Linux. Check out the website. http://freeswitch.org/

Related

A/V calls in Conversations (xmpp)

Audio and video calls are work fine When mobile phones are in the same network,
but when mobile phones are in different network audio and video calls are not work,
we implement our own server using http://help.conversations.im/ this reference.
we can't find solution.
What is the solution to this?
You need a secundary server to make these calls, some servers have some pluggins for example openfire has one called PionTURN as a plug. but any TURN server will do it. i recommend "coTURN" then just install discovery pluggin in your server and configure it to point it to your TURN server.

How can I debug network requests from my iPhone?

I want to check the network requests an app is making from my iPhone. It's on the same WiFi network as my computer (or if it makes things easier, I can set it up to use an ad-hoc network). I don't want to see every packet, just the URLs which my iPhone is requesting. I don't care about the returned data all that much.
A simple solution would be much appreciated.
If you want to intercept the phone itself you'll need to point it at an http proxy you set up on a computer and watch the requests come through. Something like http://www.charlesproxy.com/ or there are most likely many free proxies.
Connect your computer to the rest
of your local network via Ethernet.
Turn on Internet Sharing from the
Sharing System Preference to share
your Ethernet connection via
AirPort.
Set your iPhone to
connect to the computer as its base
station.
Use Wireshark to
capture and analyze the packets.
I found a really nice repo on github named Wormholy https://github.com/pmusolino/Wormholy it will show every network request on your iphone, you only add it to your pod file and then on your app, you shake your phone and you will see all requests.
Easy to install
Transparent on your app usage
Overview and details of your request
Like so
Screenshot of wormholy usage

How can I send simple data from an iPhone to another iPhone, or an Android?

I'm just getting started with mobile development, and after considerable searching I'm still confused about sending a message from my iPhone to another or an Android. For instance, in building a simple Tic-Tac-Toe game, if I want to notify the other phone of a move, what is the best way to do so? Wifi, bluetooth, 3G? And how?
Many methods seem to point to communicating through a web server, but I'd rather send them directly from phone to phone if possible. (this is for native apps of course)
If you don't want to have a server (or even if you do! It depends!) it sounds like you will want to use TCP sockets. Apple doesn't have a generic bluetooth API to use with iPhone-to-android communication and you'll have TCP access anyway with 3G. A 3G network connection is very similar to wifi and you should be able to check for the difference as needed with little change to your overall networking code. I'm not sure if bonjour is supported on android, but I bet someone has ported it for similar reasons already, and it is supported in iOS. Apple has a networking section for iOS that you may find informative.
Additionally if you want to stay within the iOS device only realm you could use GameKit to communicate via bluetooth.
Hope that helps some.
The easiest way is to create a web server with an API and the clients poll the server for new moves (or the server pushes the client an update). This is the only way you're going to be able to do it over 3G unless you can figure out the IP addresses of both phones (do phones even keep the same IP address for a long period of time?) and open up sockets between them and let one phone be the server and the other be the client (could cause potential cheating).
WiFi is not always there - by limiting your users' options to areas with access points, you'll lose sales. Not sure about Bluetooth - how prevalent is it on handsets, how much of the API is exposed. Your best bet, IMHO, is 3G. With some kind of a central presence server (Web or otherwise), with optional proxying. Read up on peer-to-peer networking.
As far as i know does the iphone only support incoming messages over push notifications.
This means, that you have to update the information, by requesting it from web services etc.
The bluetooth API of the iphone doesn't support this either.

how to setup voice chat over wifi and 3G network?

I wanted to add a voice chat feature to my business app. I have been trying hard to find anything useful but there is not much help regarding this. Could anyone plz point me to something concrete??
PS: The skype app makes use of this feature.
This is a lot of work as there is no "built in" sdk features or third party off the self components that will help you do it without a lot of work on your end.
Your options (as far as I know) are:
Build your own solution.
Look for a third party solution.
Look for a open source solution.
Voice "chat" could be one of many things like:
using the voice features of a cellular network to a conference call.
using the voice features of a cellular network with a PBX server that supports conference calls.
using a VOIP solution using a SIP stack with a SIP server
using a XMPP Jingle solution (I believe the google voice service uses this)
using your own SIP setup solution
custom solution
None of these options are easy.
Open Source SIP implementations that have iphone ports (that I know of):
reSIProcate
pjsip
Update:
SIP & Jingle both use RTP for the actual transport protocol between the parties. RTP is a UDP point-to-point protocol. The ports which form a session are negotiated using other protocols such as RTSP (using SDP in the setup method) and SIP. RTP and RTCP typically use unprivileged UDP ports (1024 to 65535).
For easy Server / Client setup check Jingle Nodes in combination with SIP Communicator which is a Desktop application. But as being opensource I presume you can reuse a lot of the code to make it mobile. Specially for Android. Check this draft of a Jingle Nodes Setup Guide

How do you communicate to a Modbus device within an iPhone application?

I would like to be able to develop an iPhone application that can communicate with Modbus devices, but I'm not sure how to proceed. Has anyone had experience with this or are there existing libraries out there for this purpose?
You will need first to know how to make a simple TCP client on your iPhone, and a simple TCP server on your computer that your iPhone client will talk to via WiFi. Make sure PING command works and firewall does not block your server port before any client/server experiments, and make sure that server port for experimenting is greater then 1024 and not already used. Then take a look at MODBUS TCP specification from official site, get familiar with function codes you are interested in, and study C code found here. Then make a simple MODBUS TCP client that can send a request to MODBUS TCP server and interprete an answer. The best way is to start reading single register value, then progress in time and add more functions.
I do exactly all above points, my iOS Modbus lib works fine, application is now up on AppStore, PLCLink read and set any modBus data into my Wago home automation.
Installation guide : http://pautex.fr/plclink