javascriptjqueryjquery-pluginsphono

Hosting phono (jquery softphone plugin) dependencies locally?


This may be too obscure a question, but perhaps someone can spot what I'm doing wrong.

Phono (jquery plugin for javascript/flash-based softphone built on top of Tropo/Voxeo) loads a couple of dependencies from the phono.com servers. Namely,

I would very much like to avoid loading these dependencies from an external server (for obvious reasons) and going by this thread on their forums (which I can't register for because it appears every possible username has been "taken") , it should be possible to host them locally.

Here's a prettified source for the main jquery plugin. Maybe I'm just bad at looking, but I could not find a commented, un-minified version either in their full SDK or on github.

So after changing

base_path: "http://s.phono.com/deps/flensed/1.0/"

and

swf: "http://s.phono.com/releases/" + Phono.version + "/plugins/audio/phono.audio.swf"

... all dependencies seem to load just fine, phono successfully grabs a session ID and chats by SIP appear to be working. When I try to dial out or call the session id/SIP, however, I get a javascript error:

Uncaught TypeError: Cannot call method 'start' of null

referring to line 770 : h.start().

this.$flash.play(g, j); appears to return null or undefined. I suck at javascript and can't figure out why.

EDIT - if anyone would be so adventurous as to try this out, you can just grab their "kitchen sink" demo and slap it up on a server without much hassle.


Solution

  • Okay -- this is ridiculous and I'm an idiot for not catching it sooner.

    Flash was trying to load the ringtones off my server at the URL that requires authentication. Unfortunately, flash is not a user with a valid session. Hence, flash was grabbing big handful of nothing. Sorry.