Creating a web app on django with phone calls functionality - django

So basically i'm developing a piece of software that will allow user to call any number he wants right from the website. So i need some help in choosing the correct platform or semi cheap service to use. I guess i need a solution with open API because i want to make a db entry (want to record duration and date) for every call made from website.
I've started research and stumbled upon couple of open source solutions: Asterisk and FreeSWITCH. Trying them out right now, but i still have poor understanding of how SIP works. If it will be a softphone will the user have need to install it on their pc or there are server solutions

One possible solution that works with any SIP server is to use PJSUA Python bindings and to implement in Python a basic softphone. Thus your web application will be seen by the SIP server just as a regular soft phone and the server configuration is much easier.

Related

How do I accomplish interaction between HTML5 and C++ component in WINCE 7.0?

I have a Windows Embedded Compact 7.0 based development board which has a HTTPD webserver and SQL Compact DB,
Objective: My task is to deploy few HTML5 pages and create C++ component for DB access.
Current solution : Currently we are thinking of CGI interface between HTML5 and C++
component, not sure if this is possible , but our vendor (where this board bought from) confirmed that WinCE can support ISAPI (much faster CGI).
I would like to know if we are in a right direction? or Is there a alternate solution to this?
Asking this question because I came across this article in Code project about http://www.codeproject.com/Articles/336018/Building-C-Applications-with-HTML[Building C++ Application with HTML5] which talks about usage of Webkit and Qt.
Please let me know if I can explore as per this article. Can this work under Embedded-based environment.
Thanks in advance for your replies.
It's one path. This article uses QT to intercept requests, so you are basically implementing your own web server
I don't know about your requirements but you may have quite some work if you wanna do it by yourself (implementing Sessions, Authentication, Http methods, SSL, etc).
In my case, I deactivated the standard HTTPD server and used Padarn for a C# backend and I found it to be ok, but it's not free.
I didn't spend much time looking for C/C++ servers but I believe setting up a pre-made web-server is a good path path unless that article meets your requirements.

New web application technology

We're about to start a new project and I've been looking at some of the new web technologies. We want to build a RESTful api which a client can access. To date we've been using python with django/flask to build the api and using jquery for the front end.
I've read quite a bit on javascript frameworks such as emberjs and angular, as well as nodejs solutions like express, meteor and derby. I really like the idea that a site should 'auto update' when the model changes.I'm aware that there are some libraries like gevent which can help facilitate socket level communication, but it seems to be more of a patch than an elegant solution.
Ideally, I don't want to give up a proven technology, ie writing server code in python (or php,ruby whatever) for building my whole app on nodejs. Having a RESTful API is important since we want our services to be open and accessible.
Would it be a bad idea to have 2 servers and 1 client? 1 traditional api server communicating with a javascript framework on the client. Then also run a nodejs server alongside the api server which can somehow talk to the api and if it finds updates, passes it along to the client.
We want to build a RESTful api which a client can access.
Ideally, I don't want to give up a proven technology, ie writing server code in python (or php,ruby whatever) for building my whole app on nodejs.
Then you should probably go with Rails and Ember.js. I'll quote eviltrout (co-founder of discourse) which is build on ember and rails:
One amazing side effect of a rich client side app is you end up with a battle tested API. Our app has consumed our own API since day one, so we know it works.
If we want to create a native client for Android or iOS, it would be a lot easier because we already speak JSON fluently. If people want to build services that use Discourse, they won’t have to result to screen scraping. It’s a huge win for us and the developers that use our platform. 1
However you should keep in mind that ember is as of to date still a very young framework (rc3 v1.0.0).
I don't know what sort of application you are building (in respect to why you would want to use node) How to decide when to use Node.js?

Host a c++ desktop application on a webpage

I am having a desktop application which having a UI interface made in Qt linked with a library which is doing all the calculation stuff. Values from UI is taken and pass to the API's in the DLL to get the output which is shown on Screen.
Now i want to do the same thing by transferring my application UI to a web page so that people can access the tool from anywhere without any installation process.
I want to retain my c++ DLL code so i don't have to do a lot of work. I am thinking of just converting this DLL to a C++ server by any communication Process(Sockets). I want to host this application on my company's website. (We have to make the website also so we are open to any set of tools).
I want to know what will be the best set of tools to do this stuff. Also there will be lot of data exchange between the webpage and server so the wholething should be optimized also. I goggled a bit and find stuff like silverlight and ASP.NET, But i am still not very clear which option will be more suitable.
I am a c++ programmer with no web application development experience. I am open to learn any new technology.
Thanks
Why not use Qt on the web directly? There are several projects like this one: http://qtwui.sourceforge.net/
There is a netscape plugin that will host a QT application and an ActiveX control wrapper on the QT website. You could use one of those to wrap your application. Note that this approach would require the user (or their administrator) to download and install the plugin.
An alternative approach might be to run your application through a remote desktop such as XVNC, NX or an RDP based layer. IIRC browser based remote desktop clients are available for most such protocols.
A few options:
pick a messaging/queue implementation (like http://www.zeromq.org/) and provide a service
implement a Windows Web Service if you want to be more enterprise friendly: http://msdn.microsoft.com/en-us/magazine/ee335693.aspx
I would not expose the implementation on the internet. Enough to have a simple buffer overflow and the machine can be taken over quickly. Adding a layer between the app and the web provides an easy way to validate input, access, stats ...
You should be able to use your DLL from an wt or cppcms application. Then you do not have to learn something new and can just use C++.
The way I'm currently doing this is with Boost.Python + django

REST Server, Delphi and Web Services - Advice needed

I am looking on advice on how best to approach a new project I need to develop. From the outset I must add, I have 0 experience with Web development on any level.
What I need to do is provide a web interface through the browser which will communicate with a server back end. The data retrieved will be sourced from either a DB or from another source - external device which the server itself will communicate with via IP. The data retrieved from the external device will always be a string format of n length (non unicode) and the DB data will mostly be strings and numbers with the odd blob thrown in (storing a picture). The communication will always go from the Client (web browser) to the Server. I don't believe that the server would need to instigate the comms.
I have Delphi XE, so started looking at using a REST server for communication and I think that seems to be OK. However, from what I can see, I need to create HTML web pages to "render" the data on the web browser. Is that true? Can I use the IW components with a REST server? If so, I'm not sure how to get the data to/from the browser UI. Am I better of investigating Ruby on Rails perhaps? From what I read on a different thread in here, it's based on MVC and some other areas which I feel, design wise, would fit how I would create the application (I was planning on creating the app based on the MVP or similar design pattern).
I think REST makes the most sense, so if the IW components can't be used, are there any 3rd party products I can use which would let me design "pretty" UI html. Given I don't know java script, would that be a stumbling block with REST too.
Thanks and hopefully I have provided enough information.
Thanks
Jason
Will a human being be responsible for typing the data retrieved from your external device into a web page?
If so, and you have no web development experience, Intraweb is definitely the way to go for Delphi programmers wanting to build a web application without learning new skills. For additional components to create a prettier UI I suggest using TMS Software's Intraweb Component Pack Pro.
If you don't need a human being to manually type in this data then you don't need Intraweb at all. Instead you would write a client application which presumably interrogated your external device for the data and then transmitted it to the REST server. Look at the documentation you've used to build your REST server and it should have a section on how to build a REST client.
You can build an ISAPI module with delphi that does the job, or include a HTTP server right into you executable with Indy, ICS or Synapse.
ISAPI will give you the freedom to choose Apache or IIS and give you all their power this way. Embeded HTTP server will give you a nice small application in which you control all ascpects of how it works.
Yes go with REST as it is simple and clean. All you need is to think and design the API (functions that your server will support). You can bind the APIs to the URL schema thus using the REST principle. I would do it simply like this.
A client makes a request. You show some form of GUI (load or render a HTML page with possible javascript)
User makes an action, you call appropriate API (or the user does it directly).
Show the user some result
Just guide the user process through a series of API calls until the result is made
You can use plain HTML and then add javascript if needed (jquery) or you can use ExtJS from Sencha which makes building a nice GUI a lot easier and is very well structured.
I would not use any "WYSIWYG" web tools. Plain old HTML written by your favorite editor is still the king in my opinion.

Django Deployment

I am given a responsibility in my project to develop a Equipment tracking tool with following requirements
New Equipment can be added by admin to a particular user
Once equipment is assigned to a person he will a request to accept the request so he will be responsible
User can transfer his equipment to other users.
At the same time Admin should be sent a mail or message whenever there is a change in status.
It should be deployed locally on a PC( So it is not actually a web app) that is connected to network which can be accessed by everyone
I thought I can use Django for this( I am new to it ), but I do not know much about deployment on a local PC , How can I do this, or is there any better Idea for this?
It still sounds like you want a web app, you just won't be deploying it on a traditional web server. One thing to note, client versions of Windows (XP, Vista) will limit you to 10 incoming connections per computer.
You'll want to follow these instructions on how to install Django. If you haven't installed python yet, I'll recommend that you install version 2.5, since that will include sqlite, an embedded database that makes it very easy to get started developing with Django. Django includes its own development web server, which you will come across naturally as you go through the tutorial.
Start by installing and then jump right into the tutorial. Your deployment options will be much easier to understand once you're comfortable with developing in Django.
Try http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index
and if you should deploy using IIS then try http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer