@@ -130,8 +130,8 @@ var CONTROLLER = window.CONTROLLER = function(phone){
130130 broadcast ( streamHolder ) ;
131131 } ;
132132
133- CONTROLLER . dial = function ( number ) { // Authenticate here??
134- var session = phone . dial ( number , get_xirsys_servers ( ) ) ; // Dial Number
133+ CONTROLLER . dial = function ( number , servers ) { // Authenticate here??
134+ var session = phone . dial ( number , servers ) ; // Dial Number
135135 if ( ! session ) return ; // No Duplicate Dialing Allowed
136136 } ;
137137
@@ -281,20 +281,23 @@ var CONTROLLER = window.CONTROLLER = function(phone){
281281
282282// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
283283// Request fresh TURN servers from XirSys - Need to explain.
284+ // room=default&application=default&domain=kevingleason.me&ident=gleasonk&secret=b9066b5e-1f75-11e5-866a-c400956a1e19
284285// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
285286function get_xirsys_servers ( ) {
286287 var servers ;
287288 $ . ajax ( {
288289 type : 'POST' ,
289- url : 'https://api .xirsys.com/getIceServers ' ,
290+ url : 'https://service .xirsys.com/ice ' ,
290291 data : {
291292 room : 'default' ,
292293 application : 'default' ,
293- domain : 'www.pubnub-example.com' ,
294- ident : 'pubnub' ,
295- secret : 'dec77661-9b0e-4b19-90d7-3bc3877e64ce' ,
294+ domain : 'kevingleason.me' ,
295+ ident : 'gleasonk' ,
296+ secret : 'b9066b5e-1f75-11e5-866a-c400956a1e19' ,
297+ secure : 1 ,
296298 } ,
297299 success : function ( res ) {
300+ console . log ( res ) ;
298301 res = JSON . parse ( res ) ;
299302 if ( ! res . e ) servers = res . d . iceServers ;
300303 } ,
0 commit comments