Sip terminal and its call method, VoIP audio communication methods
Technical field
The present invention relates to the communications fields, and in particular to a kind of sip terminal and its call method, VoIP audio communication methods.
Background technology
Currently based on IMS the or NGN network environments of SIP (Session Initiation Protocol) agreement, communication is double
The sip terminal of side is in VoIP(Voice over Internet Protocol)In voice call process, when the sip terminal of a side
After shutdown again off-hook when, during talk business before continuing, then the time of its on-hook of the time gap of its off-hook be necessarily less than
The delay time of setting, otherwise, the session can then terminate, then during off-hook, then can only initiate new session due to time-out.In addition,
Role of the existing sip terminal for on-hook in this VoIP voice call process also has restriction, can only be that calling terminal is hung
Talk business before off-hook could continue again within the delay time after machine can only be in the delay after called terminal on-hook
Talk business before off-hook could continue again in time.As it can be seen that existing VoIP voice communications termination mechanism is dependent on setting
Delay time and limited by calling and called role, it is impossible to the preferable practical application request for meeting user;For example, when user exists
It, can only if the sip terminal of the user is not corresponding caller or called role when on-hook is missed in VoIP voice call process
Re-initiate session flow;In another example for the user of various exchanges, possibly as the arbitrary side in call, and due to
The reasons such as secrecy also on-hook need to go to perform or implement other things in uncertain time, not ensure that within delay time again
Off-hook;Etc..For the practical application scene residing for these users, existing VoIP voice communications termination mechanism all cannot be preferable
The actual demand for meeting user, reduce the satisfaction of user experience.
Invention content
The main technical problem to be solved in the present invention is to provide a kind of sip terminal and its VoIP audio communication methods, solves
Existing VoIP voice communications termination mechanism is limited dependent on delay time and by calling and called role, it is impossible to meet user well
Practical application request the problem of.
To solve the above-mentioned problems, the present invention provides a kind of VoIP audio communication methods, the method includes:
First sip terminal and the second sip terminal establish VoIP voice communications;
The second sip terminal on-hook sends hang-off notification to the first sip terminal in off hook state, and retains this
End carries out the call resource of the VoIP voice communications with first sip terminal;
First sip terminal receives the hang-off notification that second sip terminal is sent, holding and institute under off hook state
State the VoIP voice communications of the second sip terminal;
The second sip terminal off-hook sends off-hook notification to the first sip terminal in off hook state;
It is and described after first sip terminal receives the off-hook notification that second sip terminal is sent under off hook state
Second sip terminal continues the VoIP voice communications.
In an embodiment of the present invention, it is whole to receive the 2nd SIP under off hook state for first sip terminal
After holding the hang-off notification sent, further include and the state of second sip terminal is updated to hook state;
After first sip terminal receives the off-hook notification that second sip terminal is sent under off hook state, also wrap
It includes and the state of second sip terminal is updated to off hook state.
In an embodiment of the present invention, the method further includes, and first sip terminal in off hook state exists
On-hook is to terminate the VoIP voice communications when second sip terminal is in hook state.
In an embodiment of the present invention, the method further includes, and first sip terminal is whole with the 2nd SIP
In VoIP voice call process, first sip terminal and/or second sip terminal dial termination of a call number at end, eventually
The only VoIP voice communications.
In an embodiment of the present invention, first sip terminal and/or second sip terminal pass through hooking
Dial termination of a call number.
To solve the above-mentioned problems, the present invention also provides a kind of sip terminal call method, the method includes:
First sip terminal and the second sip terminal establish VoIP voice communications;
First sip terminal receives the hang-off notification that second sip terminal is sent, holding and institute under off hook state
State the VoIP voice communications of the second sip terminal;
It is and described after first sip terminal receives the off-hook notification that second sip terminal is sent under off hook state
Second sip terminal continues the VoIP voice communications.
To solve the above-mentioned problems, the present invention also provides a kind of sip terminal call method, the method includes:
Second sip terminal and the first sip terminal establish VoIP voice communications;
The second sip terminal on-hook sends hang-off notification to the first sip terminal in off hook state, and retains this
End carries out the call resource of the VoIP voice communications with first sip terminal;
The second sip terminal off-hook sends off-hook notification to the first sip terminal in off hook state, with described the
One sip terminal continues the VoIP voice communications.
To solve the above-mentioned problems, the present invention also provides a kind of sip terminal, the sip terminal includes call module;
The call module is used to establish VoIP voice communications and with the second sip terminal at the sip terminal
After the hang-off notification that second sip terminal is sent is received under off hook state, the VoIP with second sip terminal is kept
Voice communication;
The call module is additionally operable to receive the second sip terminal transmission in the case where the sip terminal is in off hook state
Off-hook notification after, continue the VoIP voice communications with second sip terminal.
In an embodiment of the present invention, the sip terminal further includes state recording module;
The state recording module is used for after the call module receives the hang-off notification, by the 2nd SIP
The state of terminal is updated to hook state;And/or for after the call module receives the off-hook notification, by described second
The state of sip terminal is updated to off hook state.
In an embodiment of the present invention, the sip terminal further includes termination call module;
The call module that terminates is used to carry out VoIP voice communications in the call module and second sip terminal
In the process, termination of a call number is dialed, terminates the VoIP voice communications.
In an embodiment of the present invention, the sip terminal further includes on-hook detection module and off-hook detection module;
The on-hook detection module is used to detect the sip terminal
No on-hook, if so, sending hang-off notification to the call module;
The off-hook detection module is used to detect the sip terminal
No off-hook, if so, sending off-hook notification to the call module;
The call module is additionally operable to the hang-off notification being sent to second sip terminal, and it is whole to retain the SIP
End carries out the call resource of the VoIP voice communications with second sip terminal;And the off-hook notification is sent to institute
The second sip terminal is stated, continues the VoIP voice communications with second sip terminal.
In an embodiment of the present invention, the on-hook detection module is additionally operable to be in second sip terminal and hang
Machine state-detection terminates the VoIP voices with second sip terminal to during the sip terminal on-hook, notifying the call module
Call.
To solve the above-mentioned problems, the present invention also provides a kind of sip terminal, the sip terminal includes on-hook and detects mould
Block, call module and off-hook detection module;
The call module is used to establish VoIP voice communications with the second sip terminal;It is additionally operable to the on-hook detecting mould
The hang-off notification that block is sent is sent to second sip terminal, and retains the sip terminal and carried out with second sip terminal
The call resource of the VoIP voice communications;And the off-hook notification for sending the off-hook detection module is sent to described second
Sip terminal continues the VoIP voice communications with second sip terminal;
The on-hook detection module is used to detect the sip terminal
No on-hook, if so, sending hang-off notification to the call module;
The off-hook detection module is used to detect the sip terminal
No off-hook, if so, sending off-hook notification to the call module.
The beneficial effects of the invention are as follows:
Sip terminal and its VoIP audio communication method provided by the invention, when the first sip terminal and the second sip terminal are built
After vertical VoIP voice communications, wherein during side's on-hook, hang-off notification can be sent to the opposing party in off hook state, and retain this
End carries out the call resource of the VoIP voice communications;The opposing party in off hook state is it can be learnt that other side's on-hook but guarantor in this way
The call resource of the VoIP voice communications is stayed, without spending setting delay time or setting calling and called role;When the one of on-hook
Side again off-hook when, since it remains call resource, off-hook notification can be sent to the opposing party of communication, with continue with its it
The VoIP voice communications of preceding progress;As it can be seen that scheme provided by the invention, sip terminal meeting in on-hook and off-hook of communicating pair
Corresponding notice is sent to other side, and the resource used in current sessions can be retained in on-hook, continues it to remain follow-up off-hook
The VoIP voice communications of preceding progress use, and are not rely on the setting of delay time, are not also limited by calling and called role, main
Cry user or called subscriber theoretically can off-hook continues the call again in section at any time, user can be met well various
The actual demand of application scenarios improves the satisfaction of user experience.
Description of the drawings
Fig. 1 is the structure diagram one of sip terminal that the embodiment of the present invention one provides;
Fig. 2 is the structure diagram two of sip terminal that the embodiment of the present invention one provides;
Fig. 3 is the structure diagram three of sip terminal that the embodiment of the present invention one provides;
Fig. 4 is the structure diagram four of sip terminal that the embodiment of the present invention one provides;
Fig. 5 is VoIP voice communications flow diagram one provided by Embodiment 2 of the present invention;
Fig. 6 is VoIP voice communications flow diagram two provided by Embodiment 2 of the present invention;
Fig. 7 is VoIP voice communications flow diagram three provided by Embodiment 2 of the present invention;
Fig. 8 is VoIP voice communications flow diagram four provided by Embodiment 2 of the present invention.
Specific embodiment
In order to better understand the present invention, with reference to specific embodiment, the present invention is described further:
Embodiment one:
In the present embodiment, after the sip terminal of communicating pair establishes VoIP voice communications, wherein during side's on-hook, it can be to place
Hang-off notification is sent, and retain the call resource that local terminal carries out the VoIP voice communications in the opposing party of off hook state;In plucking
The opposing party of machine state keeps and other side then it can be seen that other side's on-hook but remain the call resources of the VoIP voice communications
VoIP voice communications;It, can be in off hook state since it remains call resource when side's off-hook again of on-hook
The opposing party send off-hook notification, continue original call;Therefore calling subscribe or called subscriber theoretically can be at any time
Off-hook again in section, can continue the call as long as the side do not hung up, can meet user well and exist always divided by as long as off hook state
The actual demand of various application scenarios, without by delay time, the limitation of calling and called role.Below to involved by the present embodiment
Sip terminal be described in detail.
Shown in Figure 1, which show the structure diagram of sip terminal provided in this embodiment, which exists
In VoIP voice communications, calling party can be used as to initiate caller calling and called side and establish VoIP voice communications;Also callee can be used as, is connect
VoIP voice communications are suggested in the invitation for receiving calling party.In order to express easily, sip terminal referred to below as shown in FIG. 1 is whole for the first SIP
End, the sip terminal that the opposite end of VoIP voice communications is carried out with first sip terminal is the second sip terminal.As shown in Figure 1, first
Sip terminal includes call module, wherein:
Call module is used to establish VoIP voice communications with the second sip terminal;First sip terminal and second in the present embodiment
Can be end-to-end calling or the complete voip call Jing Guo soft switch between sip terminal;When by soft switch
During complete voip call, the soft switching server of process is wanted can be each between the first sip terminal of transparent transmission and the second sip terminal
Kind notification message;
Call module is additionally operable to receive the on-hook of the second sip terminal transmission in the case where the first sip terminal is in off hook state
After notice, the VoIP voice communications with the second sip terminal are kept, the second sip terminal, which then needs to retain at this time, carries out the VoIP voices
The resource of call;And it is additionally operable to receive the off-hook of the second sip terminal transmission in the case where the first sip terminal is in off hook state and leads to
After knowing, continue the VoIP voice communications with the second sip terminal.
It is shown in Figure 2, in order to be more convenient for judging the state that the sip terminal of Correspondent Node is current, in the present embodiment
First sip terminal may also include state recording module;The state recording module is led to for receiving above-mentioned on-hook in call module
After knowing, the state of the second sip terminal is updated to hook state;And/or for after call module receives above-mentioned off-hook notification,
The state of second sip terminal is updated to off hook state;That is, in the present embodiment, the sip terminal of communicating pair can real-time update pair
The current state of the sip terminal at end, so that it is referred to when on-hook operates;For example, when the first sip terminal on-hook, according to this
Record learns that the second sip terminal is currently also at hook state, can directly eventually if then the first sip terminal clearly its on-hook
The only VoIP voice communications;When learning that the second sip terminal is currently at off hook state according to the record, and the first sip terminal
It being intended to when following instant continues the VoIP voice communications, the first sip terminal can then send hang-off notification to the second sip terminal, and
Retain the call resource for carrying out the VoIP voice communications, used with remaining subsequently to continue the call.
In the present embodiment, in the first sip terminal and the second sip terminal in VoIP voice communications, when wherein a side thinks directly
When connecing the termination call, termination of a call number can be directly dialed, to discharge the resource that local terminal carries out the VoIP voice communications, is terminated
The VoIP voice communications.Termination of a call number in the present embodiment can be the special service number of setting, can specifically pass through
The particular service key that hooking dials setting is realized;The sip terminal at the end can send BYE signalings to the sip terminal of opposite end at this time
Terminate session.Shown in Figure 3, in order to realize above-mentioned function, the first sip terminal in the present embodiment further includes termination call
Module;The termination call module is used for when receiving hook switch and termination of a call number, and notice call module is in the call of the first SIP
When module carries out VoIP voice communications with the second sip terminal, hooking dials above-mentioned termination of a call number, notifies call module knot
The beam VoIP voice communications.
As it can be seen that in the present embodiment, when both call sides all on-hooks, bipartite VoIP voice communications can be terminated;When
In VoIP voice call process, when side's active hooking dials termination of a call number, also can actively it terminate therebetween
VoIP voice communications;Therefore user more flexible can lead to the VoIP voices currently carried out according to the control of itself practical application scene
Words are controlled.
By analysis above it is found that the first sip terminal in the present embodiment is that the second sip terminal carries out VoIP voices
In communication process, the first sip terminal also can actively be hung up and preserve the current resource for carrying out VoIP voice communications;Then off-hook again
When, the VoIP voice communications before continuing with the second sip terminal.It is corresponding, it is shown in Figure 4, first in the present embodiment
Sip terminal may also include on-hook detection module and off-hook detection module, wherein:
Whether on-hook detection module carries out for the first sip terminal of detection when the second sip terminal is in off hook state
On-hook operates, if so, sending hang-off notification to the call module of the first sip terminal;
The hang-off notification is sent to second sip terminal by the call module of the first sip terminal, and described in reservation
Sip terminal carries out the call resource of the VoIP voice communications with second sip terminal;
Whether off-hook detection module carries out for the first sip terminal of detection when the second sip terminal is in off hook state
Off-hook operates, if so, sending off-hook notification to the call module of the first sip terminal;
The call module of first sip terminal is additionally operable to the off-hook notification being sent to second sip terminal, continue with
The VoIP voice communications of second sip terminal.
The on-hook detection module of first sip terminal, which is additionally operable to be in hook state in the second sip terminal, detects the first SIP
During hanging up terminal, notice call module terminates the VoIP voice communications with the second sip terminal;Specially:Call module receives
After the first sip terminal on-hook that on-hook detection module is sent, state recording module is inquired, determines that the second sip terminal is also located at this time
When hook state, the VoIP voice communications with the second sip terminal are terminated;Otherwise the hang-off notification is sent to the 2nd SIP ends
End, and the first sip terminal of reservation and the second sip terminal carry out the call resource of the VoIP voice communications;To remain subsequently to continue
It is used in the flow of call.
It is worth noting that, the institute that the second sip terminal in the present embodiment may also comprise included by the first sip terminal is active
It can module;And first sip terminal and calling and called role of second sip terminal in VoIP voice communications there is no any restrictions.This
The first sip terminal and the second sip terminal in embodiment can be SIP software terminal or SIP hard terminals.
In addition, the concrete mode that various notification messages are sent between the first sip terminal and the second sip terminal in the present embodiment
It can all select to set according to practical application scene.In order to better understand the present invention, for reference to specific method flow,
The present invention is described further.
Embodiment two:
In the present embodiment, for the ease of stating and understanding, still using the sip terminal of communicating pair as the first sip terminal and
Second sip terminal is described, shown in Figure 5, in the VoIP voice communications, the first sip terminal perform the step of wrap
It includes:
Step 501:First sip terminal and the second sip terminal establish VoIP voice communications;First sip terminal can be used as master
Terminal is made to establish VoIP voice communications with the second sip terminal, can also called terminal and the second sip terminal is used as to establish VoIP voices
Call;
Step 502:First sip terminal received under off hook state the second sip terminal send hang-off notification;
Step 503:First sip terminal keeps the VoIP voice communications with the second sip terminal, and local terminal record may be updated
The state of second sip terminal, for example, being updated to hook state;
Step 504:First sip terminal received under off hook state the second sip terminal transmission off-hook notification after, continue with
The VoIP voice communications of second sip terminal.
Certainly, in the first sip terminal and the second sip terminal in VoIP voice call process, when the two is all in off-hook
During state, the first sip terminal and/or the second sip terminal can also dial termination of a call number by hooking, terminate therebetween
VoIP voice communications.
In addition, the first sip terminal, when the second sip terminal is in hook state, the first sip terminal can also be hung by active
Machine is to terminate VoIP voice communications therebetween.
It is shown in Figure 6, in the VoIP voice communications, the second sip terminal perform the step of include:
Step 601:Second sip terminal and the first sip terminal establish VoIP voice communications;Second sip terminal can be used as master
Terminal is made to establish VoIP voice communications with the first sip terminal, can also called terminal and the first sip terminal is used as to establish VoIP voices
Call;
Step 602:Second sip terminal on-hook sends hang-off notification, and protect to the first sip terminal in off hook state
Local terminal is stayed to carry out the call resource of the VoIP voice communications with first sip terminal;
Step 603:Second sip terminal off-hook sends off-hook notification to the first sip terminal in off hook state;
Step 604:First sip terminal and the second sip terminal continue original VoIP calls.
It is worth noting that, the above-mentioned steps in the present embodiment performed by the first sip terminal can also be held by the second sip terminal
Row;Corresponding, the above-mentioned steps that the second sip terminal performs can also be realized by the first sip terminal.Below with specific VoIP voices
Call realizes that the present invention is described further for flow;It is shown in Figure 7:
Step 701:Both sides' sip terminal enters VoIP voice call states by normal call flow;
Step 702:And it is off-hook state that hook state is plucked in the opposite end of both sides' record at this time.
Step 703:First sip terminal(Or second sip terminal)On-hook;
Step 704:First sip terminal(Or second sip terminal)To the second sip terminal(Or first sip terminal)Send out extension
Machine notice, specifically can be by sending INFO(signal=hook-on)Signaling is realized;
Step 705:Second sip terminal(Or first sip terminal)Update the first sip terminal of its record(Or the 2nd SIP it is whole
End)Pluck hook state as on-hook state.
Step 706:First sip terminal(Or second sip terminal)Off-hook again;
Step 707:First sip terminal(Or second sip terminal)To the second sip terminal(Or first sip terminal)Transmission is plucked
Machine notifies, can specifically pass through INFO(signal=hook-off)Signaling is realized;
Step 708:Second sip terminal(Or first sip terminal)Update the first sip terminal of its record(Or the 2nd SIP it is whole
End)Pluck hook state as off-hook state;
Step 709:First sip terminal and the second sip terminal continue VoIP voice communications;
Step 710:First sip terminal(Or second sip terminal)On-hook;
Step 711:First sip terminal(Or second sip terminal)To the second sip terminal(Or first sip terminal)It sends and hangs
Machine notifies, can specifically pass through INFO(signal=hook-on)Signaling is realized;
Step 712:Second sip terminal(Or first sip terminal)Update the first sip terminal of its record(Or the 2nd SIP it is whole
End)Pluck hook state as on-hook state;
Step 713:Second sip terminal(Or first sip terminal)On-hook;
Step 714:Second sip terminal(Or first sip terminal)Releasing session resource;
Step 715:Second sip terminal(Or first sip terminal)BYE end of signaling sessions are sent to the first sip terminal;
Step 716:First sip terminal(Or second sip terminal)Releasing session resource;
Step 717:Terminate VoIP voice communications.
Fig. 7 is shown terminates VoIP voice communications by both sides' on-hook.The present embodiment can also be dialed logical by a wherein side
Words terminate number and terminate VoIP voice communications, shown in Figure 8 using as abnormal protection flow, including:
Step 801:Both sides' sip terminal enters VoIP voice call states by normal call flow;
Step 802:And it is off-hook state that hook state is plucked in the opposite end of both sides' record at this time.
Step 803:First sip terminal(Or second sip terminal)On-hook;
Step 804:First sip terminal(Or second sip terminal)To the second sip terminal(Or first sip terminal)Send out extension
Machine notice, specifically can be by sending INFO(signal=hook-on)Signaling is realized;
Step 805:Second sip terminal(Or first sip terminal)Update the first sip terminal of its record(Or the 2nd SIP it is whole
End)Pluck hook state as on-hook state.
Step 806:First sip terminal(Or second sip terminal)Off-hook again;
Step 807:First sip terminal(Or second sip terminal)To the second sip terminal(Or first sip terminal)Transmission is plucked
Machine notifies, can specifically pass through INFO(signal=hook-off)Signaling is realized;
Step 808:Second sip terminal(Or first sip terminal)Update the first sip terminal of its record(Or the 2nd SIP it is whole
End)Pluck hook state as off-hook state;
Step 809:First sip terminal and the second sip terminal continue VoIP voice communications;
Step 810:Second sip terminal (or first sip terminal) dials specific transactions key by hooking;
Step 811:Second sip terminal (or first sip terminal) releasing session resource;
Step 812:Second sip terminal(Or first sip terminal)BYE end of signaling sessions are sent to the first sip terminal;
Step 813:First sip terminal(Or second sip terminal)Releasing session resource;
Step 814:Terminate VoIP voice communications.
As it can be seen that scheme provided by the invention, the sip terminal of communicating pair can be sent accordingly in on-hook and off-hook to other side
Notice, and the resource used in current sessions can be retained in on-hook, to remain the VoIP languages that follow-up off-hook continuation carries out before
Sound call uses, and is not rely on the setting of delay time, is not also limited by calling and called role, calling subscribe or called use
Family theoretically can off-hook continues the call again in section at any time, reality of the user in various application scenarios can be met well
Demand improves the satisfaction of user experience.
The above content is combine specific embodiment further description made for the present invention, it is impossible to assert this hair
Bright specific implementation is confined to these explanations.For those of ordinary skill in the art to which the present invention belongs, it is not taking off
Under the premise of from present inventive concept, several simple deduction or replace can also be made, should all be considered as belonging to the protection of the present invention
Range.