CN112565185B - SIP voice communication method based on browser - Google Patents
SIP voice communication method based on browser Download PDFInfo
- Publication number
- CN112565185B CN112565185B CN202011196106.5A CN202011196106A CN112565185B CN 112565185 B CN112565185 B CN 112565185B CN 202011196106 A CN202011196106 A CN 202011196106A CN 112565185 B CN112565185 B CN 112565185B
- Authority
- CN
- China
- Prior art keywords
- sip
- terminal
- client
- agent
- call
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1101—Session protocols
- H04L65/1104—Session initiation protocol [SIP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/16—Arrangements for providing special services to substations
- H04L12/18—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/101—Access control lists [ACL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Abstract
The invention discloses a SIP voice communication method based on a browser, which comprises the following steps: the terminal agent A starts the SIP client to read the configuration information, registers the agent server and completes the configuration of the registered node; the terminal agent A requests the SIP client to open a network communication port, sends an SIP call instruction to the SIP client after the request is successful, and the SIP client forwards the instruction to the agent server to call the terminal agent B; after receiving the SIP call, the terminal agent B sends a request for answering the voice talkback to the agent server, and after the request is successful, the terminal agent B connects the call and receives the RTP audio stream; the terminal agent B sends a hang-up voice call request, the agent server informs the terminal agent A through the SIP signaling interface after detecting the hang-up call request, and returns hang-up information to the terminal agent B after the terminal agent A hangs up the call, and the terminal agent B hangs up the voice call through the target SIP terminal. The invention utilizes the browser as the data convergence port, realizes sip voice talkback at the browser end, is convenient to use and has lower operation cost.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a browser-based SIP voice communication method.
Background
With the continuous progress of information technology, people have more diversified communication modes. For example, in the last 30 years, personal communications have evolved from voice telephony based on analog electronics to audio-video intercom using digital networks. In addition, cellular networks and WiFi add mobile elements to communications. In the television industry, 30 years ago, there was only one television format, with signals transmitted over the air, received by antennas in the consumer's home. Nowadays, IPTV and high-definition digital tv based on broadband digital network have entered into common user families, and the tv network can also provide interactive user experience. Digital broadband networks, cable television networks and telephone networks in user homes are gradually unified, and the convergence of three networks becomes a technical trend.
Although various services such as video phone, conference phone, intelligent network, etc. appear, the information processing is still limited to the encoding and compression of languages and images. At present, the development of telephone communication network technology tends to be stable, and the computer network develops rapidly, mainly processes digital information, and has very powerful functions. And the voice talkback function is complex in use process and is realized by depending on hardware equipment.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a SIP voice communication method based on a browser, wherein the browser is used as a data convergence port, and the SIP voice talkback function is realized at the browser end.
The purpose of the invention is realized by the following technical scheme:
a SIP voice communication method based on a browser comprises the following steps:
the method comprises the following steps: the terminal agent A starts an SIP client program execution file, reads configuration information, registers an agent server after the start is successful, and completes the configuration of a registration node;
step two: the terminal agent A requests the SIP client to open a network communication port through a tcp/ip protocol, sends an SIP call instruction to the SIP client after the request is successful, and the SIP client forwards the instruction to the agent server to start calling the terminal agent B;
step three: the terminal agent B answers the SIP call request through the target SIP terminal, initiates an answer voice talkback request to the agent server, connects the call after the request is successful, and starts to receive the RTP audio stream;
step four: the terminal agent B initiates a hang-up voice call request through the target SIP terminal, the agent server informs the terminal agent A through the SIP signaling interface after detecting the hang-up call request of the target SIP terminal, and returns hang-up information to the terminal agent B after the terminal agent A hangs up the call, and the terminal agent B hangs up the voice call through the target SIP terminal.
Specifically, the third step further includes: and after the terminal agent B is communicated, the proxy server receives the voice data sent by the terminal agent A, encapsulates the voice data into an RTP audio stream and sends the RTP audio stream to the target SIP terminal.
Specifically, the starting method for starting the SIP client by the terminal agent a in the step one includes: the method comprises the following steps of window self-starting, manual starting and web browser custom protocol calling starting; the window self-starting mode comprises the following steps: when the client is installed, the installation script automatically registers the executable file under a HKCU self-starting node of the registry, and when the system is started next time, the window pulls up the client process by using a self-starting mechanism to realize the self-starting of the client along with the system; the manual starting mode comprises the following steps: the user finds the executable file or the shortcut of the client, opens the executable file, and realizes that the user manually starts the client; the method for calling and starting the custom protocol of the web browser comprises the following steps: when the client is installed, the installation script automatically registers the executable file to a registry HKCR custom protocol node, the web end assembles a call instruction according to the requirements of the window custom protocol, and the browser end triggers the instruction to start the client.
Specifically, the initiating mode of the voice intercom request in the second step comprises a manual operation interface UI, a web browser custom protocol calling mode and an http local calling mode; the process of initiating the voice talkback request in a manual operation interface UI mode comprises the following steps: a user fills in a called number through a visual interface of a client, and manually triggers a call button to realize manual voice intercom initiation; the process of initiating the voice talkback request by the calling mode of the web browser custom protocol comprises the following steps: when a client is installed, an executable file is automatically registered under a registration form HKCR custom protocol node by an installation script, a calling instruction is assembled by a web end according to the requirements of a window custom protocol and is accompanied with a corresponding called parameter, and the voice talkback is initiated by triggering the instruction through a browser end; the process of initiating the voice talkback request by the http local calling mode comprises the following steps: after the client is started, a tcp port monitoring service is started in the process, a request of a specified network port is monitored, and the web end sends instruction data to the local loop address and the specified port to initiate voice talkback.
Specifically, the fourth step further includes exiting the SIP voice intercom process: and after detecting that the SIP client quits the interactive interface, the proxy server informs the user of canceling the call through the SIP signaling interface and records the state log to finish the process.
The invention has the beneficial effects that: the invention utilizes the browser as a data convergence port, sends the voice call at the browser end, and establishes the SIP voice talkback conversation function at the browser end, thereby fully using the server resource and improving the utilization rate of the browser in the voice conversation network.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a flowchart of the instruction interaction of the terminal agent a registering with the proxy server of the present invention.
Fig. 3 is a flow chart of SIP voice call instructions of the present invention.
Fig. 4 is a flow diagram of a SIP voice hang-up instruction of the present invention.
Detailed Description
In order to more clearly understand the technical features, objects, and effects of the present invention, embodiments of the present invention will now be described with reference to the accompanying drawings.
In this embodiment, as shown in fig. 1, a SIP voice communication method based on a browser includes the following steps:
the method comprises the following steps: the terminal agent A starts an SIP client program execution file, reads configuration information, registers an agent server after the start is successful, and completes the configuration of a registration node;
step two: the terminal agent A requests the SIP client to open a network communication port through a tcp/ip protocol, and sends an SIP call instruction to the SIP client after the request is successful, and the SIP client forwards the instruction to the agent server to start to call the terminal agent B;
step three: the terminal agent B answers the SIP call request through the target SIP terminal, initiates an answer voice talkback request to the agent server, connects the call after the request is successful, and starts to receive the RTP audio stream;
step four: the terminal agent B initiates a hang-up voice call request through the target SIP terminal, the agent server informs the terminal agent A through the SIP signaling interface after detecting the hang-up call request of the target SIP terminal, and returns hang-up information to the terminal agent B after the terminal agent A hangs up the call, and the terminal agent B hangs up the voice call through the target SIP terminal.
Specifically, the third step further includes: after the terminal agent B is communicated, the proxy server receives the voice data sent by the terminal agent A, encapsulates the voice data into an RTP audio stream and sends the RTP audio stream to the target SIP terminal.
Specifically, as shown in fig. 2, the starting method for the terminal agent a to start the SIP client in the first step includes: the method comprises the steps of window self-starting, manual starting and web browser custom protocol calling starting. The starting process comprises the following steps:
1. after the client is started, the terminal agent A sends a REGISTER registration request to the proxy server;
2. the proxy server obtains that the user information is not in the configuration library through the back-end authentication, and then returns 401Unauthorized inquiry information to the terminal proxy, wherein the inquiry information comprises a token required by the security authentication;
3. after the terminal agent inputs the identification and the password thereof according to the requirement, the terminal agent encrypts the identification and the password according to the security authentication token and reports the encrypted identification and the encrypted password to the proxy server by using a REGISTER message;
4. the proxy server decrypts the user information in the REGISTER message, REGISTERs the user information in the configuration library after authentication and verification are legal, and returns a success response message 200 OK to the terminal agent A .
The window self-starting mode comprises the following steps: when the client is installed, the installation script automatically registers the executable file under a HKCU self-starting node of the registry, and when the system is started next time, the window pulls up the client process by using a self-starting mechanism to realize the self-starting of the client along with the system; the manual starting mode comprises the following steps: the user finds the executable file or the shortcut of the client, opens the executable file, and realizes that the user manually starts the client; the calling and starting mode of the web browser custom protocol comprises the following steps: when the client is installed, the installation script automatically registers the executable file to a registry HKCR custom protocol node, the web end assembles a call instruction according to the requirements of the window custom protocol, and the browser end triggers the instruction to start the client.
Specifically, as shown in fig. 3, the initiating manner of the voice intercom request in the second step includes manners of manual operation interface UI, web browser custom protocol call, and http local call. The process of initiating the voice intercom request specifically comprises the following steps:
1. a user initiates a call, and a terminal agent A initiates an Invite request to a proxy server;
2. after the proxy server confirms that the user authentication is passed through the authentication service, the proxy server checks whether the address of the user is included in the Via header field in the request message. If yes, indicating that loopback occurs, and returning a response indicating an error; if there is no problem, the proxy server inserts its own address in the Via header field of the request message and forwards the Invite request To the called terminal agent B indicated in the To field of the Invite message;
3. the proxy server sends a response message in call processing, 100 Trying, to a terminal proxy A ;
4. terminal agent B sends response message in call processing, 100 Trying, to proxy server;
5. the terminal agent B indicates the Ringing of the called user, and after the Ringing of the user, 180 Ringing Ringing information is sent to the agent server;
6. the proxy server forwards the ringing information of the called user to a terminal agent A ;
7. the called user answers, the terminal agent B returns response (200 OK) indicating connection success to the proxy server;
8. the proxy server forwards the success indication (200 OK) to terminal agent a ;
9. after receiving the message, the terminal agent A sends an ACK message to the agent server for confirmation;
10. the proxy server forwards the ACK confirmation message to the terminal agent B;
11. and establishing communication connection between the calling and called users to start conversation.
The process of initiating the voice talkback request in the manual operation interface UI mode comprises the following steps: and the user fills in the called number through a visual interface of the client, and manually triggers the call button to realize manual voice intercom initiation. The process of initiating the voice talkback request by the calling mode of the web browser custom protocol comprises the following steps: when the client is installed, the installation script automatically registers the executable file to a registry HKCR custom protocol node, the web end assembles a calling instruction according to the requirement of a window custom protocol and attaches a corresponding called parameter, and the voice talkback is initiated by a browser end triggering instruction. The process of initiating the voice talkback request by the http local calling mode comprises the following steps: after the client is started, a tcp port monitoring service is started in the process, a request of a specified network port is monitored, and the web end sends instruction data to the local loop address and the specified port to initiate voice talkback
Specifically, as shown in fig. 4, the fourth step further includes exiting the SIP voice intercom process: and after detecting that the SIP client exits the interactive interface, the proxy server informs the logout of the call through the SIP signaling interface and records the state log to end the process. Exiting the SIP voice intercom process office comprises:
1. after the user finishes the conversation, the called user hangs up, and the terminal agent B sends a Bye message to the proxy server;
2. the proxy server forwards a Bye message to the terminal proxy A, and simultaneously sends the detailed information of the user call to the authentication center;
3. after the calling user hangs up, the terminal agent A sends a response message 200 OK for confirming hang up to the agent server;
4. the proxy server forwards response message 200 OK.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (3)
1. A SIP voice communication method based on a browser is characterized by comprising the following steps:
the method comprises the following steps: the terminal agent A starts an SIP client program execution file, reads configuration information, registers an agent server after the start is successful, and completes the configuration of a registration node; the starting mode of starting the SIP client by the terminal agent A comprises window self-starting, manual starting and web browser custom protocol calling starting, and the starting process comprises the following steps:
after the client is started, the terminal agent A sends a REGISTER registration request to the proxy server;
the proxy server obtains that the user information is not in the configuration library through the back-end authentication, and then returns 401Unauthorized inquiry information to the terminal proxy, wherein the inquiry information comprises a token required by the security authentication;
after the terminal agent inputs the identification and the password thereof according to the requirement, the terminal agent encrypts the identification and the password according to the security authentication token and reports the encrypted identification and the encrypted password to the proxy server by using a REGISTER message;
the proxy server decrypts the user information in the REGISTER message, REGISTERs the user information in a configuration library after passing authentication and verification, and returns a successful response message 200 OK to the terminal proxy A ;
the window self-starting mode comprises the following steps: when the client is installed, the installation script automatically registers the executable file under a HKCU self-starting node of the registry, and when the system is started next time, the window pulls up the client process by using a self-starting mechanism to realize the self-starting of the client along with the system; the manual starting mode comprises the following steps: the user finds the executable file or the shortcut of the client, opens the executable file, and realizes that the user manually starts the client; the calling and starting mode of the web browser custom protocol comprises the following steps: when the client is installed, the installation script automatically registers the executable file under a registration form HKCR custom protocol node, the web end assembles a calling instruction according to the requirements of the window custom protocol, and the client is started by triggering the instruction through the browser end;
step two: the terminal agent A requests the SIP client to open a network communication port through a tcp/ip protocol, and sends an SIP call instruction to the SIP client after the request is successful, and the SIP client forwards the instruction to the agent server to start to call the terminal agent B;
step three: the terminal agent B answers the SIP call request through the target SIP terminal, initiates an answer voice talkback request to the agent server, connects the call after the request is successful, and starts to receive the RTP audio stream;
step four: a terminal agent B initiates a hang-up voice call request through a target SIP terminal, after detecting the hang-up call request of the target SIP terminal, an agent server informs a terminal agent A through an SIP signaling interface, and returns hang-up information to the terminal agent B after the terminal agent A hangs up the call, and the terminal agent B hangs up the voice call through the target SIP terminal; and further comprising exiting the SIP voice talkback process: and after detecting that the SIP client quits the interactive interface, the proxy server informs the user of canceling the call through the SIP signaling interface and records the state log to finish the process.
2. The SIP voice communication method based on browser according to claim 1, wherein the third step further comprises: and after the terminal agent B is communicated, the proxy server receives the voice data sent by the terminal agent A, encapsulates the voice data into an RTP audio stream and sends the RTP audio stream to the target SIP terminal.
3. The SIP voice communication method based on the browser of claim 1, wherein the initiating mode of the voice intercom request in the second step comprises modes of manual operation interface UI, web browser custom protocol calling and http local calling; the process of initiating the voice talkback request in the manual operation interface UI mode comprises the following steps: a user fills in a called number through a visual interface of a client, and manually triggers a call button to realize manual voice intercom initiation; the process of initiating the voice talkback request by the calling mode of the web browser custom protocol comprises the following steps: when a client is installed, an executable file is automatically registered under a registration form HKCR custom protocol node by an installation script, a calling instruction is assembled by a web end according to the requirements of a window custom protocol and is accompanied with a corresponding called parameter, and the voice talkback is initiated by triggering the instruction through a browser end; the process of initiating the voice talkback request by the http local calling mode comprises the following steps: after the client is started, a tcp port monitoring service is started in the process, a request of a specified network port is monitored, and the web end sends instruction data to the local loop address and the specified port to initiate voice talkback.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011196106.5A CN112565185B (en) | 2020-10-30 | 2020-10-30 | SIP voice communication method based on browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011196106.5A CN112565185B (en) | 2020-10-30 | 2020-10-30 | SIP voice communication method based on browser |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112565185A CN112565185A (en) | 2021-03-26 |
CN112565185B true CN112565185B (en) | 2023-04-11 |
Family
ID=75041277
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011196106.5A Active CN112565185B (en) | 2020-10-30 | 2020-10-30 | SIP voice communication method based on browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112565185B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114979006B (en) * | 2021-10-14 | 2023-09-05 | 中移互联网有限公司 | Session Initiation Protocol (SIP) message processing method and system |
CN113949693A (en) * | 2021-11-16 | 2022-01-18 | 云知声(上海)智能科技有限公司 | SIP-based multi-device resonance and video synchronization communication method |
CN114845252B (en) * | 2022-05-16 | 2023-03-28 | 西安云犀信息科技有限公司 | APP capable of realizing personnel management grouping intercom system suitable for industrial scene |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8695077B1 (en) * | 2013-03-14 | 2014-04-08 | Sansay, Inc. | Establishing and controlling communication sessions between SIP devices and website application servers |
CN104426854A (en) * | 2013-08-23 | 2015-03-18 | 中兴通讯股份有限公司 | Method and system for implementing agency call |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100571310C (en) * | 2000-08-11 | 2009-12-16 | 纽约市哥伦比亚大学托管会 | The system of unified communication in the Internet/intranet conversation |
US20030023730A1 (en) * | 2001-07-27 | 2003-01-30 | Michael Wengrovitz | Multiple host arrangement for multimedia sessions using session initiation protocol (SIP) communication |
GB2391420A (en) * | 2002-07-25 | 2004-02-04 | Samsung Electronics Co Ltd | Method for serving audio and image communication in web browser using session initiation protocol |
CN1913533B (en) * | 2006-09-05 | 2011-01-12 | 北京天地互连信息技术有限公司 | Remote video monitoring system based on session initialize protocol and its implementing method |
CN103812757A (en) * | 2012-11-13 | 2014-05-21 | 中兴通讯股份有限公司 | Method and system for browser emergency call in real-time communication and mobile device |
CN105723406B (en) * | 2013-07-31 | 2019-07-05 | 格林伊登美国控股有限责任公司 | System and method for having the web-based real time communication of the transcoding of optimization |
US9769214B2 (en) * | 2013-11-05 | 2017-09-19 | Avaya Inc. | Providing reliable session initiation protocol (SIP) signaling for web real-time communications (WEBRTC) interactive flows, and related methods, systems, and computer-readable media |
CN106341645A (en) * | 2016-09-14 | 2017-01-18 | 深圳市迈盛达信息技术有限公司 | Audio and video communication system and method thereof |
-
2020
- 2020-10-30 CN CN202011196106.5A patent/CN112565185B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8695077B1 (en) * | 2013-03-14 | 2014-04-08 | Sansay, Inc. | Establishing and controlling communication sessions between SIP devices and website application servers |
CN104426854A (en) * | 2013-08-23 | 2015-03-18 | 中兴通讯股份有限公司 | Method and system for implementing agency call |
Also Published As
Publication number | Publication date |
---|---|
CN112565185A (en) | 2021-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112565185B (en) | SIP voice communication method based on browser | |
US20230209186A1 (en) | System and method for controlling surveillance cameras | |
US7907622B2 (en) | Gateway device, communication method and program | |
KR100561633B1 (en) | Intelligent system and method of visitor confirming and communication service using mobile terminal | |
WO2014063511A1 (en) | Monitoring method and internet protocol television set top box | |
US20230353603A1 (en) | Call processing system and call processing method | |
WO2013063945A1 (en) | Voice and video recording method, device and system | |
CN112953925B (en) | Real-time audio and video communication system and method based on SIP (Session initiation protocol) and RTC (real time communication) network | |
WO2012174904A1 (en) | Ims conference access method, device and system | |
US8098281B1 (en) | Method and apparatus for providing a video session with images captured from web based cameras | |
US20080123626A1 (en) | Accessing television and video services on a video phone over voice over internet protocol network | |
US9071690B2 (en) | Call transfer processing in SIP mode | |
WO2012079449A1 (en) | Method and system for implementing bi-directional voice intercom | |
WO2023005524A1 (en) | Order payment method and apparatus, and storage medium, device and system | |
US9100224B2 (en) | Call processing method and apparatus in VoIP system | |
US20130101106A1 (en) | Processing Data | |
KR100695393B1 (en) | System and method for providing the additional multimedia contents during communication in SIP | |
JP6186066B1 (en) | System and method for notifying event occurrence | |
KR100534598B1 (en) | Set-top box to provide SIP-based VoIP service and its method | |
KR100695391B1 (en) | System and method for providing the additional multimedia contents during communication in SIP | |
CN111865878A (en) | Call method, monitoring device, cloud platform and monitoring system | |
JP5351180B2 (en) | System and method for streaming content | |
JP2018026811A (en) | System and method for notifying event occurrence | |
KR101924073B1 (en) | System and Method for Visitor Call and IoT Device Control based on Internet of Things | |
CN113810331A (en) | Terminal control method, system, control device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Third floor, No.10, Jiuxing Avenue, high tech Zone, Chengdu, Sichuan 610041 Applicant after: Sichuan Tianyi Network Co.,Ltd. Address before: Third floor, No.10, Jiuxing Avenue, high tech Zone, Chengdu, Sichuan 610041 Applicant before: SICHUAN TIANYI NETWORK SERVICE Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |