CN103227842B - A kind of method and apparatus obtaining sip server address - Google Patents
A kind of method and apparatus obtaining sip server address Download PDFInfo
- Publication number
- CN103227842B CN103227842B CN201210021844.5A CN201210021844A CN103227842B CN 103227842 B CN103227842 B CN 103227842B CN 201210021844 A CN201210021844 A CN 201210021844A CN 103227842 B CN103227842 B CN 103227842B
- Authority
- CN
- China
- Prior art keywords
- sip server
- address
- dns
- domain name
- module
- 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
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
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of method and apparatus obtaining sip server address, the OPTION120 item in DHCP message can be obtained, domain-name information therein is processed, obtain the domain-name information for obtaining sip server address;Initiate DNS request according to the described domain-name information for obtaining sip server address, obtain the address of sip server accordingly.The present invention obtains the technology of sip server address, can automatically obtain and update the address of sip server, family gateway equipment can also be made to automatically switch on the sip server corresponding to this address, therefore, it is possible to ensure the normal work of the voice module of family gateway equipment.
Description
Technical Field
The invention relates to the field of communication, in particular to a method and a device for acquiring an SIP (initial session protocol) server address.
Background
The xPON (passive optical network) home gateway equipment which is gradually used at present is connected to the local side equipment through optical fibers, so that wider bandwidth is provided for users, and the users can enjoy better services. The home gateway device can directly provide internet access services, can also replace traditional voice services, and can carry out voice communication to realize various voice services through the functions provided by the voice module of the home gateway device. The SIP protocol is used between the voice module of the home gateway device and the SIP server deployed on the network to implement interaction between them, and complete the voice call function, as shown in fig. 1.
Usually, the SIP server address used by the voice module of the home gateway device is manually configured in advance, and the voice module is connected to a configured fixed SIP server. If the address of the SIP server changes or a handover to another SIP server is required, the address of the SIP server of the home gateway device needs to be reset. Since the home gateway devices are distributed in different places, it is inconvenient to reset the SIP server address, which causes great trouble in using the voice function of the home gateway device.
Disclosure of Invention
In view of this, the main objective of the present invention is to provide a method and an apparatus for acquiring an address of an SIP server, so as to automatically acquire the address of the SIP server, thereby ensuring normal operation of a voice module of a home gateway device.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of obtaining an address of a SIP server, the method comprising:
acquiring an OPTION120 item in a DHCP message, and processing domain name information in the DHCP message to obtain domain name information for acquiring an SIP server address;
and initiating a DNS request according to the domain name information for acquiring the SIP server address, and acquiring the address of the SIP server according to the DNS request.
The process of processing the domain name information comprises the following steps:
binary string processing is performed according to the format of the OPTION120 entry to obtain the required domain name.
The process of initiating a DNS request and obtaining the address of a SIP server includes:
and calling a domain name query interface provided by a DNS module of the home gateway equipment to send a query message aiming at the SRV record of the service position to the DNS server, and processing a response message returned by the DNS server according to the query message to obtain the IP address of the required SIP server from the response message.
And when the address of the SIP server is acquired, the voice module of the home gateway equipment is initialized again, and a link is established between the voice module and the SIP server corresponding to the acquired new SIP server address.
The home gateway device establishes a DHCP-type Wide Area Network (WAN) connection which can acquire required information from an OPTION120 item in a DHCP Acknowledgement (ACK) message; the method further comprises the following steps:
and setting a function switch for turning on or off the function aiming at the acquisition function of the SIP server address.
A device for obtaining SIP server address includes WAN connection module, DNS module; wherein,
the WAN connection module is used for acquiring an OPTION120 item in the DHCP message, processing the domain name information in the DHCP message and acquiring the domain name information for acquiring the address of the SIP server;
and the DNS module is used for initiating a DNS request according to the domain name information obtained by the WAN connection module, and accordingly acquiring the address of the SIP server.
The WAN connection module, when processing the domain name information, is configured to:
binary string processing is performed according to the format of the OPTION120 entry to obtain the required domain name.
The DNS module, when initiating a DNS request and acquiring an address of an SIP server, is configured to:
and calling a domain name query interface provided by the DNS module to send a query message aiming at the SRV record to the DNS server, and processing a response message returned by the DNS server according to the query message to obtain the IP address of the required SIP server.
The device also comprises a voice module used for carrying out initialization again when the DNS module acquires the address of the SIP server;
and the voice module is also used for establishing a link with the SIP server corresponding to the acquired new SIP server address.
The home gateway device establishes a DHCP-type WAN connection which can acquire required information from an OPTION120 item in a DHCPACK message; and/or the presence of a gas in the gas,
aiming at the function of acquiring the SIP server address, a function switch for turning on or off the function is arranged on the home gateway equipment.
The device is arranged in the home gateway equipment.
The technology for acquiring the SIP server address can automatically acquire and update the address of the SIP server, and can also enable the home gateway equipment to be automatically switched to the SIP server corresponding to the address, thereby ensuring the normal work of the voice module of the home gateway equipment.
Drawings
Fig. 1 is a schematic diagram of a connection relationship between a voice module of a home gateway device and an SIP server;
fig. 2 is a schematic diagram of a voice module of a home gateway device performing SIP server switching in an embodiment of the present invention;
fig. 3 is a flowchart of automatically acquiring an SIP server address according to an embodiment of the present invention;
fig. 4 is a simplified flowchart of acquiring an SIP server address according to an embodiment of the present invention.
Detailed Description
In practical applications, the information provided by the OPTION120 in the DHCP (dynamic host allocation protocol) message may be processed to automatically obtain the address of the SIP server, so as to implement automatic switching between SIP servers, as shown in fig. 2.
In particular, the OPTIONs 120 term is typically composed of a binary string. In application, binary string processing may be performed according to the format of the OPTION120 entry to obtain the required domain name.
A corresponding function switch may be set for the above-mentioned function of acquiring the SIP server address to turn on or off the function as required.
Specifically, a DHCP type WAN (wide area network) connection may be established on the home gateway device to obtain the required information content from the OPTION120 entry in the DHCP ACK (acknowledge) message.
The content of the OPTION120 item can be analyzed through a WAN connection module of the home gateway device, domain name information is obtained from the content and sent to a voice module of the home gateway device, after the received domain name information is processed by the voice module, a domain name query interface provided by a DNS (domain name system) module of the home gateway device is called to send a query message aiming at SRV (service location) records to a DNS server, and the DNS server is processed to obtain a required IP address of the SIP server from the query message according to a response message returned by the query message, so that the IP address can be used by the voice module.
When the address of the new SIP server is obtained through the voice module of the home gateway device, the voice module can be initialized again, and a link is established between the voice module and the SIP server corresponding to the obtained address of the new SIP server, so that the normal operation of the voice call function is ensured.
The present invention will be described in further detail with reference to the accompanying drawings.
After system initialization, the home gateway device needs to be configured as follows: and starting the function of automatically acquiring the SIP server address.
Referring to fig. 3, fig. 3 is a flowchart of automatically acquiring an SIP server address according to an embodiment of the present invention, where the flowchart includes the following steps:
step 301, a WAN connection module of the home gateway device initiates a WAN connection request, and sends a request message to a DHCP module of the home gateway device.
Step 302, the DHCP module sends a discover message to the DHCP server, where the OPTION120 request information is added. The OPTION120 request message may also be carried in other communication messages and sent to the DHCP server.
In step 303, the DHCP server sends an offer message to the DHCP module of the home gateway device.
Step 304, the DHCP module of the home gateway device sends a request message to the DHCP module of the home gateway device, where the request message is added with the OPTION120 request information.
Step 305, the DHCP server sends an ack message to the DHCP module of the home gateway device, where the ack message carries the IP address and the OPTION120 entry;
step 306, the WAN connection module of the home gateway device obtains and analyzes the content in the OPTION120 item from the DHCP module to obtain domain name information;
step 307, the WAN connection module of the home gateway device sends the domain name information to the voice module;
step 308, the voice module adds a prefix of SIP to the received domain name information to obtain a domain name of the SIP server, and calls a domain name query interface provided by the DNS module according to the domain name;
step 309, the DNS module of the home gateway device initiates a DNS request according to the domain name information, such as: constructing a query message corresponding to the SRV record of the DNS, and sending the query message to the DNS;
step 310, the DNS server sends a response message to the DNS module of the home gateway device, where the message carries the address of the SIP server queried according to the query message;
step 311, after the DNS module of the home gateway device obtains the response message, it parses the IP address of the SIP server from the response message, and returns the IP address to the voice module.
At this point, the voice module acquires the address of the SIP server. If the address of the SIP server changes, the voice module is initialized, and the voice module carries out link establishment by using the address of the new SIP server.
As can be seen from the above description, the operation idea of the present invention for acquiring the SIP server address can represent a flow shown in fig. 4, where the flow includes the following steps:
step 410: and acquiring an OPTION120 item in the DHCP message.
Step 420: and processing the domain name information in the OPTION120 item to obtain the domain name information for acquiring the address of the SIP server.
Step 430: a DNS request is initiated based on domain name information for obtaining the SIP server address,
accordingly, the address of the SIP server is obtained.
In summary, the technology for acquiring the address of the SIP server of the present invention can automatically acquire and update the address of the SIP server, and can also automatically switch the home gateway device to the SIP server corresponding to the address, so that the normal operation of the voice module of the home gateway device can be ensured.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.
Claims (9)
1. A method for obtaining an address of an SIP server, the method comprising:
acquiring an OPTION120 item in a Dynamic Host Configuration Protocol (DHCP) message, and processing domain name information in the OPTION to obtain domain name information for acquiring an SIP server address;
initiating a Domain Name System (DNS) request according to the domain name information for acquiring the SIP server address, and acquiring the address of the SIP server according to the DNS request;
the process of initiating a DNS request and obtaining an address of a SIP server includes:
and calling a domain name query interface provided by a DNS module of the home gateway equipment to send a query message aiming at the SRV record of the service position to the DNS server, and processing a response message returned by the DNS server according to the query message to obtain the IP address of the required SIP server from the response message.
2. The method according to claim 1, wherein the processing of the domain name information comprises:
binary string processing is performed according to the format of the OPTION120 entry to obtain the required domain name.
3. The method according to claim 1 or 2,
and when the address of the SIP server is acquired, the voice module of the home gateway equipment is initialized again, and a link is established between the voice module and the SIP server corresponding to the acquired new SIP server address.
4. A method according to claim 3, characterized in that the home gateway device has established thereon a DHCP type wide area network, WAN, connection capable of obtaining the required information from the OPTION120 in the DHCP acknowledge, ACK, message; the method further comprises the following steps:
and setting a function switch for turning on or off the function aiming at the acquisition function of the SIP server address.
5. An apparatus for obtaining SIP server address, the apparatus includes WAN connection module, DNS module; wherein,
the WAN connection module is used for acquiring an OPTION120 item in the DHCP message, processing the domain name information in the DHCP message and acquiring the domain name information for acquiring the address of the SIP server;
the DNS module is used for initiating a DNS request according to the domain name information obtained by the WAN connection module, and accordingly, the address of the SIP server is obtained;
the DNS module, when initiating a DNS request and acquiring an address of an SIP server, is configured to:
and calling a domain name query interface provided by the DNS module to send a query message aiming at the SRV record to the DNS server, and processing a response message returned by the DNS server according to the query message to obtain the IP address of the required SIP server.
6. The apparatus of claim 5, wherein the WAN connection module, in processing the domain name information, is configured to:
binary string processing is performed according to the format of the OPTION120 entry to obtain the required domain name.
7. The apparatus according to claim 5 or 6, further comprising a voice module, configured to reinitialize the address of the SIP server when the DNS module obtains the address of the SIP server;
and the voice module is also used for establishing a link with the SIP server corresponding to the acquired new SIP server address.
8. The apparatus of claim 7,
the home gateway device establishes a DHCP-type WAN connection which can acquire required information from an OPTION120 item in a DHCP ACK message; and/or the presence of a gas in the gas,
aiming at the function of acquiring the SIP server address, a function switch for turning on or off the function is arranged on the home gateway equipment.
9. The apparatus of claim 5, wherein the apparatus is disposed in a home gateway device.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210021844.5A CN103227842B (en) | 2012-01-31 | 2012-01-31 | A kind of method and apparatus obtaining sip server address |
PCT/CN2012/076821 WO2013113201A1 (en) | 2012-01-31 | 2012-06-13 | Sip server address acquisition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210021844.5A CN103227842B (en) | 2012-01-31 | 2012-01-31 | A kind of method and apparatus obtaining sip server address |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103227842A CN103227842A (en) | 2013-07-31 |
CN103227842B true CN103227842B (en) | 2016-09-28 |
Family
ID=48838098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210021844.5A Active CN103227842B (en) | 2012-01-31 | 2012-01-31 | A kind of method and apparatus obtaining sip server address |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103227842B (en) |
WO (1) | WO2013113201A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012113413A1 (en) * | 2011-02-21 | 2012-08-30 | Curevac Gmbh | Vaccine composition comprising complexed immunostimulatory nucleic acids and antigens packaged with disulfide-linked polyethyleneglycol/peptide conjugates |
CN106878313A (en) * | 2017-02-24 | 2017-06-20 | 宁波联视网络科技有限公司 | Cloud video collaboration signaling prosecutor method |
TWI664847B (en) * | 2017-10-27 | 2019-07-01 | 中華電信股份有限公司 | Sip gateway, call origination method thereof and call termination method thereof |
CN108712516B (en) * | 2018-05-21 | 2021-04-02 | 平安科技(深圳)有限公司 | Method, device, equipment and storage medium for acquiring SIP server address |
CN110445641A (en) * | 2019-07-11 | 2019-11-12 | 烽火通信科技股份有限公司 | The main/standby switching method and system of dns-proxy server |
JP7422592B2 (en) | 2020-04-02 | 2024-01-26 | 三菱重工業株式会社 | Control device, control method and program |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859437A (en) * | 2005-04-30 | 2006-11-08 | 华为技术有限公司 | Method for obtaining cut-in position information for user terminal and user terminal and relative device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100407625C (en) * | 2005-04-29 | 2008-07-30 | 华为技术有限公司 | Method for providing business according to its type |
CN100525317C (en) * | 2005-10-20 | 2009-08-05 | 华为技术有限公司 | Method for distributing service based on terminal mark |
CN101946479B (en) * | 2008-02-18 | 2015-08-19 | 爱立信电话股份有限公司 | Sip server in interworking WLAN/IMS system finds |
-
2012
- 2012-01-31 CN CN201210021844.5A patent/CN103227842B/en active Active
- 2012-06-13 WO PCT/CN2012/076821 patent/WO2013113201A1/en active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859437A (en) * | 2005-04-30 | 2006-11-08 | 华为技术有限公司 | Method for obtaining cut-in position information for user terminal and user terminal and relative device |
Also Published As
Publication number | Publication date |
---|---|
WO2013113201A1 (en) | 2013-08-08 |
CN103227842A (en) | 2013-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8787200B2 (en) | Device, system, and method for automatically configuring application terminals in home network | |
CN103227842B (en) | A kind of method and apparatus obtaining sip server address | |
US10469541B2 (en) | Session initiation protocol (SIP) router | |
US8326955B2 (en) | Configuration of user terminal settings in communications system | |
CN102158563B (en) | Method, system and device for acquiring IPv6 (Internet Protocol Version 6) configuration information from IPv6 transition network | |
CN102594635B (en) | Based on the terminal access method of home gateway and system and home gateway | |
GB2415325A (en) | Spontaneous discovery of remote service profiles | |
WO2015018069A1 (en) | Method, device and system for acquiring service by network terminal | |
CN105072149A (en) | Method and device for building remote communication through proxy gateway | |
WO2014117727A1 (en) | Media transfer method, apparatus and system | |
WO2017161866A1 (en) | Network connection method and device | |
CN105592172A (en) | Dynamic host configuration protocol (DHCP) reconnection method, DHCP server and system | |
JP2019518382A5 (en) | ||
CN104301450B (en) | The method and device of addressing | |
KR100650978B1 (en) | Home Network Device, Home Network Terminal and Method Having Location Information Update Function According to Dynamic Address Change Detection | |
WO2015139397A1 (en) | Nat64 resource acquisition method and acquisition/distribution apparatus | |
CN101069404B (en) | Method, device, system and networking connection equipment for opening a network link | |
JP2010268356A (en) | Gateway apparatus, relay method, relay program, and recording medium | |
CN101527711B (en) | Method, device and system for detecting survival of IPv6 session | |
KR100652984B1 (en) | Hierarchical SIP Based Mobility Management System and Method | |
JP5057124B1 (en) | COMMUNICATION DEVICE, ROUTER, COMMUNICATION SYSTEM, AND COMMUNICATION DEVICE AND ROUTER CONTROL METHOD | |
US20250126093A1 (en) | Automatic detection and network construction method and equipment based on ipv6 protocol | |
CN104333608B (en) | Mobile terminal and method and device for realizing single PDP dual stack connection | |
WO2012052705A1 (en) | Data communication | |
JP2005167728A (en) | Communication system and communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |