Build Sip Client using Sip Servlet as signalling - java

I am using mobicent sip servlet and I have deployed it in JBOSS as7 successfully. But I saw testing is from the sip softphones.
I have google search alot about building our own sip client but I cannot find the proper guide.
What I have to do is using Sip Servlet as a signalling and I have to create Android client(using JAIN-SIP) and also I have to create UAC from browser.
I am confuse about how can I use my Sip Servlet application that is running on server? How I send requests(Register,Invite and so on) from client to sip servlet?
For Example this tutorial But How I create my client? :)
A little guide or small tutorial about create UAC or how to use sip servlet can help

Android has built in very simple SIP client and APIs here http://developer.android.com/reference/android/net/sip/package-summary.html. You only need your own JAIN-SIP in android if you are using some more advanced features. There are plenty of examples here https://svn.java.net/svn/jsip~svn/trunk/src/examples

I would recommend starting studying this example https://github.com/Mobicents/sip-servlets/tree/master/sip-servlets-examples/websocket-b2bua
This is the Sip Servlets application behind the bundled WebRTC demo that comes with Mobicents SIP Servlets : https://github.com/Mobicents/sip-servlets/wiki/HTML5WebRTCVideoApplication
This demo connects 2 WebRTC browsers together to have a video or audio call.
In your case, you'll need to replace one of the browsers with an Android based Client. I would recommend looking at an Android SDK that supports WebRTC. We started building one at https://github.com/Mobicents/restcomm-android-sdk which is based on JAIN-SIP but the media side doesn't fully support WebRTC yet. (Any contributions are welcome though) Altough you can use it for chat/messaging to start with and show it works.

Related

Is it possible to use Python backend and a Android/Native application as Front end

I am handling my second year project which includes some machine learning backend along with a Mobile application front end.In simple terms i am creating
a androing/react native application which would take an input from the user and prosses in a backend development which includes python for some machine learning.
My question is, is it possible to connect these 2 together. I have gone through some stuff altho i am not very clear on how to create a connection on this.
Also some opinions on either i should go with android or react native or any other language to go on python or not would be very useful.
Thank you
Yes, it is possible.
For example, you can use Python as backend (server), with some exposed HTTP "interface", then make an Android application that communicates with these Python backend with HTTP request / response.
Or, if you are making a serverless application, you can make this Python backend as a .so library or using SL4A then call them in your Android application.
Yes. you can develop a python web service (REST OR SOAP) and use this for the backend for your application.
also, if you develop a service application (server-client) you must develop a service with python (or any languages) in your server after that connect your mobile application (reactjs, android studio, swift, ...) to this server.

Spring webapp: sending notifications to java and android clients

I recently started developing my first web application with Spring and I'm stuck with a question I could not really find an answer to. What I have is a simple Spring MVC application running in tomcat which provides data in form of JSON, XML or binary via REST. This service is consumed by two clients I developed, a simple Java desktop application and an Android app. So far the clients only got information about new data by polling.
What I want now, is a way for the server to send notifications/messages to the clients when new data is available. For the Android client it would be good if the notifications could received anytime, not only when the app is currently open of course. I found lots of information for JavaScript client code but very little really useful, up-to date input about what the options for java and android clients are.
It would be really great if someone could give me some idea what would be the best way to achieve what I want (ideally something which integrates well with Spring on the server side), what protocols/libraries/frameworks to use, maybe even point me to some example or tutorial, how to implement this on server and client side.
Thanks in advance for any input.
For android or mobile devices, Google Cloud Messaging is the preferred way of sending messages to applications running on devices.
Example : spring gcm server side project and a sample tutorial.
For desktop apps, either poll regularly the server or run something in background like crontab or active-mq to check the messages and start the desktop app.
WebSockets are the best solution. check the implementation in java in the server side

Implementation of signaling server for Android which will use webRTC using java

I am going to implement webRTC for voice and video call, for this i would be needing a signalling server first.Can anyone please send me some links or some guidance for the implementation of the signalling server using java.
If you want to build signalling server using java, you can use sip servlet.
Sip Servlet
A SIP servlet is a Java programming language server-side component
that performs SIP signalling. SIP servlets are managed by a SIP
servlet container, which typically are part of a SIP-enabled
application server
See also mobicent implemention on sip servlet mobicent
And also see JainSip for signalling server JSIP
I am not sure about java. But you can try node.js(JavaScript) and socket.io to set up a signalling server.
Go to the signalling section of the following link:
http://www.html5rocks.com/en/tutorials/webrtc/basics/
If you want to try java, try setting up a websocket server to handle data from browsers.
Personally, I prefer to use PeerJs (Javascript) as the signally server. Peerjs is built on node.js and provide a lot friendly API for user to implement signalling.
I have no idea whether you can do it with JAVA. But JavaScript seems a better choose to build a signalling server.
To implement a signalling server, This tutorial should be a very good example about how to do it with Peerjs and Crosswalk.
You can also have a look at RestComm http://restcomm.com/ and https://github.com/Mobicents/RestComm.
It already contains :
a WebRTC client : http://www.telestax.com/livechat-and-video-call-with-restcomm/
a WebRTC Client Side Javascript framework
an Android SDK https://github.com/Mobicents/restcomm-android-sdk/
an iOS SDk https://github.com/Mobicents/restcomm-ios-sdk.
Of course, everything is open source so any contributions are welcome ;) !

How to send SMS using modem or gateway from java Web application?

I am new in java web application and I want to send SMS from my Java web application to mobile. How can i do this using mobile/modem or any other way? any easy java API?
i really appreciate ur help.
here is an api :
http://code.google.com/p/serial-comm/
i love this api over other is the reason that you dont have to worry about the native libraries and there path as this api automatically installs the desired native libraries to your system..
there are also other api/s like :
http://code.google.com/p/smslib/
i have recently developed an application using serial-comm which reads SMS from mobile/modem.
the other way around is to buy a sms gateway service like i use mvaayoo in that case you dont have to develop an application just use the api provided by the gateway vendor and that is just a http link to send SMS

Options other than Applet

I am using the XMPP to build the Chat Application.
For building chat client I am using the Applet to communicate with the XMPP Server using their APIs in Applet.
So my question is: Is there anything other than Applet that I can use to communicate with Server and also with use of the XMPP Client API (i.e. options other than applet)?
I looking into GWT and JavaFX, will those two be helpful in this context?
You can use Java-WebStart or Flex or just write a small webpage using servlets.
Definitely check out Java Web Start. It can launch a JFrame from a link, and offers many deployment advantages.
If you want a browser-based client then use Flash. There are several XMPP browser clients and libraries available.
There are a couple of JavaScript libraries listed on the XMPP website. So no need to rely on browser plug-ins, just do a native web application.
You can easily use GWT for your web application. A quick search on Google revealed some GWT specific third party libraries or XMPP (Emite, gwt-strophe) and even a samples app (Emite Chat).

Categories

Resources