Created
July 29, 2011 09:17
-
-
Save bjhaid/1113498 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function(){ | |
| var client = new Faye.Client('http://10.10.5.163:9292/faye'); | |
| client.subscribe("/incomings", function(data) { | |
| var a = (data.cid_number); | |
| var b = (data.caller_name); | |
| var c = new String($('#agentExten').text()); | |
| if (a == c) { | |
| $("<div>").text("Incoming call from " + a + " " + c).dialog({ | |
| position: ['right','top'], | |
| draggable: false, | |
| modal: true, | |
| }); | |
| } | |
| }); | |
| $('#dial').click(function(){ | |
| sendValue($('#call').val()); | |
| }); | |
| function sendValue(str){$.post("http://10.10.5.163:3000/incomings/call/",{ sendValue: [str, div] }); } }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment