From fbc7e5efb7cd097f952847337a4794425c4015ca Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Mon, 13 Jan 2014 15:59:40 +0100 Subject: [PATCH] MT#5811 Activate basic phone functionality --- share/templates/subscriber/webphone.tt | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/share/templates/subscriber/webphone.tt b/share/templates/subscriber/webphone.tt index 0eb9638f20..718318bdd2 100644 --- a/share/templates/subscriber/webphone.tt +++ b/share/templates/subscriber/webphone.tt @@ -98,8 +98,7 @@ sip_configuration = data.aaData.sip; sip_configuration.register = true; - //sip_configuration.trace_sip = true; - /* + sip_configuration.trace_sip = true; phone = new JsSIP.UA(sip_configuration); // ws connection events @@ -134,7 +133,6 @@ }); phone.start(); - */ xmpp_configuration = data.aaData.xmpp; // chat client modifies it, so make a copy to have the original @@ -239,12 +237,18 @@ }) .mouseleave(function(obj) { $(obj.currentTarget).find('.xmpp-roster-entry-col3').hide(); - }); + }) + .find('[rel="tooltip"]').tooltip({'html': false}); $('#' + jidid).find('.xmpp-roster-entry-ctrl-chat').click(function(obj) { console.log("start chat"); create_chat_window($(obj.target).parents("li.xmpp-roster-entry"), jidid, item.jid.bare); }); + $('#' + jidid).find('.xmpp-roster-entry-ctrl-phone').click(function(obj) { + console.log("start chat"); + //create_chat_window($(obj.target).parents("li.xmpp-roster-entry"), jidid, item.jid.bare); + call(item.jid.bare); + }); // we get a presence callback where we'll show it $(entry).hide(); @@ -279,7 +283,7 @@ } - function call() { + function call(dest_uri) { var eventHandlers = { 'progress': function(e) { console.log("call in progress"); @@ -314,7 +318,7 @@ 'mediaConstraints': {'audio': true, 'video': false} }; - phone.call('sip:voicebox@pbx1.demo.sipwise.com', options); + phone.call('sip:' + dest_uri, options); } function roster_asc_sort(a, b) { @@ -341,9 +345,9 @@ ' ' + ' ' + ''; @@ -519,9 +523,7 @@ - [% # vim: set tabstop=4 syntax=html expandtab: -%]