CN110995949B - Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol - Google Patents

Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol Download PDF

Info

Publication number
CN110995949B
CN110995949B CN201911300819.9A CN201911300819A CN110995949B CN 110995949 B CN110995949 B CN 110995949B CN 201911300819 A CN201911300819 A CN 201911300819A CN 110995949 B CN110995949 B CN 110995949B
Authority
CN
China
Prior art keywords
sip server
sip
telephone number
telephone
message
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
Application number
CN201911300819.9A
Other languages
Chinese (zh)
Other versions
CN110995949A (en
Inventor
张辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Unicloud Nanjing Digital Technology Co Ltd
Original Assignee
Unicloud Nanjing Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Unicloud Nanjing Digital Technology Co Ltd filed Critical Unicloud Nanjing Digital Technology Co Ltd
Priority to CN201911300819.9A priority Critical patent/CN110995949B/en
Publication of CN110995949A publication Critical patent/CN110995949A/en
Application granted granted Critical
Publication of CN110995949B publication Critical patent/CN110995949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M7/00Arrangements for interconnection between switching centres
    • H04M7/006Networks other than PSTN/ISDN providing telephone service, e.g. Voice over Internet Protocol (VoIP), including next generation networks with a packet-switched transport layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M7/00Arrangements for interconnection between switching centres
    • H04M7/006Networks other than PSTN/ISDN providing telephone service, e.g. Voice over Internet Protocol (VoIP), including next generation networks with a packet-switched transport layer
    • H04M7/0075Details of addressing, directories or routing tables

Abstract

A method for dynamically acquiring a telephone number based on an SIP protocol comprises the following steps: the network telephone is accessed to the network and then sends SIP discovery message; the SIP server receives the discovery message, acquires a telephone number which is not allocated yet from a pre-configured temporary user group, and sends an SIP offer message comprising the telephone number and an SIP server address to a network telephone; the network telephone receives the SIPOffer message, configures the acquired telephone number and the SIP server address, and sends a confirmation message to the SIP server; and after receiving the confirmation message, the SIP server removes the telephone number from the row and column of the account numbers to be distributed in the temporary user group. The scheme enables the network telephone based on the SIP protocol to be used more flexibly and conveniently, reduces the labor cost for deploying the network telephone and improves the working efficiency.

Description

Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol
Technical Field
The invention belongs to the field of character recognition, and particularly relates to a method, a device and a computer readable storage medium.
Background
The network telephone based on the SIP protocol is widely used by a plurality of enterprises at present, and colleagues in different departments of the enterprises can directly communicate through the internal network telephone, so that the method is very convenient, and the expenditure of communication cost is saved.
The traditional network telephone is basically realized in the following ways: a call management system based on the SIP protocol, namely an SIP server, is deployed in a local area network, an account number (telephone number) and a password to be allocated to a user are created on the SIP server, and then an ip address, the telephone number and the password of the SIP server are manually configured for each telephone by an administrator, so that the telephones can be registered and used by the SIP server. However, when a relatively large number of temporary users (such as interns) or temporary project groups appear, the traditional network telephone deployment mode is too cumbersome, and the work efficiency is seriously affected.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, one of the objectives of the present invention is to solve the problem that the prior art cannot distinguish invoices of different types with high accuracy and avoid the defect of low regression rate of characters of different scales.
The embodiment of the invention discloses a method for dynamically acquiring a telephone number based on an SIP protocol, which comprises the following steps: the network telephone is accessed to the network and then sends SIP discovery message; the SIP server receives the discovery message, acquires a telephone number which is not allocated yet from a pre-configured temporary user group, and sends an SIP offer message comprising the telephone number and an SIP server address to a network telephone; the network telephone receives the SIPOffer message, configures the acquired telephone number and the SIP server address, and sends a confirmation message to the SIP server; and after receiving the confirmation message, the SIP server removes the telephone number from the row and column of the account numbers to be distributed in the temporary user group.
In one possible embodiment, the method further comprises the step that the network telephone sends a heartbeat message to the SIP server.
In a possible embodiment, when the SIP server does not receive the response of the heartbeat message within the preset time, the SIP server puts the phone number back into the queue of the account to be allocated in the temporary user group.
In a possible embodiment, the method further comprises the steps of sending a request message containing the telephone number to an SIP server after the network telephone is restarted, and confirming whether the telephone number is distributed or not after the SIP server receives the request message; and if the telephone number is not allocated, returning an SIP _ ack message.
The embodiment of the invention also discloses a system for dynamically acquiring the telephone number based on the SIP protocol, which comprises a network telephone and an SIP server, wherein the network telephone sends an SIP discovery message after accessing the network; the SIP server receives the discovery message, acquires a telephone number which is not allocated yet from a pre-configured temporary user group, and sends an SIP offer message comprising the telephone number and an SIP server address to a network telephone; the network telephone receives the SIP offer message, configures the acquired telephone number and SIP server address, and sends a confirmation message to the SIP server; and after receiving the confirmation message, the SIP server removes the telephone number from the row and column of the account numbers to be distributed in the temporary user group.
In one possible embodiment, the method further comprises the step that the network telephone sends heartbeat messages to the SIP server
In a possible embodiment, when the SIP server does not receive the response of the heartbeat message within the preset time, the SIP server puts the phone number back into the queue of the account to be allocated in the temporary user group.
In a possible embodiment, the method further comprises the steps of sending a request message containing the telephone number to an SIP server after the network telephone is restarted, and confirming whether the telephone number is distributed or not after the SIP server receives the request message; and if the telephone number is not allocated, returning an SIP _ ack message.
The invention also discloses a computer readable storage medium having a computer program stored thereon, which when executed by a processor implements any of the methods described above.
The invention has the beneficial effects that: according to the scheme, the temporary user group is added at the server side, and a mechanism for dynamically acquiring the account number (telephone number) is realized between the server and the network telephone client side, so that the network telephone based on the SIP protocol is more flexible and convenient to use, the labor cost for deploying the network telephone is reduced, and the working efficiency is improved.
Drawings
FIG. 1 is a flow chart of a method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system according to an embodiment of the present invention.
Detailed Description
In order to facilitate understanding of those skilled in the art, the present invention will be further described with reference to the following examples and drawings, which are not intended to limit the present invention.
The embodiment of the invention discloses a method for dynamically acquiring a telephone number based on an SIP protocol, which mainly relates to two network devices, namely a network telephone and an SIP server. As in fig. 1, the method comprises:
s101, the network telephone is accessed to the network and then sends SIP discovery messages.
Specifically, after the network telephone is connected to the local area network, an SIP _ discover message is sent in a broadcast manner, and the purpose of the message is to discover an SIP server in the current local area network. And only the SIP server in the current lan will respond to the message. Among them, SIP (session initiation protocol) is an application layer control protocol introduced by IETF for establishing, modifying and terminating a multimedia session. These multimedia sessions include Internet multimedia conferences, remote education, Internet telephony, etc.
S102, the SIP server receives the SIP discovery message, acquires a telephone number which is not allocated yet from a pre-configured temporary user group, and sends an SIP offer message comprising the telephone number and an SIP server address to the network telephone.
Before this step, the SIP server needs to be configured in advance, that is, a temporary user group is added, and a telephone number resource to be allocated can be set in the temporary user group.
The network telephone needs to be manually configured, including configuring an ip address, an account (telephone number) and a password of an SIP server, and further including adding a mode for a temporary user to dynamically acquire the account.
Specifically, after receiving the SIP _ discover message of the network telephone, the SIP server selects an account (telephone number) which is not allocated yet from the temporary user group to allocate to the network telephone, and sends an SIP _ offer message containing a rental account to the network telephone.
S103, the network telephone receives the SIPOFER message, configures the acquired telephone number and the SIP server address, and sends a confirmation message to the SIP server.
Specifically, after receiving the SIP _ offer message, the network telephone configures the account number provided by the message and the IP address of the SIP server (source IP of the SIP _ offer message) into its own system, and sends an SIP _ ack acknowledgment message to the SIP server for response acknowledgment.
And S104, removing the telephone number from the row of the account numbers to be distributed in the temporary user group after the SIP server receives the confirmation message.
The SIP server receives the SIP _ ack message and confirms that the telephone number is distributed to the network telephone, and then the account number is not distributed to other network telephones.
By adding a temporary user group at the server side and setting a mechanism for dynamically acquiring an account number (telephone number) between the server and the network telephone client side, the network telephone based on the SIP protocol is more flexible and convenient to use, the labor cost for deploying the network telephone is reduced, and the working efficiency is improved.
In an embodiment, the method further includes that the network telephone dynamically acquiring the account sends a heartbeat message to the SIP server at regular time according to a preset time interval t1 after the account is successfully acquired, where t1 may be 1min or may be modified manually. The heartbeat message contains the account information that the network telephone is using, and the aim is to tell the SIP server that the network account is still in use.
The SIP server always waits for receiving heartbeat messages of the accounts allocated in the temporary user group. When a certain allocated account does not receive heartbeat messages within the continuous time of preset time t2 (for example, 20h), it is determined that the account is already released, and the SIP server relocates the account to be allocated in the queue of accounts in the temporary user group to prepare for being allocated to other network telephone temporary users.
In one embodiment, the method further comprises a processing mechanism of the network telephone when the network telephone conducts power-off restart and other actions. When the network telephone is powered off and restarted, the network telephone can send an SIP _ request message containing the information of the account number allocated last time to the SIP server, so as to confirm whether the account number is allocated to other people for use or not to the SIP server. After receiving the SIP _ request message, if the account is not allocated to other users, the SIP server returns an SIP _ ack message for confirmation, and informs the network telephone that the user can continue to use the original account. If the SIP server can not distribute the account number to the temporary network telephone user (for example, the account number is distributed to other clients), the SIP server returns an SIP _ no message to the network telephone, and the network telephone acquires the account number again after receiving the message.
The embodiment of the invention also discloses a system 10 for dynamically acquiring the telephone number based on the SIP protocol, as shown in FIG. 2, which comprises a network telephone 101 and an SIP server 102, wherein the network telephone 101 sends an SIP discovery message after accessing the network; the SIP server 102 receives the discovery message, acquires a telephone number which is not allocated yet from a pre-configured temporary user group, and sends an SIP refer message including the telephone number and an SIP server address to the network telephone 101; the network telephone 101 receives the SIP offer message, configures the acquired telephone number and the SIP server address, and sends a confirmation message to the SIP server 102; and after receiving the confirmation message, the SIP server 102 removes the telephone number from the row and column of the account number to be allocated in the temporary user group.
The network telephone 101 also sends heartbeat messages to the SIP server 102.
The SIP server 102 further includes that when the response of the heartbeat message is not received within the preset time, the SIP server 102 puts the phone number into the queue of the account to be allocated in the temporary user group again.
The system 10 further includes, after the network telephone 101 is restarted, sending a request message containing the telephone number to the SIP server 102, and after receiving the request message, the SIP server 101 confirms whether the telephone number has been allocated; and if the telephone number is not allocated, returning an SIP _ ack message.
For specific implementation of the system 10, reference may be made to the method embodiment, which is not described in detail herein.
In the several embodiments provided in the present application, it should be understood that the disclosed system and method may be implemented in other ways. For example, the above-described embodiments are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
While the invention has been described in terms of its preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims (3)

1. A method for dynamically acquiring a telephone number based on an SIP protocol is characterized in that a temporary user group is configured in an SIP server in advance, wherein the temporary user group comprises the telephone number to be allocated; the network telephone is accessed to the network and then sends SIP discovery message; the SIP server receives the discovery message, acquires a telephone number to be allocated from a pre-configured temporary user group, and sends a SIP offer message comprising the telephone number and the SIP server address to a network telephone; the network telephone receives the SIPOffer message, configures the acquired telephone number and the SIP server address, and sends a confirmation message to the SIP server; after receiving the confirmation message, the SIP server removes the telephone number from the row and column of the telephone numbers to be distributed in the temporary user group; the network telephone sends a heartbeat message to the SIP server, and when the SIP server does not receive the response of the heartbeat message within the preset time, the SIP server puts the telephone number into the row and column of the account number to be allocated in the temporary user group again; after the network telephone is restarted, sending a request message containing the telephone number to an SIP server, and after receiving the request message, the SIP server confirms whether the telephone number is distributed or not; if the telephone number is not distributed, an SIP _ ack message is returned to confirm, and the network telephone is informed that the user can continue to use the original telephone number.
2. A system for dynamically acquiring a telephone number based on an SIP protocol is characterized by comprising a network telephone and an SIP server, wherein the network telephone sends an SIP discovery message after accessing a network; the SIP server receives the discovery message, acquires a telephone number which is not allocated yet from a pre-configured temporary user group, and sends an SIP offer message comprising the telephone number and an SIP server address to a network telephone; the network telephone receives the SIP offer message, configures the acquired telephone number and SIP server address, and sends a confirmation message to the SIP server; after receiving the confirmation message, the SIP server removes the telephone number from the row and column of the account number to be allocated in the temporary user group; the network telephone set sends a heartbeat message to the SIP server; when the SIP server does not receive the response of the heartbeat message within the preset time, the SIP server puts the telephone number into the row and column of the account number to be distributed in the temporary user group again; after the network telephone is restarted, sending a request message containing the telephone number to an SIP server, and after receiving the request message, the SIP server confirms whether the telephone number is distributed or not; if the telephone number is not distributed, an SIP _ ack message is returned to confirm, and the network telephone is informed that the user can continue to use the original telephone number.
3. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, implements the SIP protocol-based method for dynamically obtaining a phone number according to claim 1.
CN201911300819.9A 2019-12-17 2019-12-17 Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol Active CN110995949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911300819.9A CN110995949B (en) 2019-12-17 2019-12-17 Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911300819.9A CN110995949B (en) 2019-12-17 2019-12-17 Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol

Publications (2)

Publication Number Publication Date
CN110995949A CN110995949A (en) 2020-04-10
CN110995949B true CN110995949B (en) 2021-10-15

Family

ID=70094707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911300819.9A Active CN110995949B (en) 2019-12-17 2019-12-17 Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol

Country Status (1)

Country Link
CN (1) CN110995949B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1620070A (en) * 2003-11-20 2005-05-25 海信集团有限公司 Network telephone based on universal instant insertion instant use protocol and its use method
CN101917526A (en) * 2010-08-24 2010-12-15 杭州华三通信技术有限公司 Method and equipment for number collocation in SIP (Session Initiation Protocol) telephone network
CN101977199A (en) * 2006-03-28 2011-02-16 株式会社日立制作所 Ip telephone system and ip telephone terminal register method
CN102014130A (en) * 2010-11-26 2011-04-13 成都智科通信技术有限公司 Automatic registration system of IP telephone of IP-PBX
CN102123209A (en) * 2010-12-31 2011-07-13 重庆邮电大学 Customer service system based on session initiation protocol (SIP) and communication method thereof
US8750477B2 (en) * 2009-07-22 2014-06-10 Felix Calls, Llc Method and system for automatic assignment of outbound and inbound call identity
CN104219401A (en) * 2013-05-31 2014-12-17 华为技术有限公司 A phone number distributing method, device and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3798114B2 (en) * 1997-05-23 2006-07-19 富士通株式会社 Terminal, mobile terminal, server, terminal communication method, and server communication method
US7673021B2 (en) * 2004-02-12 2010-03-02 Cisco Technology, Inc. Automated provisioning of phones in packet voice networks
US8345840B2 (en) * 2010-11-23 2013-01-01 Mitel Networks Corporation Fast detection and reliable recovery on link and server failures in a dual link telephony server architecture
CN107682571B (en) * 2017-08-31 2019-09-03 携程旅游信息技术(上海)有限公司 Change the means of communication, system, equipment and the storage medium of base number
CN110536278B (en) * 2018-05-24 2022-07-15 中国移动通信有限公司研究院 User card writing method and device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1620070A (en) * 2003-11-20 2005-05-25 海信集团有限公司 Network telephone based on universal instant insertion instant use protocol and its use method
CN101977199A (en) * 2006-03-28 2011-02-16 株式会社日立制作所 Ip telephone system and ip telephone terminal register method
US8750477B2 (en) * 2009-07-22 2014-06-10 Felix Calls, Llc Method and system for automatic assignment of outbound and inbound call identity
CN101917526A (en) * 2010-08-24 2010-12-15 杭州华三通信技术有限公司 Method and equipment for number collocation in SIP (Session Initiation Protocol) telephone network
CN102014130A (en) * 2010-11-26 2011-04-13 成都智科通信技术有限公司 Automatic registration system of IP telephone of IP-PBX
CN102123209A (en) * 2010-12-31 2011-07-13 重庆邮电大学 Customer service system based on session initiation protocol (SIP) and communication method thereof
CN104219401A (en) * 2013-05-31 2014-12-17 华为技术有限公司 A phone number distributing method, device and system

Also Published As

Publication number Publication date
CN110995949A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
US7729343B2 (en) IP phone system and IP phone terminal registration method
EP1477007B1 (en) Personal user agent
JP4773561B2 (en) Automatic application spreading
US7672320B2 (en) IP communications system for notifying a gateway controller of an IP address allocated to a gateway and a method therefor
US20200153838A1 (en) Alias management method and device
US10104134B2 (en) Automatic configuration of endpoint communication devices to set up a VOIP network
EP2654281A2 (en) Communication method, system and apparatus
WO2017067464A1 (en) Method and device for acquiring resource
CN112104757A (en) Method, equipment and system for configuring IP address
US20150006744A1 (en) Methods and systems for transferring calls between forked devices
EP2974159B1 (en) Method, device and system for voice communication
US20060182130A1 (en) Method and system for establishing an audio/video communication session across zones
US20110099227A1 (en) Communication application with steady-state conferencing
CN108924368B (en) Call control method, device and server
CN110995949B (en) Method, system and computer readable storage medium for dynamically acquiring telephone number based on SIP protocol
CN104780229A (en) Method of setting cloud server IP address through cloud terminal, system and cloud system
CN111866207B (en) Audio and video conference system number distribution method and system
US8059809B1 (en) Systems and methods of establishing group calls
CN103141072B (en) IP address acquiring method and network access equipment
US9143536B2 (en) Determining a location address for shared data
KR100914036B1 (en) A dynamic IP address allocation system and method enabling a host without IP to receive service requests
WO2018210268A1 (en) Call scenario mode adjustment method, application server and storage medium
CN1518321A (en) Method of increasing communication freedom
CN109257459B (en) Judgment method for improving internet surfing stability of ADSL proxy service host
TW508935B (en) Communication system automatically setting up basic data of voice over IP telephone equipment

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
GR01 Patent grant
GR01 Patent grant