cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Modified Sample with Observer Window

600
Views
0
Helpful
0
Comments
npetrele
Cisco Employee

I have modified the sample.html (and accompanying sample.js) files in a way that may be helpful to those who want to learn more about Jabber SDK Voice/Video.  I added a log window to the page where you can see information about events that occur when you place calls, hold calls, mute audio, etc.

Simply download the attached files.  Place sampleWithObserver.html in the same directory as sample.html.  Put sampleWithObserver.js in the js directory below that, the same place where you'll find sample.js.

There are changes to the HTML file to add the log window, but most of the changes appear in the Javascript file (see function updateConversationInfo shown below for where to look).  This doesn't log every possible bit of information you can get from the conversation object, but it can serve as an example of what you can do to watch what's happening "behind the scenes".  Add your own items to watch, depending on what you're trying to achieve.


function updateConversationInfo(conversation, callcontainer) {
     if (signingOut) {
          return;
     }

     $( "div.log" ).append( "Call State: " + conversation.callState + "<BR>" );
     $( "div.log" ).append( "Call Event: " + conversation.callEvent + "<BR>" );
     $( "div.log" ).append( "Local Participant DN: " + conversation.localParticipant.directoryNumber + "<BR>" );
     $( "div.log" ).append( "Participant DN: " + conversation.participant.directoryNumber + "<BR>" );
     $( "div.log" ).append( "Participant Number: " + conversation.participant.number + "<BR>" );
     $( "div.log" ).append( "Participant External Number: " + conversation.participant.externalNumber + "<BR>" );
     $( "div.log" ).append( "Participant[0] Translated Number: " + conversation.participants[0].translatedNumber + "<BR>" );
     $( "div.log" ).append( "<BR><HR><BR>" );

... more modifications ...



" );

Content for Community-Ad