Implement the IP phone after clicking a phone number

xiaoxiao2021-03-06  54

The functional program of the calling phone can only be provided by the service provider, and the Web you want to do is to call the COM component, huh, huh, you will see the interface provided by this component.

-------------------------------------------------- -------------

-------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------

This page allows the user to call the specified address and accept the call.

Phone operations are: creation, connection, answering, hang up

When you receive the phone ringing, you can set the priority of the phone.

QoS guarantee (QoS generally evaluate from the call setup time, packet loss rate, jitter (delay), MOS value, and end-to-end time to extends several aspects.)

Managing videos need to use the iVideoWindow property of the TAPI control, and the Handle does not get the Window in VBScript, so the video is not called.

Note: Call the iVideoWindow property can only occur when "stream Active" event occurs.

-------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------

->

sinodigital </ title></p> <p><Script language = "javascript"> <! -</p> <p>Var ua = navigator.USERAGENT;</p> <p>Var an = navigator.appname;</p> <p>// Is IT IE?</p> <p>BMSIE = (ua.indexof ("msie")> = 1);</p> <p>IF (! bmsie)</p> <p>{</p> <p>Alert ("can only be run in IE");</p> <p>WINDOW.CLOSE;</p> <p>}</p> <p>// -></p> <p></ Script></p> <p><script language = "vbscript"></p> <p>'The following constants are copied from Tapi3if.IDL</p> <p>Const Tapimediamode_audio = & H08 & H08 & H08 &</p> <p>Const Tapimediamode_Video = & H8000 & H8000 &</p> <p>Const S_Media_audioVideo = & H8008 &</p> <p>Const TD_CAPTURE = 0</p> <p>Const TD_RENDER = 1</p> <p>Const QSL_Needed = 1</p> <p>Const as_inservice = 0</p> <p>Const DC_NORMAL = 0</p> <p>Const te_callstate = 8</p> <p>Const te_callnotification = 4</p> <p>Const cs_disconnected = 3</p> <p>Const CS_IDLE = 0</p> <p>Const cs_offering = 4</p> <p>Const cs_connected = 2</p> <p>Const CNE_OWNER = 0</p> <p>Const cis_calleridname = 0</p> <p>'IDS interface</p> <p>'You can find const iid_string_itmediasupport = "{b1efc384-9355-11d0-835c-00aa003ccAbd}" in tapi3.idl, tapi3if.idl, rend.idl</p> <p>Const IID_STRING_ITTERMINALSUPPORT = "{B1EFC385-9355-11D0-835C-00Aa003ccAbd}"</p> <p>Const IID_STRING_ITBASICCALLCONTROL = "{B1EFC389-9355-11D0-835C-00Aa003ccAbd}"</p> <p>'Const Iid_string_itcallinfo = "{B1EFC390-9355-11D0-835C-00Aa003ccabd}"</p> <p>Const IID_STRING_ITCALLINFO = "{350F85D1-1227-11D3-83D4-00C04FB6809F}"</p> <p>Const IID_STRING_ITSTREAMCONTROL = "{EE3BD604-3868-11D2-A045-00C04FB6809F}"</p> <p>Const IID_STRING_ITDIRECTORYOBJECTCONMERENCE = "{F1029E5D-CB5B-11D0-8D59-00C04FD91AC0}"</p> <p>Const IID_STRING_ITCALLSTATEEVENT = "{62F47097-95C9-11D0-835D-00Aa003ccAbd}"</p> <p>Const IID_STRING_ITCALLNOTIFICATIONEVENT = "{895801DF-3DD6-11D1-8F30-00C04FB6809F}"</p> <p>Const IID_STRING_IVIDEOWINDOW = "{56A868B4-0AD4-11CE-B03A-0020AF0BA770}"</p> <p>'Definition of this CLSID TAPI3.H below</p> <p>Const CLSID_STRING_VIDEOWINDOWTERM = "{F7438990-D6EB-11D0-82A6-00AA00B5CA1B}"</p> <p>'********************************************************** ***********************************</p> <p>'Global variable</p> <p>'********************************************************** ***********************************</p> <p>'Set to true, you can skip when you can't complete the connection</p> <p>DIM SunableToComplete</p> <p>Dim sbneedtoExit</p> <p>SunableToComplete = FALSE</p> <p>sbneedtoExit = false</p> <p>DIM PREGISTEREDCALLNOTIFICATION (50)</p> <p>DIM PREGISTEREDNAME (50)</p> <p>Dim iqtaregistered</p> <p>qtaregistered = 0</p> <p>DIM ScurrentAddressType</p> <p>ScurrentAddressType = -1</p> <p>DIM Spitcall</p> <p>Spitcall = EMPTY</p> <p>DIM PVideoWindow1</p> <p>Dim pvideoWindow2</p> <p></ script></p> <p><script id = "clientEventHandlersvbs" language = "vbscript"> 'error handling</p> <p>SUB Checkerror (strmsg)</p> <p>IF not err.number = 0 THEN</p> <p>Msgbox strmsg & ":" & err.number & ";" & err.description</p> <p>sbneedtoExit = TRUE</p> <p>Err.clear</p> <p>END IF</p> <p>End Sub</p> <p>'********************************************************** *******************</p> <p>'********************************************************** *******************</p> <p>'********************************************************** *******************</p> <p>'********************************************************** *******************</p> <p>'Enumerate dial-in call, and reality in LIST</p> <p>Sub window_onload</p> <p>ON Error ResMe next</p> <p>'If the TAPI control does not have initial testization</p> <p>IF sunabletocomplete = true kil</p> <p>EXIT SUB</p> <p>END IF</p> <p>'Monitor all addresses</p> <p>DIM INTTMP</p> <p>INTTMP = FIND_ADDRESS_AND_REGISTER ()</p> <p>IF sbneedtoexit then</p> <p>EXIT SUB</p> <p>END IF</p> <p>IF INTTMP = 0 THEN</p> <p>Msgbox "Cannot find any IP address", 0, "primary test"</p> <p>EXIT SUB</p> <p>END IF</p> <p>'Choose the first IP address (if there are multiple IP addresses)</p> <p>Seladdress.Options (0) .Selected = TRUE</p> <p>Call changeoptionsstate ()</p> <p>WINDOW.STATUS = "Complete"</p> <p>End Sub</p> <p>'********************************************************** *******************</p> <p>'********************************************************** *******************</p> <p>'********************************************************** *******************</p> <p>'********************************************************** *******************</p> <p>'If you have already started the service, you will find at least one audio device, and register all the addresses. After registration, return the number of registered addresses.</p> <p>Function find_address_and_register ()</p> <p>ON Error ResMe next</p> <p>DIM BUSEFULADDRESS</p> <p>Dim Bsupportvideoraudio</p> <p>Dim Bsupportvideo</p> <p>FIND_ADDRESS_AND_REGISTER = 0</p> <p>For Each Pitaddress in Tapiobj.Addresses</p> <p>BUSEFULADDRESS = falseif pitaddress.state = as_inservice then</p> <p>DIM Pitmediasupport</p> <p>Set pitmediasupport = mapper.querydispatchinterface (_</p> <p>IID_STRING_ITMEDIASUSUPPORT, PITADDRESS</p> <p>IF not err.number = 0 THEN</p> <p>Err.clear</p> <p>Else</p> <p>BSupportVideo = pitmediasupport.querymediatype (Tapimediamode_Video)</p> <p>Bsupportvideoraudio = _</p> <p>PitmediaSupport.QueryMediatype (Tapimediamode_audio) or Bsupportvideo</p> <p>Call Checkerror ("Find_address_and_register: itmediasupport.querymediatype")</p> <p>Busefuladdress = Bsupportvideoraudio</p> <p>END IF</p> <p>END IF</p> <p>If Busefuladdress Then</p> <p>IQtaregistered = qtaregistered 1</p> <p>IF Bsupportvideo Then</p> <p>MODES = S_MEDIA_AUDIOVIDEO</p> <p>Else</p> <p>Modes = Tapimediamode_audio</p> <p>END IF</p> <p>PregisteredCallNotification (iqtaregistered) = Tapiobj.registerCallNotifications (Pitaddress, True, True, Modes, 0)</p> <p>PregisteredName (iqtaregistered) = pitaddress.addressname</p> <p>IF not err.number = 0 Then 'Probably this Address Does Not Support Incoming Calls</p> <p>IQtaregistered = qtaregister-1</p> <p>Err.clear</p> <p>Else</p> <p>Find_address_and_register = find_address_and_register 1</p> <p>END IF</p> <p>DIM Option</p> <p>SET OPTION = Document.createElement ("option")</p> <p>OOption.Text = Pitaddress.addressName</p> <p>OOption.Value = pitaddress.addressname</p> <p>Seladdress.Add (OOption)</p> <p>Set OOption = Nothing</p> <p>END IF</p> <p>NEXT</p> <p>Call Tapiobj.SetApplicationPriority ("Iexplore.exe", Tapimediamode_audio, True</p> <p>Call Tapiobj.SetApplicationPriority ("IExplore.exe", Tapimediamode_Video, True)</p> <p>END FUNCTION</p> <p>Sub ChangeOptionsState</p> <p>ON Error ResMe next</p> <p>SELSTR = ""</p> <p>BSupportVideo = false</p> <p>For i = 0 to seladdress.Length - 1</p> <p>IF seladdress.Options (i) .selected = true kil</p> <p>Selstr = seladdress.Options (i) .value</p> <p>EXIT for</p> <p>END IF</p> <p>NEXT</p> <p>For Each Pitaddress in Tapiobj.Addresses</p> <p>IF pitaddress.addressname = selstr</p> <p>DIM Pitmediasupport</p> <p>Set pitmediasupport = mapper.querydispatchinterface (_</p> <p>IID_STRING_ITMEDIASUSUPPORT, PITADDRESS</p> <p>Call Checkerror ("ChangeOptionsSstate: Query Itaddress for ItMediasupport")</p> <p>BSupportvideo = _</p> <p>Pitmediasupport.Query</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-113319.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="113319" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.044</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'jY53yMQRl_2BSIdMuuYQGpTGEjiHbEbfV6S6TJV9JM6vDCaDL6u7VuDI76vnWuM6wfjrk_2F2lKa9YyCQdgNf63nrQ_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>