Haloo! Selamat Datang di Komunitas Private Training Web Development (48180 Members, 455 Projects, 3695 Topic, 10082 Comments)

Butuh karyawan baru? atau seorang Web Developer (Part-time/Freelance/Full-time), cari disini : Members Area Jobs!
Audio antrian tertimpa dgn panggilan sebelumnya yg belum selesai
khairil anwar Mengatakan : Members -
Rate Topic :
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2.  
  3. ane mau tanya soal code d bwah ini kira kira salahnya di mana ya gan ?
  4. kondisi sekarang audionya tidak menyelesaikan panggilan yang berjalan , jadi kalau ada panggilan baru audionya langsung merespon panggilan berikutnya, yang seharusnya panggilan harus di slesaikan dulu kemudian lanjut ke pemanggilan berikutnya,
  5. mohon bantuannya gan :)
  6.  
  7. <script type="text/javascript" src="{{ asset('assets/js/voice.min.js') }}"></script>
  8. <script>
  9. $(function() {
  10. $('#main').css({'min-height': $(window).height()-114+'px'});
  11. });
  12. $(window).resize(function() {
  13. $('#main').css({'min-height': $(window).height()-114+'px'});
  14. });
  15.  
  16.  
  17. (function($){
  18. $.extend({
  19. playSound: function(){
  20. return $("<embed src='"+arguments[0]+".mp3' hidden='true' autostart='true' loop='false' class='playSound'>" + "<audio autoplay='autoplay' style='display:none;' controls='controls'><source src='"+arguments[0]+".mp3' /><source src='"+arguments[0]+".ogg' /></audio>").appendTo('body');
  21.  
  22.  
  23. }
  24. });
  25. })(jQuery);
  26.  
  27. function checkcall() {
  28. $.ajax({
  29. type: "GET",
  30. url: "{{ url('assets/files/display') }}",
  31. cache: false,
  32. success: function(response) {
  33. s = JSON.parse(response);
  34. if (curl!=s[0].call_id) {
  35. $("#callarea").fadeOut(function(){
  36. $('#num0').html(s[0].number);
  37. $("#cou0").html(s[0].counter);
  38. $('#num1').html(s[1].number);
  39. $("#cou1").html(s[1].counter);
  40. $('#num2').html(s[2].number);
  41. $("#cou2").html(s[2].counter);
  42. $('#num3').html(s[3].number);
  43. $("#cou3").html(s[3].counter);
  44. });
  45. $("#callarea").fadeIn();
  46. if (curl!=0) {
  47. var bleep = new Audio();
  48. bleep.src = '{{ url('assets/sound/sound1.mp3') }}';
  49. bleep.play();
  50.  
  51. window.setTimeout(function() {
  52. msg1 = '{!! trans('messages.display.token') !!} '+s[0].call_number+' {!! trans('messages.display.please') !!} {!! trans('messages.display.proceed_to') !!} '+s[0].counter;
  53. responsiveVoice.speak(msg1, "{{ $settings->language->display }}", {rate: 0.85});
  54. }, 800);
  55.  
  56. }
  57. curl = s[0].call_id;
  58. }
  59. }
  60. });
  61. }
  62.  
  63. window.setInterval(function() {
  64. checkcall();
  65. }, 3000);
  66.  
  67. $(document).ready(function() {
  68. $.ajax({
  69. type: "GET",
  70. url: "{{ url('assets/files/display') }}",
  71. cache: false,
  72. success: function(response) {
  73. s = JSON.parse(response);
  74. curl = s[0].call_id;
  75. }
  76. });
  77. checkcall();
  78. });
  79. </script>
Maaf, Untuk Memberikan Komentar Anda Harus Login !!!