tropo / phonosdk Goto Github PK
View Code? Open in Web Editor NEWPhono.com - The jQuery Phone API
Home Page: http://phono.com
License: Other
Phono.com - The jQuery Phone API
Home Page: http://phono.com
License: Other
Hi guys,
I'm trying to embed phono in my embeddable widget.
User copies widget code (2 lines) to his page and then widget does the rest - preloads the jquery if necessary and initializes itself.
I've faced a problem of incorporating phono to my code.
Phono depends on $ variable to be pointing to jQuery object. (ex. line 960 $(document).ready(function()
)
So, I have to load Phono after jQuery was loaded. This means loading Phono code in a callback.
But when placed inside of a callback, it doesn't work, presumably because phono depends on flXHR and flXHR seems to use global context a lot.
For example, this line is not nice:
// FIXME: Needed by flXHR
var flensed={base_path:"//s.phono.com/deps/flensed/1.0/"};
So, I thought that maybe I can live with adding some objects to global space of user's page. I cut out flXHR code and placed it into a global context.
No errors now, flXHR used correct urls, but I never get onReady callback from phono.
Network tab show continious requests being sent to 'http-bind' and console says:
no requests during idle cycle, sending blank request
Does anyone have any experience in situation like this?
I see that http://xmpp.org/extensions/xep-0320.html has defined a formal namespace for the dtls fingerprint.
Any chance of adopting it ?
<fingerprint xmlns='urn:xmpp:jingle:apps:dtls:0' hash='sha-256' setup='actpass'>
02:1A:CC:54:27:AB:EB:9C:53:3F:3E:4B:65:2E:7D:46:3F:54:42:CD:54:F1:7A:03:A2:7D:F9:B0:7F:46:19:B2
</fingerprint>
Cannot get the session ID.
Both HTTP and HTTPS
Both Flash and Java
HTTP
The Error on Page:
Line: 13
Char: 1905
Error: 15, Policy Failure, A security sandbox error occured with the flXHR request.
Code: 0
URL: https://sfa.westhawk.co.uk/phonosdk-0.3/samples/kitchen-sink/www/
HTTPS
After install certificate.
The Error on Page:
a) Previous error
Line: 13
Char: 1905
Error: 11, flXHR::send(): Failed, The send() call cannot be made at this time.
code: 0
URL: https://sfa.westhawk.co.uk/phonosdk-0.3/samples/kitchen-sink/www/
b) Next error
Line: 13
Char: 1905
Error: 15, Policy Failure, A security sandbox error occured with the flXHR request.
Code: 0
URL: https://sfa.westhawk.co.uk/phonosdk-0.3/samples/kitchen-sink/www/
To reproduce:
Use the following code, set sip address to a sip address where you can actually receive a call:
var call = null;
var sipAddress = "sip:[email protected]";
var phono = $.phono({
apiKey : "C17D167F-09C6-4E4C-A3DD-2025D48BA243",
onReady : function() {
call = phono.phone.dial(sipAddress);
},
});
During the call, close the browser window.
Bug: Notice that where you received the call, it is still active. It should had been hang up.
Workaround:
Based on this: http://chad.ill.ac/post/43030182362/strophe-js-disconnect-on-page-unload
$(window).on('unload', function() {
phono.connection.sync = true;
if(call) call.hangup();
phono.connection.flush();
phono.connection.disconnect();
});
Issue with the BOSH servers?
OS: OS X 10.6
Browser: Chrome (latest)
My BOSH SID was '0ef38a3667f15397f91ee4b9f8797c6f'
If the user is behind a clustered proxy which switches ip addresses between requests phono fails to connect.
Workaround is to load the page over https - which should keep us on the same session at the server end.
How do I disable this insane amount of logging? I have application logs I'm trying to read and this make it really difficult
phonosdk-0.3 build #117 on Hudson
Test Scenario: call from Blink to Phono(Java)
Test Platform: IE7/FF3.6 on XP, IE8/FF3.6 on Win7
Steps:
Expected result:
Conversation can be established, and will be heared from each other.
Actually result:
There is a noise heared from Phono side, and can not heared anything from each other.
Note:
FF7 and Salaris5 on Mac OSX 10.6 are ok
I tracked down what was causing IE 9 to break for us. In Phono.util.loggyFuction there is an attempt to convert the arguments to a string. When an argument is IE's IXMLDOMElement, it throws a TypeError.
--- a/vendor/assets/javascripts/jquery.phono.js
+++ b/vendor/assets/javascripts/jquery.phono.js
@@ -945,7 +945,7 @@ var flensed={base_path:"//s.phono.com/deps/flensed/1.0/"};
loggyFunction: function(objName, obj, funcName) {
var original = obj[funcName];
obj[funcName] = function() {
-
+ try {
// Convert arguments to a real array
var sep = "";
var args = "";
@@ -953,9 +953,13 @@ var flensed={base_path:"//s.phono.com/deps/flensed/1.0/"};
args+= (sep + arguments[i]);
sep = ",";
}
-
+
Phono.log.debug("[INVOKE] " + objName + "." + funcName + "(" + args + ")");
- return original.apply(obj, arguments);
+ } catch (e) {
+ Phono.log.debug("[INVOKE] " + objName + "." + funcName + "(I CAN'T CONVERT THESE ARGUMENTS TO A STRING)");
+ }
+
+ return original.apply(obj, arguments);
}
},
padWithZeroes: function(num, len) {
This library causes my browser to barf with a global "use strict" statement, such as the one automatically inserted by uglify2. Strict mode also gives better error handling and permits certain code optimizations.
mishoo/UglifyJS#128
http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/
phonosdk-0.3 build #117 on Hudson
Reports of S2S connections failing to older xmpp servers.
http://issues.igniterealtime.org/browse/OF-443 may provide a fix.
Running just ant from command line throws an error as the "build-default" target does not exist.
In addition to the jQuery-style onEvent handlers we should also support the Node.js EventEmitter style to be more comfy for noders joining the community.
For example:
$.phono({
apiKey: 'foobar',
onReady: function() {
$("#call").attr("disabled", false).val("Call");
}
});
could also be written as:
var phono = new Phono({
apiKey: 'foobar'
});
phono.on('ready', function() {
$("#call").attr("disabled", false).val("Call");
});
Java audio is right speaker only to assist in echo suppression on Macs, however we should disable that (if not already) on other machines and when headset mode is enabled.
Hi,
Kitchen sink demo doesn't work in my IE10, if I choose IE9 or IE10 mode, Nor it works in quircks.
IE8 works thought.
Here's the console error I get:
13:59:07.774 DEBUG - [STROPHE] error: function (stanza) {
// remove timeout handler if there is one
if (timeoutHandler) {
that.deleteTimedHandler(timeoutHandler);
}
var iqtype = stanza.getAttribute('type');
if (iqtype === 'result') {
if (callback) {
callback(stanza);
}
} else if (iqtype === 'error') {
if (errback) {
errback(stanza);
}
} else {
throw {
name: "StropheError",
message: "Got bad IQ type of " + iqtype
};
}
}
Do any of the PhoneGap samples work for anyone? I am trying the iOS version and I am getting ld: library not found for -lphono-i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We've just spotted that you may need to add the following configuration item to the phono
creation call :
connectionUrl:"http://app.phono.com/http-bind",
eg:
phono = $.phono({
apiKey: "C17D167F-09C6-4E4C-A3DD-2025D48BA243",
connectionUrl:"http://app.phono.com/http-bind",
etc
phonosdk-0.3 build #117 on Hudson
Steps:
Expected Result:
Should be a visual indication given.
Actual Result:
There was no visual indication given of failure, but always refreshing.
Note:
[firebug puglin says: plugin.$applet[0].getJSONStatus is not a function
Line 5173 in jquery.phono.js: var json = plugin.$applet[0].getJSONStatus(); ]
For IE7/IE8: The new java phono can be created even if disable Java Plug-in.
Hi, I followed the guide on how to use the Phono Mobile For PhoneGap(Android), but when installing on my Smartphone Samsung Galaxy Young throws me the following error: "Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE". Can you help me?
Java applet can be slow to load the first time in chrome.
(Investigate locks on the ready callback)
In a Drupal site Phono was attempting to fetch checkplayer.js with the wrong path, resulting in a not found error.
It appears to be an issue with scope of the flensed variable.
Are there any plans to support newer versions of phonegap?
I'm using phonegap 2.7 on android, and get the error
exec() call to unknown plugin: PhonogapAudio
phonosdk-0.3 build #117 on Hudson
Test platform: IE8, Safari5
Steps:
Expected result:
A visual indication should be prompted of the given failure.
Actually result:
No visual indication given of call failure.
browsing to http://phono.com/java locks up IE9
Error message is :APPLET missing CODE tag.
(possibly some DOM locking error)
I have been studying the examples provided and this one just keeps on loading. I don't know why.
http://s.phono.com/releases/af57805/samples/conference/www/index.html
The default audio volume for java plugin is too low.
Flash falls on timeout with following log.
[18:58:28.170] 18:58:28.170 DEBUG - ConnectionUrl: http://app.phono.com/http-bind
[18:58:28.171] 18:58:28.171 DEBUG - [STROPHE] CORS with Firefox/Safari/Chome
[18:58:28.171] 18:58:28.171 DEBUG - [INVOKE] Phono.connect()
[18:58:28.172] 18:58:28.172 DEBUG - [INVOKE] Phono.handleStropheStatusChange(1,null)
[18:58:28.173] 18:58:28.173 DEBUG - [STROPHE] _throttledRequestHandler called with 1 requests
[18:58:28.174] 18:58:28.174 DEBUG - [STROPHE] request id 1.0 posting
[18:58:28.174] 18:58:28.174 DEBUG - [STROPHE] request id 1.0 state changed to 1
[18:58:28.175] 18:58:28.175 DEBUG - WIRE
[18:58:28.517] 18:58:28.517 DEBUG - [STROPHE] request id 1.1 state changed to 2
[18:58:28.518] 18:58:28.518 DEBUG - [STROPHE] request id 1.1 state changed to 3
[18:58:28.520] 18:58:28.518 DEBUG - [STROPHE] request id 1.1 state changed to 4
[18:58:28.520] 18:58:28.520 DEBUG - [STROPHE] removing request
[18:58:28.520] 18:58:28.520 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:28.520] 18:58:28.520 DEBUG - [STROPHE] request id 1 should now be removed
[18:58:28.521] 18:58:28.520 DEBUG - [STROPHE] request id 1.1 got 200
[18:58:28.521] 18:58:28.521 DEBUG - [STROPHE] _connect_cb was called
[18:58:28.521] 18:58:28.521 DEBUG - WIRE stream:featuresPLAINANONYMOUS/stream:features
[18:58:28.522] 18:58:28.522 DEBUG - [INVOKE] Phono.handleStropheStatusChange(3,null)
[18:58:28.523] 18:58:28.523 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:28.627] 18:58:28.626 DEBUG - [STROPHE] request id 2.0 posting
[18:58:28.627] 18:58:28.627 DEBUG - [STROPHE] request id 2.0 state changed to 1
[18:58:28.628] 18:58:28.628 DEBUG - WIRE
[18:58:28.782] 18:58:28.782 DEBUG - [STROPHE] request id 2.1 state changed to 2
[18:58:28.783] 18:58:28.783 DEBUG - [STROPHE] request id 2.1 state changed to 3
[18:58:28.783] 18:58:28.783 DEBUG - [STROPHE] request id 2.1 state changed to 4
[18:58:28.784] 18:58:28.783 DEBUG - [STROPHE] removing request
[18:58:28.784] 18:58:28.784 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:28.784] 18:58:28.784 DEBUG - [STROPHE] request id 2 should now be removed
[18:58:28.784] 18:58:28.784 DEBUG - [STROPHE] request id 2.1 got 200
[18:58:28.785] 18:58:28.785 DEBUG - WIRE
[18:58:28.786] 18:58:28.785 DEBUG - [STROPHE] SASL authentication succeeded.
[18:58:28.786] 18:58:28.786 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:28.889] 18:58:28.889 DEBUG - [STROPHE] request id 3.0 posting
[18:58:28.890] 18:58:28.890 DEBUG - [STROPHE] request id 3.0 state changed to 1
[18:58:28.891] 18:58:28.891 DEBUG - WIRE
[18:58:29.103] 18:58:29.103 DEBUG - [STROPHE] request id 3.1 state changed to 2
[18:58:29.104] 18:58:29.104 DEBUG - [STROPHE] request id 3.1 state changed to 3
[18:58:29.104] 18:58:29.104 DEBUG - [STROPHE] request id 3.1 state changed to 4
[18:58:29.105] 18:58:29.104 DEBUG - [STROPHE] removing request
[18:58:29.105] 18:58:29.105 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:29.105] 18:58:29.105 DEBUG - [STROPHE] request id 3 should now be removed
[18:58:29.105] 18:58:29.105 DEBUG - [STROPHE] request id 3.1 got 200
[18:58:29.106] 18:58:29.106 DEBUG - WIRE stream:features/stream:features
[18:58:29.110] 18:58:29.108 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:29.213] 18:58:29.212 DEBUG - [STROPHE] request id 4.0 posting
[18:58:29.213] 18:58:29.213 DEBUG - [STROPHE] request id 4.0 state changed to 1
[18:58:29.214] 18:58:29.214 DEBUG - WIRE
[18:58:29.370] 18:58:29.369 DEBUG - [STROPHE] request id 4.1 state changed to 2
[18:58:29.370] 18:58:29.370 DEBUG - [STROPHE] request id 4.1 state changed to 3
[18:58:29.371] 18:58:29.371 DEBUG - [STROPHE] request id 4.1 state changed to 4
[18:58:29.371] 18:58:29.371 DEBUG - [STROPHE] removing request
[18:58:29.371] 18:58:29.371 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:29.372] 18:58:29.372 DEBUG - [STROPHE] request id 4 should now be removed
[18:58:29.372] 18:58:29.372 DEBUG - [STROPHE] request id 4.1 got 200
[18:58:29.372] 18:58:29.372 DEBUG - WIRE [email protected]/1699rgonnikmn
[18:58:29.374] 18:58:29.374 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:29.524] 18:58:29.524 DEBUG - [STROPHE] request id 5.0 posting
[18:58:29.525] 18:58:29.525 DEBUG - [STROPHE] request id 5.0 state changed to 1
[18:58:29.526] 18:58:29.526 DEBUG - WIRE
[18:58:29.705] 18:58:29.705 DEBUG - [STROPHE] request id 5.1 state changed to 2
[18:58:29.706] 18:58:29.706 DEBUG - [STROPHE] request id 5.1 state changed to 3
[18:58:29.706] 18:58:29.706 DEBUG - [STROPHE] request id 5.1 state changed to 4
[18:58:29.706] 18:58:29.706 DEBUG - [STROPHE] removing request
[18:58:29.707] 18:58:29.706 DEBUG - [STROPHE] _throttledRequestHandler called with 0 requests
[18:58:29.707] 18:58:29.707 DEBUG - [STROPHE] request id 5 should now be removed
[18:58:29.707] 18:58:29.707 DEBUG - [STROPHE] request id 5.1 got 200
[18:58:29.707] 18:58:29.707 DEBUG - WIRE
[18:58:29.708] 18:58:29.708 DEBUG - [INVOKE] Phono.handleStropheStatusChange(5,null)
[18:58:29.708] 18:58:29.708 INFO - Detecting Audio Plugin
[18:58:29.709] 18:58:29.709 INFO - Using Flash default
[18:58:29.740] 18:58:29.740 DEBUG - [STROPHE] no requests during idle cycle, sending blank request
[18:58:29.742] 18:58:29.741 DEBUG - [STROPHE] request id 6.0 posting
[18:58:29.742] 18:58:29.742 DEBUG - [STROPHE] request id 6.0 state changed to 1
[18:58:54.715] 18:58:54.714 INFO - [EVENT] error[undefined]
[18:58:54.715] 18:58:54.715 DEBUG - [INVOKE] Phono.onerror([object Object],undefined)
[18:58:54.715] Timeout waiting for flash to load.
[18:58:54.716] 18:58:54.716 ERROR - Timeout waiting for flash to load.
#0 0x33479464 in objc_msgSend ()
#1 0x0001a398 in -[PhonoAudio stop] (self=0x4d04000, _cmd=0x323764a7) at PhonoAudio.m:468
#2 0x0000547c in -[PhonoShare stop] (self=0x550eea0, _cmd=0x323764a7) at PhonoShare.m:73
#3 0x000047be in -[PhonoAPI stop:] (self=0x1cceb0, _cmd=0x323764a7, uri=0x0) at PhonoAPI.m:149
#4 0x0000397a in -[Phono stop:withDict:] (self=0x1ccf30, _cmd=0x3b60d, arguments=0x550a520, options=0x550e610) at Phono.m:144
#5 0x33a67fec in -[NSObject(NSObject) performSelector:withObject:withObject:] ()
#6 0x000283b0 in -[PhoneGapDelegate execute:] ()
#7 0x00002d5e in -[AppDelegate execute:] (self=0x1196a0, _cmd=0x3b478, command=0x55289a0) at AppDelegate.m:106
#8 0x00028562 in -[PhoneGapDelegate webView:shouldStartLoadWithRequest:navigationType:] ()
#9 0x00002d04 in -[AppDelegate webView:shouldStartLoadWithRequest:navigationType:] (self=0x1196a0, _cmd=0x323a130d, theWebView=0x119460, request=0x5515e70, navigationType=5) at AppDelegate.m:100
#10 0x3220e9f6 in -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] ()
#11 0x3220da50 in -[UIWebViewWebViewDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:] ()
#12 0x33a6bd04 in __invoking___ ()
#13 0x33a6bbd4 in -[NSInvocation invoke] ()
#14 0x33a6b730 in -[NSInvocation invokeWithTarget:] ()
#15 0x325772cc in -[_WebSafeForwarder forwardInvocation:] ()
#16 0x33a69aec in ___forwarding___ ()
#17 0x33a69860 in __forwarding_prep_0___ ()
#18 0x33a6bd04 in __invoking___ ()
#19 0x33a6bbd4 in -[NSInvocation invoke] ()
#20 0x3047238c in SendMessage ()
#21 0x3049e3b6 in HandleDelegateSource ()
#22 0x33a767dc in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#23 0x33a485b6 in __CFRunLoopDoSources0 ()
#24 0x33a47e5a in __CFRunLoopRun ()
#25 0x33a47c86 in CFRunLoopRunSpecific ()
#26 0x33a47b8e in CFRunLoopRunInMode ()
#27 0x33b0e4aa in GSEventRunModal ()
#28 0x33b0e556 in GSEventRun ()
#29 0x32099328 in -[UIApplication _run] ()
#30 0x32096e92 in UIApplicationMain ()
#31 0x00002826 in main (argc=1, argv=0x2fdff5a0) at main.m:14
Current language: auto; currently objective-c
I Need an ssl cdn url.
Is there a backend server that devs can run and build upon for phono?
First of all this project is a super powerful tool !
But I cant help but notice the fact that there is no clear instructions on using this plugin with phonegap 3.4.0 ?
any heads up on how to use it with the latest versions ?
This is apparent when visiting Tropo.com
It is a real shame that the Phono iOS native libraries and example project are no longer maintained!
I've tried to get the sample app VisIVR working and even chatted with @steely-glint, but the libraries fail to build and/ or are not found due to incorrect paths in the Xcode projects.
It is unfortunate, as I have not been able to find an alternative that is easy to use and open-source for implementing voice calling on iOS.
The ringback tone does not finish immediately when a call is answered by the java plugin.
12:43:53.153 DEBUG - [WIRE] (i) <body xmlns="http://jabber.org/protocol/httpbind"><iq xmlns="jabber:client" from="conference-demo\40telefonica116.orl.voxeo.net@sip" type="set" id="1cc75b36-c102-476e-adec-2ac7308ca21b" to="[email protected]/voxeo"><jingle xmlns="urn:xmpp:jingle:1" action="session-terminate" initiator="[email protected]/voxeo" sid="1d90513bc1ac41709359165024a3807f"><reason xmlns=""><success/></reason></jingle></iq></body>
phonosdk-0.3 build #117 on Hudson
Test Scenario:
Call from Phono to Blink [&] Call from Blink to Phono
Steps:
Expected Result:
Ringback Tone will always ring til the Blink accept or reject.
Actually Result:
Ringback Tone just only ring once.
And the same issue as "Call from Blink to Phono".
Note:
Only shows up on Linux Chrome when using WebRTC transport. Shouldn't the video the audio is coming from be h/w 0 and display: none so it doesn't mess up page layouts?
The java audio plugin can't access the microphone after a reload.
The applet appears not to free the microphone resource on page reload.
The first call works (as do subsequent ones) until a page reload or
other action causes a second applet instance to load .
(IE9 on Win7 home premium)
The RFC (http://www.ietf.org/rfc/rfc3264.txt) says
" However, for sendonly and sendrecv streams, the answer might indicate
different payload type numbers for the same codecs, in which case,
the offerer MUST send with the payload type numbers from the answer."
Phono mobile and phono java probably don't do that correctly.
Investigation required.....
Phono isn't adding a SIP User-Agent Header
Does tropo support SSL?
I'm trying the kitchen sink demo here:
https://s.phono.com/releases/0.4/samples/kitchen-sink/www/index.html
and it doesn't work.
I've tried Firefox and Chrome.
Doesn't matter what audio engine I choose.
In Firefox I get:
function() - error -
TypeError: player is null
player.start();
jquery.phono.js (line 5038)
player is null
jquery.phono.js (line 2702)13:20:40.115 DEBUG - [STROPHE] error: function () {
[native code]
} https://s.phono.com/releases/0.4/samples/kitchen-sink/www/jquery.phono.js:5038 - TypeError: player is null
In Chrome:
Uncaught TypeError: Cannot call method 'stop' of null jquery.phono.js:5041
stop jquery.phono.js:5041
Phone.doJingle jquery.phono.js:7149
Strophe.Handler.run jquery.phono.js:2693
(anonymous function) jquery.phono.js:4006
Strophe.forEachChild jquery.phono.js:1899
Strophe.Connection._dataRecv jquery.phono.js:3997
Strophe.Connection._onRequestStateChange jquery.phono.js:3854
(anonymous function) jquery.phono.js:1647
(anonymous function)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.