Background technology
The develop rapidly of the network communications technology realizes the multimedia real-time Transmission for IP network and provides the foundation.At present, SIP software terminal technology has had develop rapidly, has merged the business of conventional telephone terminal gradually.The SIP software terminal is in a kind of voip network terminal that realizes the real-time voice conversation on the internet by Session Initiation Protocol, software wherein is the application program on PC or the smart mobile phone mostly, its basic principle is to adopt speech compression coding algorithm that speech data is carried out compressed encoding to handle, after adopting existing ICP/IP protocol that its VoP is sent to receiving terminal, again to these VoPs decompression processing of decoding, revert to original voice signal, thereby realize utilizing IP network to transmit the purpose of voice.In the transmission course of voice, adopt Session Initiation Protocol to realize Signalling exchange, reach the purpose of in communication process, carrying out session control.
The continuous development of IP network and improving constantly of the network bandwidth, brought the rise of cloud computing, at present, traditional WEB service can not satisfy the growing communication requirement of people, and the WEB service that merges the multimedia messages of speech, video and data communication arises at the historic moment.The SIP software terminal that embeds WEB service uses simple because of it, need not user's manual installation related software and quite be popular, under the safe mode of user's using system default browser, client is by the mode of control in the load default browser, when the user opens enterprise's webpage, download to user's PC terminal automatically.The SIP software terminal can in the WEB page, provide the principle of multimedia service be defined a cover can for the WEB programming call based on JavaScript, can realize the two-way software terminal expansion interface that calls.The functional module of the core logic of SIP software terminal after receiving the network service incident, the JavaScript script in activating business by these interface interchanges WEB; In WEB activated business, the JavaScript script called these expansion interfaces again, and expansion interface finally calls the functional module of SIP software terminal core logic.
Support the SIP software terminal of WEB service and many browsers to be based on IP network, use the functional module of the core logic of traditional SIP software terminal, the adaptable interface that cooperates multiple browser, make that the multimedia service on the WEB can be used on many browsers, thereby provide condition for WEB goes up the embedding multimedia service, quickened the development and the popularization of WEB multimedia service.Support the key of the SIP software terminal of WEB service and many browsers to be to use SIP software terminal technology can utilize the environment of Internet and global ip interconnection,, more easily speech and multimedia service more cheap than Plain Old Telephone Service are provided.In addition, the SIP software terminal can use in browser, directly enters can use after the WEB page is downloaded, and does not need to install separately; Also can embed after sale websites such as food and drink consulting as enterprise.In addition, it also has the characteristic of supporting many browsers, and according to the browser that the user uses, dynamically transparent ground uses different technical tactics, makes that its scope of application is obviously widened, and helps promoting and using.
The software terminal of succeeding in developing now is based on the desktop exploitation mostly and encapsulates the client of various signaling controls and medium interactive function.Wherein H.323 signaling control used or Session Initiation Protocol, and media delivery is used the real-time Transmission Real-time Transport Protocol.Use such software terminal if desired, the user must be on PC the corresponding software terminal client of manual installation.
Document " a kind of online Call Management Center client design " based on SIP (" Heilungkiang scientific and technological information " 2009 (11): 66) propose a kind of based on ActiveX, can embed the mentality of designing of the software terminal of IE browser.But the document does not provide feasible design cycle and implementation method to this thinking, and its client is not supported video calling yet.And, be that the user need install the IE browser based on the feasibility prerequisite of the solution of ActiveX control mode, because ActiveX is based on Microsoft's com component, so only support the IE browser of Microsoft, the range of application of this thinking is restricted.
The technical scheme shortcoming of above-mentioned document is: on the one hand, needing each terminal that client software must be installed based on the software terminal of desktop can use, and lacks convenience and flexibility.On the other hand, the thinking that software terminal is embedded browser that above-mentioned document proposes, though can deal with problems theoretically,, feasible implementation method is not proposed, do not consider to multiple browser to provide support yet.Popular day by day along with non-IE browsers such as FireFox only can't satisfy the demand of more users certainly based on the software terminal of ActiveX.In addition,, make the application program of only supporting IE to transfer among the IE and move that it still needs the user to download and install this assembly separately, and also broken away from the theory that browser-cross is used though the browser as FireFox so provides the extension element of supporting IE.
Therefore, develop a kind of audio frequency and video of can supporting as early as possible and converse and various WEB multimedia service, and support the software terminal of at least two kinds of main flow browsers just to become the focus of scientific and technical personnel's concern in the industry simultaneously.
Summary of the invention
In view of this, the purpose of this invention is to provide a kind of SIP software terminal and method of work thereof of supporting WEB service and many browsers, SIP software terminal of the present invention is except supporting the audio frequency and video conversation, to solve earlier and how software terminal is embedded into browser and support WEB service, also to solve and between multiple browser, carry out adaptive problem, at every kind of browser, need provide corresponding adaptable interface to call common software terminal functional module respectively.Then, the software terminal functional module is set rationally, make each functional module clear-cut job responsibility with and inner each functional module between can carry out effectively alternately, finish various set-up functions.
In order to reach the foregoing invention purpose, the invention provides a kind of SIP software terminal of supporting WEB service and many browsers, it is characterized in that: described SIP software terminal is that existing desktop software terminal is set various interface, with support WEB service and many browsers, and with the multimedia terminal of web browser as the operation carrier; This SIP software terminal is provided with JavaScript interface and two parts of software terminal load module, wherein:
The JavaScript interface is provided with two submodules: software terminal creator and software terminal expansion interface, and the software terminal creator is used to create software terminal load module, so that the basic function of this software terminal is embedded browser; The software terminal expansion interface is to embed on the basis of browser in the software terminal basic function, for the programmer provides the exploitation platform that various WEB activate business;
Software terminal load module is provided with two submodules: browser adaptable interface and software terminal functional module; The browser adaptable interface comprises ActiveX interface, XPCOM interface and other interface, so that adaptive multiple browser and the execution that cooperates WEB to activate business; The software terminal functional module is used to this SIP software terminal that various Core Features are provided.
In order to reach the foregoing invention purpose, the present invention also provides a kind of method of work of supporting the SIP software terminal of WEB service and many browsers, it is characterized in that, comprises following operating procedure:
(1) after site home page was opened by the user, browser called the JavaScript interface, by wherein the software terminal creator browser type according to the current use of user, created the software terminal load module based on corresponding browser adaptable interface;
(2) after software terminal load module was created, the software terminal functional module was directly obtained default configuration information in the configurator by the master control manager, prepared to carry out the operation of account number coupling, media-driven, media initialize and media negotiation; If this moment, the user will change configuration information, then initiate the change configuring request to the master control manager by graphic user interface, the master control manager calls configurator, original default configuration information is changed to the new configuration information of user's input, and be saved in disk file lastingly;
(3) configuration information of the relevant user account number that obtains according to step (2), master control manager control Signalling exchange module is carried out account number coupling, authentication and signaling initial work;
(4) when carrying out media-driven, the configuration information of the relevant media-driven that obtains according to step (2), audio ﹠ video equipment is opened and driven to the master control manager, for medium are prepared alternately by calling media drive control media device;
(5) configuration information of the relevant media initialize that obtains according to step (2), master control manager control medium interactive module is carried out the media initialize operation;
(6) graphic user interface receives registration of Client-initiated signaling and call event, and the master control manager triggers the Signalling exchange module, the operation that starts user's registration and set up signalling path; In user registration course, the software terminal functional module will receive with the user and register relevant network service incident, be activated business by the caused WEB of this incident thereby trigger, and variously register the caused expanded function of dependent event because of the user to finish;
(7) after signalling path was set up, the Signalling exchange module triggered the medium interactive module, started medium encoding and decoding and transmitting-receiving process, made communicating pair begin the audio frequency and video conversation; In setting up signalling path and communication process, the software terminal functional module receives and calls out, replys relevant network service incident, activate business by the caused WEB of this incident thereby trigger, finish various because of calling out, reply the caused expanded function of dependent event;
(8) the Signalling exchange module receives callee's signaling message at any time, if do not receive on-hook signaling, the medium that then continue execution in step (7) are mutual, be the audio frequency and video call flow; If receive on-hook signaling, then discharge both sides' signalling path, and stop the medium interaction flow; Simultaneously, the software terminal functional module detects the on-hook signaling incident, and triggers the execution of being activated business by the caused WEB of on-hook signaling incident.
The present invention is a kind of SIP software terminal and method of work thereof of supporting WEB service and many browsers, and except supporting the audio frequency and video conversation, this SIP software terminal can be supported WEB service and multiple browser.Compare with the thinking that communication customer end is embedded browser of document description in the background technology, the present invention has not only expanded this thinking, feasible implementation method is provided, but also provide support to multiple browser based on multiple browser adaptable interface, and the mechanism of the many browsers of this support is fully transparent to the user.
Compare with software terminal scheme based on desktop, SIP software terminal of the present invention is encapsulated into software terminal load module with the browser adaptable interface with the software terminal functional module, and trigger the constructive process of software terminal load module by the JavaScript script, finally reach the purpose that this SIP software terminal is embedded browser, not only omitted the trouble of user's manual installation software terminal, and, the mode technology maturation of this embedding browser, realize simply, convenient, just can satisfy user's demand with less technology cost.Moreover SIP software terminal of the present invention embeds in the technical scheme of browser, the shared cover software terminal functional module of various browser adaptable interfaces, and this method for designing is simple, ingenious, efficient, has improved the reusability of module.
SIP software terminal of the present invention provides the operating platform that a cover exploitation WEB activated business-based on the two-way calling interface of JavaScript for the programmer, shielded bottom software terminal module operational detail, provide great convenience for the programmer develops abundant, that satisfy the multiple demand of user, personalized WEB service.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with drawings and Examples.
The present invention supports that the SIP software terminal of WEB service and many browsers is that existing desktop software terminal is set the various interface that can support WEB service and many browsers, and with the multimedia terminal of web browser as the operation carrier.Referring to Fig. 1, introduce two critical components in the SIP software terminal of the present invention: JavaScript interface and software terminal load module, at first introduce first parts JavaScript interface:
The JavaScript interface, be provided with two submodules: software terminal creator and software terminal expansion interface, be responsible for finishing two aspect functions respectively: the first, create software terminal load module, to reach the purpose that the software terminal basic function is embedded browser, this partial function is finished by the software terminal creator; The second, be embedded in the software terminal basic function on the basis of browser, for the programmer provides the exploitation platform that various WEB activate business, this part function is born by the software terminal expansion interface.Respectively two submodule is described further below:
The software terminal creator, need provide corresponding browser adaptable interface to call the software terminal functional module because this SIP software terminal is embedded into every kind of browser, so the software terminal creator can be created software terminal load module based on corresponding browser adaptable interface according to the employed browser type of user.In case after software terminal load module was created successfully, the user just can directly use the basic function of this SIP software terminal by browser.
The software terminal expansion interface, it is an interface group, be one group specialize in the programmer carry out WEB activate business exploitation, support the two-way spare interface that calls.The method of work of this interface is: earlier detect communication event in the network by the software terminal functional module, comprise incoming call, on-hook, busy or other incident, when these incidents took place, the software terminal functional module was called the JavaScript script of WEB in activating business by the software terminal expansion interface; Then, JavaScript script during WEB activates business calls the software terminal expansion interface, this expansion interface is selected corresponding browser adaptable interface according to the browser type that the user uses again, and finally calls function corresponding interface in the software terminal functional module by corresponding browser adaptable interface; The programmer just utilizes these interfaces on the basic function module of software terminal like this, develops various rich personality business.For example, calling terminal makes a call to called end, and called end is not replied for a long time, this processing mode in existing basic talk business is: directly give calling terminal loopback time-out information, and inform calling terminal, called end is temporary transient, and nobody replys, suggestion is dialled after a while again, the process of end call simultaneously.SIP software terminal of the present invention then is provided with the interface that makes a call in the software terminal expansion interface, when the software terminal functional module detects overtime incident, can utilize this interface to remove to call call function in the software terminal functional module, like this, the business development personnel just can utilize this interface directly to realize the business of replaying automatically on the JavaScript interface, and need not to know the working mechanism of bottom software terminal functional module.
SIP software terminal expansion interface of the present invention has following two class interfaces:
The first kind is used to finish the control class interface of the correlation function of various and calling and session, has six:
User's registration interface is called the user's registration interface in the software terminal functional module, finishes terminal use's registering functional.
The interface that makes a call calls the interface of calls in the software terminal functional module, finishes the function that the calling party makes a call to the callee.
The call answering interface calls the call answering interface in the software terminal functional module, finishes the function that the callee answers caller calls.
Call out the cancellation interface, call the calling cancellation interface in the software terminal functional module, finish the function of calling party's cancellation to the calling of callee's initiation.
The end of calling interface calls the end of calling interface in the software terminal functional module, finishes the call flow of both call sides.
Obtain the call error information interface, call and obtain the call error information interface in the software terminal functional module, obtain the error code and the error message that produce in the both call sides process.
Second class is the configuration class interface, is used to finish various registrations and account and media information configuration feature; The configuration class interface comprises following three:
The account number configuration interface calls the account number configuration interface in the software terminal functional module, is the required account of calling user assigns talk, for the registration of finishing the preceding account of conversation.
The audio configuration interface, call the audio configuration interface in the software terminal functional module, finish the configuration feature of various audio-frequency informations, audio configuration information comprises: audio input device, audio output apparatus, audio sample rate, audio coding decoding form, prompt tone are selected or volume is selected.
The video configuration interface calls the video configuration interface in the software terminal functional module, finishes the configuration feature of various video informations, and video configuration information comprises: video capture device, video sampling resolution, coding and decoding video form etc.
Introduce the load module of second parts software terminal below, it is provided with two submodules: browser adaptable interface and software terminal functional module, and by browser adaptable interface encapsulation software terminal functional module and form.So mainly finish two aspect functions: the first, provide various Core Features by the software terminal functional module for this SIP software terminal.The second, finish the adaptive of multiple browser, and the execution that cooperates WEB to activate business, this partial function is finished by the browser adaptable interface that comprises ActiveX interface, XPCOM interface and other interface.
The browser adaptable interface is used to call the software terminal functional module, finish the encapsulation of software terminal functional module and realize following two aspect effects: the software terminal functional module can be fitted in the various browsers on the one hand, thereby reach the purpose of supporting multiple browser: for example, the adaptive IE browser of ActiveX interface, the adaptive FireFox browser of XPCOM interface, adaptive other the corresponding browser of other interface.On the other hand, this browser adaptable interface receives calling of software terminal expansion interface in the JavaScript interface, with the execution that cooperates WEB to activate business.
Referring to Fig. 2, introducing another submodule in the software terminal load module of SIP software terminal of the present invention-be used to finishes the structure of the software terminal functional module of the every Core Feature of this SIP software terminal and forms, hollow double-lined arrow among the figure is represented data flow, the single line arrow is represented control flows, and the software terminal functional module is provided with following member:
Graphic user interface, as with the direct mutual presentation layer of user, be used to receive user's request event, and the master control manager delivered in request carried out subsequent treatment, receive the response results of master control manager simultaneously.
The master control manager, control centre as the software terminal functional module, control the mutual and operation of other each modules: the request event that receives graphic user interface earlier, call media drive, medium interactive module or Signalling exchange module respectively according to the type of request event again, finish control and management of media driving, media initialize, signaling initialization and signaling control respectively, and with configurator exchange configuration information, and the operation result of each module is sent to graphic user interface.
Media drive is used to start audio ﹠ video equipment and carries out the driving function, and when this sip terminal started, media drive was just accepted calling of master control manager, audio ﹠ video equipment was carried out the function that starts, drives and control.
Configurator, be used to finish the renewal and the exchange of various configuration informations, when starting this SIP software terminal, configurator is just accepted calling of master control manager, be written into the various configuration parameters that comprise account number, voice configuration and video configuration, and be stored in disk, so that lasting the preservation is used for the mutual and Signalling exchange of medium that this SIP software terminal carries out.
The Signalling exchange module, use Session Initiation Protocol to finish the function of the Signalling exchange and the control medium of this SIP software terminal, this Signalling exchange module receives calling of master control manager, on the one hand, by with the network entity exchange of signaling, finish and comprise that the user registers and set up the various Signalling exchange functions of signalling path; On the other hand, after signalling path is set up, trigger the medium interactive module, start the transmitting-receiving process of Media Stream.
The medium interactive module is finished the transmission-receiving function of medium encoding and decoding and Media Stream, finishes signaling control and the user registers when the Signalling exchange module, set up signalling path after, just starting this medium interactive module, to carry out medium mutual.Particular content is: the control media capturing equipment is gathered original media stream, to encoding from the original media stream of media capturing equipment and being sent to Correspondent Node, media coding stream from Correspondent Node is decoded, more decoded flow point is not delivered to display device or stereo set output.
Referring to Fig. 3, introduce the flow process of method of work that the present invention supports the SIP software terminal of WEB service and many browsers, comprise the following steps:
(1) after site home page was opened by the user, browser called the JavaScript interface, by wherein the software terminal creator browser type according to the current use of user, created the software terminal load module based on corresponding browser adaptable interface;
(2) after software terminal load module was created, the software terminal functional module was directly obtained default configuration information in the configurator by the master control manager, prepared to carry out the operation of account number coupling, media-driven, media initialize and media negotiation; If this moment, the user will change configuration information, then initiate the change configuring request to the master control manager by graphic user interface, the master control manager calls configurator, original default configuration information is changed to the new configuration information of user's input, and be saved in disk file lastingly;
(3) configuration information of the relevant user account number that obtains according to step (2), master control manager control Signalling exchange module is carried out account number coupling, authentication and signaling initial work;
(4) when carrying out media-driven, the configuration information of the relevant media-driven that obtains according to step (2), audio ﹠ video equipment is opened and driven to the master control manager, for medium are prepared alternately by calling media drive control media device;
(5) configuration information of the relevant media initialize that obtains according to step (2), master control manager control medium interactive module is carried out the media initialize operation;
(6) graphic user interface receives registration of Client-initiated signaling and call event, and the master control manager triggers the Signalling exchange module, the operation that starts user's registration and set up signalling path; In user registration course, the software terminal functional module will receive with the user and register relevant network service incident, be activated business by the caused WEB of this incident thereby trigger, and variously register the caused expanded function of dependent event because of the user to finish;
(7) after signalling path was set up, the Signalling exchange module triggered the medium interactive module, started medium encoding and decoding and transmitting-receiving process, made communicating pair begin the audio frequency and video conversation; In setting up signalling path and communication process, the software terminal functional module receives and calls out, replys relevant network service incident, activate business by the caused WEB of this incident thereby trigger, finish various because of calling out, reply the caused expanded function of dependent event;
(8) the Signalling exchange module receives callee's signaling message at any time, if do not receive on-hook signaling, the medium that then continue execution in step (7) are mutual, be the audio frequency and video call flow; If receive on-hook signaling, then discharge both sides' signalling path, and stop the medium interaction flow; Simultaneously, the software terminal functional module detects the on-hook signaling incident, and triggers the execution of being activated business by the caused WEB of on-hook signaling incident.
The present invention has carried out implementing test by the applicant, below one of them embodiment of brief description: the application scenarios (referring to shown in Figure 4) when the present invention supports that the SIP software terminal of many browsers embeds certain tourist attractions homepage.Hollow double-lined arrow presentation medium link among Fig. 4, the single line arrow is represented signaling link.
SIP software terminal of the present invention is embedded it on homepage of these tourist attractions by certain tourist attractions, is visitor's business of providing advice.When the visitor browses the homepage of these tourist attractions, can on the software terminal interface on the homepage, click voice consulting button.Usually under default situations, software terminal dials from customer service side, trend sight spot via acting server, suppose that there is n customer service terminal as shown in the figure at the sight spot, the talking state of each customer service terminal is often different, the software terminal of visitor side at first makes a call to customer service 1, find that customer service 1 is in busy condition, then the software terminal functional module detects this busy incident, just calls JavaScript script in visitor side's homepage by the software terminal expansion interface.The JavaScript script is through handling, call " calling out the cancellation interface " in the software terminal expansion interface, cancellation is this time called out, then " interface makes a call " of calling in the software terminal expansion interface makes a call to customer service 2 again, so go down, always till being wired to first customer service that is in idle condition.The customer service 2 of supposing this moment is in idle condition, so customer service 2 receives visitor's call information, customer service 2 just answers the call, so set up signalling path between visitor and customer service 2, next is to start medium reciprocal process, and visitor and customer service 2 begin conversation.In addition, the visitor also can select manually to dial to customer service side, the acting server of each customer service terminal can carry out the signaling exchange by the acting server with visitor side, the state feedback of each customer side is given the software terminal interface of visitor side, so the visitor can select current some customer sides that is in idle condition neatly, and to this customer side initiation call request.
This embodiment provides a platform very easily for the visitor provides the sight spot counseling services, under the prerequisite that does not need manual installation conversation client, can initiate the consulting session to the sight spot customer service at any time.Simultaneously, this embodiment has also demonstrated fully the advantage of the software terminal expansion interface in the JavaScript interface of SIP software terminal of the present invention.A kind of method of work of the embodiment of the invention just is described in conjunction with a comparison typical application scene herein; in fact; method of work of the present invention not only can also can be applied to other WEB service towards this type of scene, and similarly method of work all should belong to protection scope of the present invention.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.