[asterisk-dev] Web Application Communication

Stefan Reuter srt at reucon.net
Wed Jul 19 01:16:52 MST 2006


Tim Panton wrote:
> I guess that means that the AJAX is polling the web app
> to see if there is a new call? How frequently do you poll?

It uses long running HTTP calls via XmlHttpRequest.
Those calls timeout after 30 seconds and are replaced by a new
connection by the client. On the server side we have one thread per
client waiting for new event to occur. Once new events are available (or
the timeout occurs) the HTTP call returns and updates the client view.

This provides excellent responsiveness but uses some resources on the
server (namely TCP connections and threads). Regarding threads the use
of continuations (as implemented in latest Jetty) might help.
For a callcenter this is usually not a huge issue as the number of
clients is small compared to services offered over public internet.

> We embed a softphone (we use ours of course) in the
> web page. When a call comes in, it issues a JavaScript
> callback and the normal AJAX stuff kicks in.

Thats a nice solution!

> In theory this should be more responsive and scalable,
> but I have no figures to back that up.

Probably not much more responsive, but you eliminate the additional
connection (polling thread) if the agent is using your softphone. In the
case of using a hardphone you are using an additional UDP (afair your
softphone uses IAX) connection instead of an HTTP call - maybe thats
more lightwight, too.

=Stefan

-- 
reuter network consulting
Neusser Str. 110
50760 Koeln
Germany
Telefon: +49 221 1305699-0
Telefax: +49 221 1305699-90
E-Mail:  srt at reucon.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 271 bytes
Desc: OpenPGP digital signature
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20060719/4bf2e708/signature.pgp


More information about the asterisk-dev mailing list