Technical Field
[0001] The present invention relates to the field of communications, including e.g., a method
and device for positioning Session Initiation Protocol (SIP) dialog.
Background
[0002] In an IP Multimedia Subsystem (IMS), SIP is adopted as a call control protocol.
[0003] A dialog is a core concept of a SIP network defined in a Request For Comments (RFC)
3261. The dialog represents a peer-to-peer SIP relationship kept for a period of time
between two User Agents (UA). The dialog makes the sequential transmission of messages
between the UAs and requesting for a correct route between the two UAs easier. The
dialog can be considered as a context relationship for interpreting SIP messages.
In the protocol, a dialog ID includes a Call-ID, a Local-Tag, a remote Tag and the
like. A core network element of the IMS needs to process a great number of SIP messages,
so that after the SIP messages are received, if the dialog to which the SIP messages
belong can be rapidly determined, the performance of the network element can be improved.
[0004] Usually, for a SIP response, an affair should be matched firstly, and the affair
is usually associated with the dialog, so that the dialog matching of the SIP response
is usually not a problem. For a SIP request, an initial request does not need dialog
positioning, and dialog positioning is mainly for an in-dialog request.
[0005] At present, a common dialog positioning mode is to acquire Call-ID, From-Tag and
To-Tag character strings from the SIP request for Hash location, thereby determining
the dialog corresponding to the request. In the above-mentioned process, the network
element needs to extract header parameter contents such as the Call-ID, a From-Tag
and a To-Tag from a SIP code stream, and strings and Hash locate the above related
contents, so that a dialog positioning process is more complex and lower in positioning
speed.
Summary
[0006] A method and a device for positioning a SIP dialog in the present invention, so as
to at least solve the problems of complexity and low positioning speed of an implementation
method for positioning a dialog corresponding to an in-dialog SIP message in a related
art.
[0007] According to one aspect of the present invention, a method for positioning SIP dialog
is provided, comprises: a network element receives an in-dialog SIP message carrying
index information, wherein the index information is used for indicating a position
of a dialog at a calling party or a called party; and the network element positions
the dialog according to the index information.
[0008] According to an embodiment of the present invention, based on that the network element
is an SIP proxy, before the network element receives the in-dialog SIP message carrying
the index information, the method further comprises that: the SIP Proxy adds a first
index information to an initial message received from the calling party, wherein the
first index information is used for indicating the position of the current dialog
at the calling party; and the SIP proxy transmits the initial message carrying the
first index information to the called party.
[0009] According to an embodiment of the present invention, after the SIP proxy transmits
the initial message carrying the first index information to the called party, the
method further comprises that: the SIP proxy receives a response message carrying
the first index information from the called party; the SIP proxy modifies the first
index information, wherein a modified first index information is used for indicating
the position of the current dialog at the called party; and the SIP proxy transmits
the response message carrying the modified first index information to the calling
party.
[0010] According to an embodiment of the present invention, that the network element receives
the in-dialog SIP message carrying the index information comprises that: the SIP proxy
receives the in-dialog SIP message carrying the modified first index information from
the calling party, or receives the in-dialog SIP message carrying the first index
information from the called party.
[0011] According to an embodiment of the present invention, that the network element positions
the dialog according to the index information comprises that: the SIP proxy acquires
the modified first index information or the first index information from the in-dialog
SIP message; and the SIP proxy positions the dialog according to the modified first
index information or the first index information.
[0012] According to an embodiment of the present invention, based on that the network element
is an SIP UA and is the calling party of the dialog, before the network element receives
the in-dialog SIP message carrying the index information, the method further comprises
that: the SIP UA transmits an initial message carrying second index information to
the called party, wherein the second index information is used for indicating the
position of the current dialog at the calling party.
[0013] According to an embodiment of the present invention, the network element receives
the in-dialog SIP message carrying the index information comprises that: the SIP UA
receives the in-dialog SIP message carrying the second index information from the
called party.
[0014] According to an embodiment of the present invention, the network element positions
the dialog according to the index information comprises that: the SIP UA acquires
the second index information from the in-dialog SIP message; and the SIP UA positions
the current dialog according to the second index information.
[0015] According to an embodiment of the present invention, based on that the network element
is an SIP UA and is the called party of the dialog, before the network element receives
the in-dialog SIP message carrying the index information, the method further comprises
that: the SIP UA receives the initial message from the calling party; and the SIP
UA transmits a response message carrying third index information to the calling party,
wherein the third index information is used for indicating the position of the current
dialog at the called party.
[0016] According to an embodiment of the present invention, the network element receives
the in-dialog SIP message carrying the index information comprises that: the SIP UA
receives the in-dialog SIP message carrying the third index information from the calling
party.
[0017] According to an embodiment of the present invention, the network element positions
the dialog according to the index information comprises that: the SIP UA acquires
the third index information from the in-dialog SIP message; and the SIP UA positions
the current dialog according to the third index information.
[0018] According to an embodiment of the present invention, the index information is carried
by one of the following fields: Request-uri, contact, from, to, Route and Record-Route.
[0019] According to another aspect of the present invention, a device for positioning SIP
dialog is provided, which is applied to a network element and comprises: a receiving
component, which is configured to receive an in-dialog SIP message carrying index
information, wherein the index information is used for indicating a position of a
dialog at a calling party or a called party; and a positioning component, which is
configured to position the dialog according to the index information.
[0020] According to a third aspect of the present invention, a SIP proxy is provided, comprising:
a first receiving component, which is configured to receive an in-dialog SIP message
carrying index information, wherein the index information is used for indicating a
position of a dialog at a calling party or a called party; and a positioning component,
which is configured to position the dialog according to the index information.
[0021] According to an embodiment of the present invention, the SIP proxy further comprises:
an adding component, which is configured to add a first index information to an initial
message received from the calling party, wherein the first index information is used
for indicating the position of the current dialog at the calling party; and a first
transmissing component, which is configured to transmit the initial message carrying
the first index information to the called party.
[0022] According to an embodiment of the present invention, the SIP proxy further comprises:
a second receiving component, which is configured to receive a response message carrying
the first index information from the called party; a modifying component, which is
configured to modify the first index information, wherein a modified first index information
is used for indicating the position of the current dialog at the called party; and
a second transmissing component, which is configured to transmit the response message
carrying the modified first index information to the calling party.
[0023] According to an embodiment of the present invention, the first receiving component
comprises: a receiving element, which is configured to receive the in-dialog SIP message
carrying the modified first index information from the calling party, or receive the
in-dialog SIP message carrying the first index information from the called party.
[0024] According to an embodiment of the present invention, the positioning component comprises:
an acquiring element, which is configured to acquire the modified first index information
or the first index information from the in-dialog SIP message; and a positioning element,
which is configured to position the dialog according to the modified first index information
or the first index information.
[0025] According to an embodiment of the present invention, the index information is carried
by one of the following fields: Route and Record-Route.
[0026] According to a fourth aspect of the present invention, an SIP UA is provided, comprising:
a first receiving component, which is configured to receive an in-dialog SIP message
carrying index information, wherein the index information is used for indicating a
position of a dialog at a calling party or a called party; and a positioning component,
which is configured to position the dialog according to the index information.
[0027] According to an embodiment of the present invention, the SIP UA further comprises:
a first transmissing component, which is configured to, based on that the SIP UA is
the calling party of the dialog, transmit an initial message carrying second index
information to the called party, wherein the second index information is used for
indicating the position of the current dialog at the calling party.
[0028] According to an embodiment of the present invention, the first receiving component
comprises: a first receiving element, which is configured to receive the in-dialog
SIP message carrying the second index information from the called party.
[0029] According to an embodiment of the present invention, the positioning component comprises:
a first acquiring element, which is configured to acquire the second index information
from the in-dialog SIP message; and a First positioning element, which is configured
to position the current dialog according to the second index information.
[0030] According to an embodiment of the present invention, the SIP UA further comprises:
a second receiving component, which is configured to, based on that the SIP UA is
the called party of the dialog, receive the initial message from the calling party;
and a second transmissing component, which is configured to transmit a response message
carrying third index information to the calling party, wherein the third index information
is used for indicating the position of the current dialog at the called party.
[0031] According to an embodiment of the present invention, the first receiving component
comprises: a second receiving element, which is configured to receive the in-dialog
SIP message carrying the third index information from the calling party.
[0032] According to an embodiment of the present invention, the positioning component comprises:
a second acquiring element, which is configured to acquire the third index information
from the in-dialog SIP message; and a second positioning element, which is configured
to position the current dialog according to the third index information.
[0033] According to an embodiment of the present invention, the index information is carried
by one of the following fields: Request-uri, contact, from and to.
[0034] According to the present invention, the index information for indicating the position
of the dialog at the calling party or the called party is carried by the in-dialog
SIP message, and the dialog is positioned according to the index information, so that
such an implementation mode is simple and high in positioning speed, and the performance
of the network element is improved.
Brief Description of the Drawings
[0035] Drawings, provided for further understanding of the present invention and forming
a part of the specification, are used to explain the present invention together with
embodiments of the present invention rather than to limit the present invention. In
the accompanying drawings:
Fig. 1 is a flowchart of a method for positioning a SIP dialog according to an embodiment
of the present invention;
Fig. 2 is a schematic diagram of a basic calling flow of a SIP proxy according to
preferred embodiment 1 of the present invention;
Fig. 3 is a schematic diagram of implementation of a flow when an SIP UA is a calling
party in a contact-uri way according to preferred embodiment 2 of the present invention;
Fig. 4 is a schematic diagram of implementation of a flow when an SIP UA is a called
party in a contact-uri way according to preferred embodiment 2 of the present invention;
Fig. 5 is a schematic diagram of implementation of a flow when an SIP UA is a calling
party in a Local-Tag way according to preferred embodiment 3 of the present invention;
Fig. 6 is a schematic diagram of implementation of a flow when an SIP UA is a called
party in a Local-Tag way according to preferred embodiment 3 of the present invention;
Fig. 7 is a structural diagram of a SIP dialog positioning device according to an
embodiment of the present invention;
Fig. 8 is a structural diagram of a SIP proxy according to an embodiment of the present
invention;
Fig. 9 is a structural diagram of a SIP proxy according to a preferred embodiment
of the present invention;
Fig. 10 is a structural diagram of an SIP UA according to an embodiment of the present
invention; and
Fig. 11 is a structural diagram of an SIP UA according to a preferred embodiment of
the present invention.
Detailed Description of the Embodiments
[0036] It should be noted that the embodiments of the present invention and the characteristics
in the embodiments can be combined if there is no conflict. The present invention
is described below with reference to the drawings and the embodiments in detail.
[0037] A method for positioning a SIP dialog is provided in the embodiment of the present
invention, Fig. 1 is a flowchart of a method for positioning a SIP dialog according
to an embodiment of the present invention, and as shown in Fig. 1, the method comprises
the following steps S102 to S104.
[0038] S102, a network element receives an in-dialog SIP message carrying index information,
wherein the index information is used for indicating a position of a dialog at a calling
party or a called party.
[0039] S104, the network element positions the dialog according to the index information.
[0040] In the related art, an implementation method for positioning the dialog corresponding
to the in-dialog SIP message is more complex and lower in positioning speed. In the
embodiment, the index information for indicating the position of the dialog at the
calling party or the called party is carried in the in-dialog SIP message, and the
dialog is positioned according to the index information, so that such an implementation
mode is simple and high in positioning speed, and the performance of the network element
is improved.
[0041] Two kinds of network element roles are defined in the SIP: a SIP proxy and an SIP
UA, and the dialog positioning of the two is respectively introduced below.
(1) the network element is a SIP proxy
[0042] Before S102, the method further comprises that: the SIP proxy adds a first index
information to an initial message received from the calling party, wherein the first
index information is used for indicating the position of the current dialog at the
calling party; and the SIP proxy transmits the initial message carrying the first
index information to the called party. Thus, the position of the current dialog at
the calling party can be acquired.
[0043] According to an embodiment of the present invention, after the SIP proxy transmits
the initial message carrying the first index information to the called party, the
method further comprises that: the SIP proxy receives a response message carrying
the first index information from the called party; the SIP proxy modifies the first
index information, wherein a modified first index information is used for indicating
the position of the current dialog at the called party; and the SIP proxy transmits
the response message carrying the modified first index information to the calling
party. Thus, the position of the current dialog at the called party can be acquired.
[0044] The first index information or the modified index information will be carried in
the subsequent in-dialog SIP message, and S102 comprises that: the SIP proxy receives
the in-dialog SIP message carrying the modified first index information from the calling
party, or receives the in-dialog SIP message carrying the first index information
from the called party.
[0045] S104 comprises that: the SIP proxy acquires the modified first index information
or the first index information from the in-dialog SIP message; and the SIP proxy positions
the dialog according to the modified first index information or the first index information.
(2) The network element is an SIP UA, and there are two conditions, wherein the SIP
UA serves as the calling party of the dialog under one condition, and serves as the
called party of the dialog under the other condition.
A. the SIP UA is the calling party of the dialog
[0046] Before S102, the method further comprises that: the SIP UA transmits an initial message
carrying second index information to the called party, wherein the second index information
is used for indicating the position of the current dialog at the calling party. Thus,
the position of the current dialog at the calling party (namely the SIP UA) can be
acquired.
[0047] The second index information will be carried in a subsequent in-dialog SIP message,
and S102 comprises that: the SIP UA receives the in-dialog SIP message carrying the
second index information from the called party.
[0048] According to an embodiment of the present invention, S104 comprises that: the SIP
UA acquires the second index information from the in-dialog SIP message; and the SIP
UA positions the current dialog according to the second index information.
B. the SIP UA is the called party of the dialog
[0049] Before S102, the method further comprises that: the SIP UA receives the initial message
from the calling party; and the SIP UA transmits a response message carrying third
index information to the calling party, wherein the third index information is used
for indicating the position of the current dialog at the called party. Thus, the position
of the current dialog at the called party (namely the SIP UA) can be acquired.
[0050] The third index information will be carried in a subsequent in-dialog SIP message,
and S102 comprises that: the SIP UA receives the in-dialog SIP message carrying the
third index information from the calling party.
[0051] According to an embodiment of the present invention, S104 comprises that: the SIP
UA acquires the third index information from the in-dialog SIP message; and the SIP
UA positions the current dialog according to the third index information.
[0052] According to an embodiment of the present invention, the index information is carried
by one of the following fields: Request-uri, contact, from, to, Route and Record-Route.
[0053] From the above, a header parameter in the SIP message is expanded in the embodiment
of the present invention, and the network element generates the parameter when structuring
an initial request or a response to the initial request. The parameter is returned
through an in-dialog request received by the network element, and the network element
directly positions the dialog through the expanded parameter in the returned in-dialog
request. For a subsequent request in the in-dialog, It is not required to position
the dialog by virtue of a combination of parameters such as a Call-ID, a From-Tag,
a To-Tag, etc in the embodiment of the present invention, and a dialog index can be
directly acquired from the SIP message, so that high speed and high performance are
achieved.
[0054] Two network element roles are defined in SIP: a proxy and a UA, and for different
network element roles, specific implementation schemes are different, and are respectively
described below:
For a proxy network element, it is specified in a basic protocol RFC 3261 of SIP that
when the proxy network element receives a creating dialog request, if a dialog created
according to the request is expected to be reserved and a subsequent request still
will pass through the proxy network element, the proxy network element must add a
Record-Route header field value to this copy (namely the message forwarded to the
next network element), and the added header field value should be before other existing
Record-Route header fields. In the subsequent request in the dialog created according
to the request, the Record-Route header field value added by the proxy network element
can be returned through a Route header. By virtue of the above-mentioned mechanism,
a newly added parameter is expanded in Record-Route, and an instance index created
for the dialog on the proxy network element is carried in the parameter, so that the
proxy network element can directly acquire the corresponding dialog instance index
from Route after receiving the subsequent request.
[0055] For a UA network element, two schemes can be considered. Scheme 1, it is specified
in the basic protocol RFC 3261 of SIP that a Local-Tag is generated by the UA network
element, and is returned as a To-Tag in a subsequent request, so that a generation
rule of the Local-Tag is changed, wherein a dialog index information is carried in
the Local-Tag, and the SIP UA, when receiving the in-dialog request message, acquires
the dialog index information from the To-Tag to position the dialog; and scheme 2,
according to the basic protocol RFC 3261 of SIP, local-contact-uri is generated by
the UA network element, and is returned as Request-uri in the subsequent request,
so that an expanded parameter is added in contact-uri, wherein the dialog index information
is carried in the expanded parameter, and the SIP UA, when receiving the in-dialog
request message, positions the dialog by virtue of the newly added parameter in Request-uri.
[0056] It is noted that the dialog index information is carried in the SIP message, and
a SIP field capable of carrying the index information includes Request-uri/contact/from/to/route/record-route.
[0057] Detailed description will be given below with reference to the preferred embodiments.
Preferred embodiment 1
[0058] The specific implementation of expanded parameter added by the proxy network element
through Record-Route/Route is described in the preferred embodiment.
[0059] A Backus-Naur Form (BNF) about a Record-Route/Route header in RFC 3261 is as follows:
Record-Route = "Record-Route" HCOLON rec-route *(COMMA rec-route)
rec-route = name-addr *(SEMI rr-param)
rr-param = generic-param
Route = "Route" HCOLON route-param *(COMMA route-param)
route-param = name-addr *(SEMI rr-param)
[0060] An rr-param parameter is expanded in the preferred embodiment. The definition of
the expanded parameter is related to the specific implementation, and an expansion
example under one implementation mode is given here only:
x-did-param = "x-did" EQUAL module "-" dialog-index
module = 1*DIGIT
;the number of a module where the dialog is
dialog-index = 1*DIGIT
;dialog index
[0061] It should be noted that, in order to improve the reliability, x-did-param expansion
can also be implemented in name-addr, for example:
Record-Route: <sip:proxy.com;lr>;x-did=1-12
Route: < sip:proxy.com;lr >;x-did=1-12
[0062] Description will be given blow with reference to Fig. 2, Fig. 2 is a schematic diagram
of a basic calling flow of a SIP proxy according to preferred embodiment 1 of the
present invention, and as shown in Fig. 2, the flow includes the following steps that:
S202-S204, the SIP proxy receives initial INVITE, creates an incoming dialog and an
outgoing dialog, forwards the INVITE to the next network element, and in order to
receive a subsequent request, the SIP Proxy adds itself as Record-Route in the forwarded
INVITE. In the preferred embodiment, an expanded parameter x-did is added to a header,
wherein the parameter represents a corresponding dialog index of a call on the proxy
network element, and in Fig. 2, x-did=1-12, which shows that the corresponding outgoing
dialog is on a module 1 and the index is 12.
[0063] S206-S208, the SIP proxy receives initial INVITE 200, wherein a route set information
is carried in this message, the SIP proxy modifies the Record-Route added itself in
the forwarded INVITE 200, and modifies the expanded parameter x-did into an incoming
dialog index, and in Fig. 2, x-did=1-11, which shows that the corresponding incoming
dialog is on the module 1 and the index is 11.
[0064] S210-S212, the SIP proxy receives ACK, where the route set information is carried
in this message, and the SIP proxy acquires a dialog index of a dialog where the message
is through the expanded parameter x-did in top-Route. In Fig. 2, x-did=1-11, which
shows that the corresponding incoming dialog is on the module 1 and the index is 11.
The SIP proxy forwards the ACK.
[0065] S214-S216, the SIP proxy receives UPDATE from a called side, wherein the route set
information is carried in the message. The SIP proxy acquires a dialog index of a
dialog where the message is through the expanded parameter x-did in top-Route. In
Fig. 2, x-did=1-11, which shows that the corresponding incoming dialog is on the module
1 and the index is 11. The SIP proxy forwards the UPDATE.
[0066] S218-S220, the SIP proxy forwards the UPDATE.
[0067] S222-S224, the SIP proxy receives BYE from a calling side, the route set information
is carried in the message. The SIP proxy acquires a dialog index of a dialog where
the message is through the expanded parameter x-did in top-Route. In Fig. 2, x-did=1-11,
which shows that the corresponding incoming dialog is on the module 1 and the index
is 11. The SIP proxy forwards the BYE (ending).
[0068] S226-S228, the SIP proxy forwards BYE 200 OK.
Preferred embodiment 2
[0069] The specific implementation of expanded parameter added by the UA network element
through contact-uri is described in the preferred embodiment.
[0070] An expanded parameter is added in contact-uri in the preferred embodiment. The definition
of the expanded parameter is related to the specific implementation, and an expansion
example under one implementation mode is given here only:
x-did-param = "x-did" EQUAL module "-" dialog-index
module = 1*DIGIT
;the number of a module where the dialog is
dialog-index = 1*DIGIT
;dialog index
[0072] Description will be given below with reference to Fig. 3 and Fig. 4.
[0073] Fig. 3 is a schematic diagram of implementation of a flow when an SIP UA is a calling
party in a contact-uri way according to preferred embodiment 2 of the present invention,
and as shown in Fig. 3, the flow includes the following steps that:
S302, the SIP UA, serving as the calling party, transmits an initial INVITE message
to a next-hop network element (namely the SIP NE shown in Fig. 3), wherein, in a Contact
header in the initial INVITE message, an expanded parameter x-did is added in contact-uri,
wherein the parameter represents a dialog index of a call on the UA network element,
and in Fig. 3, x-did=1-1, which shows that a dialog corresponding to the call is on
a module 1 and the index is 1.
S304-S306, subsequent INVITE 200 OK and ACK thereof are processed, which are uninvolved
in the preferred embodiment.
S308, the SIP UA receives an in-dialog request UPDATE from a called party, wherein
a request-uri content in the request is consistent with a contact-uri content in the
initial request INVITE. The SIP UA acquires the dialog index of a dialog where the
call is through the expanded parameter x-did in the request-uri. In Fig. 3, x-did=1-1,
which shows that the corresponding dialog is on the module 1 and the index is 1.
S310-S314, a subsequent message is processed, which is uninvolved in the preferred
embodiment.
[0074] Fig. 4 is a schematic diagram of implementation of a flow when an SIP UA is a called
party in a contact-uri way according to preferred embodiment 2 of the present invention,
and as shown in Fig. 4, the flow includes the following steps that:
S402, the SIP UA, serving as the called party, receives an initial INVITE message.
S404, the SIP UA returns 200 OK in response to the initial INVITE message, wherein,
in a Contact header of the response message, an expanded parameter x-did is added
in contact-uri. The parameter represents a dialog index of a call on the UA network
element, and in Fig. 4, x-did=1-1, which shows that a dialog corresponding to the
call is on a module 1 and the index is 1.
S406, the SIP UA receives an in-dialog request ACK from a calling party, wherein a
request-uri content in the request is consistent with a contact-uri content in the
200 OK of the initial INVITE message. The SIP UA acquires the dialog index of a dialog
where the call is through the expanded parameter in request-uri. In Fig. 4, x-did=1-1,
which shows that the corresponding dialog is on the module 1 and the index is 1.
S408, the SIP UA receives an in-dialog request UPDATE from the calling party, wherein
a request-uri content in the request is consistent with a contact-uri content in the
200 OK of the initial INVITE message. The SIP UA acquires the dialog index of the
dialog where the call is through the expanded parameter x-did in request-uri. In Fig.
4, x-did=1-1, which shows that the corresponding dialog is on the module 1 and the
index is 1.
S410-S414, a subsequent message is processed, which is uninvolved in the preferred
embodiment.
[0075] Preferred embodiment 3
[0076] The specific implementation of expanded parameter added by the UA network element
through the Local-Tag is described in the preferred embodiment.
[0077] A BNF about a From/To header in RFC 3261 is as follows:
From = ("From" / "f') HCOLON from-spec
from-spec = (name-addr / addr-spec)
*(SEMI from-param)
from-param = tag-param / generic-param
tag-param = "tag" EQUAL token
To = ("To" / "t") HCOLON (name-addr
/ addr-spec) *(SEMI to-param
to-param = tag-param / generic-param
token = 1 *(alphanum / "-" / "." / "!" / "%" / "*"
/ "_" " / "+" / "'" / "'" / / "∼")
[0078] A tag-param parameter generated by the network element is limited in the preferred
embodiment to enable the dialog index information is carried in the tag-param parameter,
and an expansion example under one implementation mode is given here only:
tag-param = "tag" EQUAL randstr "-" module "-" dialog-index
randstr = 1*(alphanum)
module = 1*DIGIT
;the number of a module where the dialog is
dialog-index = 1*DIGIT
;dialog index
[0081] Description will be given blow with reference to Fig. 5 and Fig. 6.
[0082] Fig. 5 is a schematic diagram of implementation of a flow when an SIP UA is a calling
party in a Local-Tag way according to preferred embodiment 3 of the present invention,
and as shown in Fig. 5, the flow includes the following steps that:
S502, the SIP UA, serving as the calling party, transmits an initial INVITE request
to a next-hop network element, wherein a From-Tag in the INVITE request is generated
according to the above-mentioned grammar, and the dialog index information is carried
in the From-Tag, and in Fig. 5, tag=abxcd-1-1, which shows that a dialog corresponding
to a call is on a module 1 and an index is 1.
S504-S506, subsequent INVITE 200 OK and ACK thereof are processed, which are uninvolved
in the preferred embodiment.
S508, the SIP UA receives an in-dialog request UPDATE from a called party, wherein
a To-Tag content in the request is consistent with the From-Tag in the initial INVITE
request. The SIP UA acquires a dialog index of the dialog where the call is from the
To-Tag of UPDATE. In Fig. 5, tag=abxcd-1-1, which shows that the corresponding dialog
is on the module 1 and the index is 1.
S510-S514, a subsequent message is processed, which is uninvolved in the preferred
embodiment.
[0083] Fig. 6 is a schematic diagram of implementation of a flow when an SIP UA is a called
party in a Local-Tag way according to preferred embodiment 3 of the present invention,
and as shown in Fig. 6, the flow includes the following steps that:
S602, the SIP UA, serving as the called party, receives an initial INVITE message.
S604, the SIP UA returns 200 OK in response to the initial INVITE message, wherein
a To-Tag of the response message is generated according to the above-mentioned grammar,
and dialog index information is carried by the To-Tag, and in Fig. 6, tag=abxcd-1-1,
which shows that a dialog corresponding to a call is on a module 1 and an index is
1.
S606, the SIP UA receives an in-dialog request ACK from a calling party, wherein a
request-uri content in the request is consistent with a To-Tag content in the 200
OK of the initial INVITE message. The SIP UA acquires a dialog index of a dialog where
the call is from the To-Tag. In Fig. 6, x-did=1-1, which shows that the corresponding
dialog is on the module 1 and the index is 1.
S608, the SIP UA receives an in-dialog request UPDATE from the calling party, wherein
a To-Tag content in the request is consistent with that in the 200 OK of the initial
INVITE message. The SIP UA acquires the dialog index of the dialog where the call
is from the To-Tag. In Fig. 6, x-did=1-1, which shows that the corresponding dialog
is on the module 1 and the index is 1.
S610-S614, a subsequent message is processed, which is uninvolved in the present invention.
[0084] It is noted that the steps shown in the flowcharts in the drawings can be executed
in a computer system, for example, a group of computers, capable of executing an instruction,
and moreover, although a logic sequence is shown in the flowcharts, the shown or described
steps can be executed according to a sequence different from the logic sequence under
a certain condition.
[0085] A SIP dialog positioning device is further provided in the embodiment of the present
invention, which is applied to a network element. Fig. 7 is a structural diagram of
a device for positioning a SIP dialog according to an embodiment of the present invention,
and as shown in Fig. 7, the device includes a receiving component 72 and a positioning
component 74.
[0086] Wherein, the receiving component 72 is configured to receive an in-dialog SIP message
carrying index information, wherein the index information is used for indicating a
position of a dialog at a calling party or a called party; and the positioning component
74, connected to the receiving component 72, is configured to position the dialog
according to the index information carried by the in-dialog SIP message received by
the receiving component 72.
[0087] A SIP proxy is further provided in the embodiment of the present invention. the SIP
proxy can be used for implementing the above-mentioned method for positioning a SIP
dialog. Fig. 8 is a structural diagram of a SIP proxy according to an embodiment of
the present invention, and as shown in Fig. 8, the SIP proxy includes a first receiving
component 82 and a positioning component 84.
[0088] Wherein, the first receiving component 82 is configured to receive an in-dialog SIP
message carrying index information, wherein the index information is used for indicating
a position of a dialog at a calling party or a called party; and the positioning component
84, connected to the first receiving component 82, is configured to position the dialog
according to the index information.
[0089] As shown in Fig. 9, the SIP proxy further includes: an adding component 86, which
is configured to add a first index information to an initial message received from
the calling party, wherein the first index information is used for indicating the
position of the current dialog at the calling party; and a first transmissing component
88, which is connected to the adding component 86 and configured to transmit the initial
message carrying the first index information to the called party.
[0090] According to an embodiment of the present invention, the SIP proxy further includes:
a second receiving component, which is configured to receive a response message carrying
the first index information from the called party; a modifying component, which is
connected to the second receiving component and configured to modify the first index
information, wherein the modified first index information is used for indicating the
position of the current dialog at the called party; and a second transmissing component,
which is connected to the modifying component and configured to transmit the response
message carrying the modified first index information modified by the modifying module
to the calling party.
[0091] According to an embodiment of the present invention, the first receiving component
82 includes: a receiving element, which is configured to receive the in-dialog SIP
message carrying the modified first index information from the calling party, or receive
the in-dialog SIP message carrying the first index information from the called party.
The positioning component 84 includes: an acquiring element, which is configured to
acquire the modified first index information or the first index information from the
in-dialog SIP message; and a positioning element, which is connected to the acquiring
element and configured to position the dialog according to the modified first index
information or the first index information acquired by the acquiring element.
[0092] According to an embodiment of the present invention, the index information is carried
by one of the following fields: Route and Record-Route.
[0093] AN SIP UA is further provided in the embodiment of the present invention. The SIP
can be used for implementing the above-mentioned method for positioning a SIP dialog.
Fig. 10 is a structural diagram of an SIP UA according to an embodiment of the present
invention, and as shown in Fig. 10, the SIP UA includes a first receiving component
1002 and a positioning component 1004.
[0094] Wherein, the first receiving component 1002 is configured to receive an in-dialog
SIP message carrying index information, wherein the index information is used for
indicating a position of a dialog at a calling party or a called party; and the positioning
component 1004, connected to the first receiving component 1002, is configured to
position the dialog according to the index information.
[0095] As shown in Fig. 11, the SIP UA further includes: a first transmissing component
1006, which is configured to, under the condition that the SIP UA is the calling party
of the dialog, transmit an initial message carrying second index information to the
called party, wherein the second index information is used for indicating the position
of the current dialog at the calling party. The first receiving component 1002 includes:
a first receiving element 10022, which is configured to receive the in-dialog SIP
message carrying the second index information from the called party. The positioning
component 1004 includes: a first acquiring element 10042, configured to acquire the
second index information from the in-dialog SIP message; and a first positioning element
10044, which is connected to the first acquiring element 10042 and configured to position
the current dialog according to the second index information acquired by the first
acquiring element 10042.
[0096] According to an embodiment of the present invention, the SIP UA further includes:
a second receiving component, which is configured to, under the condition that the
SIP UA is the called party of the dialog, receive the initial message from the calling
party; and a second transmissing component, configured to transmit a response message
carrying third index information to the calling party, wherein the third index information
is used for indicating the position of the current dialog at the called party.
[0097] According to an embodiment of the present invention, the first receiving component
1002 includes: a second receiving element, which is configured to receive the in-dialog
SIP message carrying the third index information from the calling party. The positioning
component 1004 includes: a second acquiring element, which is configured to acquire
the third index information from the in-dialog SIP message; and a second positioning
element, which is configured to position the current dialog according to the third
index information.
[0098] According to an embodiment of the present invention, the index information is carried
by one of the following fields: Request-uri, contact, from and to.
[0099] From the above, according to the embodiments of the present invention, a method and
a device for positioning a SIP dialog are provided. The index information for indicating
the position of the dialog at the calling party or the called party is carried in
the in-dialog SIP message, and the dialog is positioned according to the index information,
so that such an implementation mode is simple and high in positioning speed, and the
performance of the network element is improved.
[0100] Obviously, a technician of the field should know that each module or step of the
present invention can be implemented by a universal computing device, and the modules
or steps can be concentrated on a single computing device or distributed on a network
formed by a plurality of computing devices, and can optionally be implemented by programmable
codes executable for the computing devices, so that the modules or steps can be stored
in a storage device for execution with the computing devices, or can form each integrated
circuit module, or multiple modules or steps therein can form a single integrated
circuit module for implementation. As a consequence, the present invention is not
limited to any specific hardware and software combination.
[0101] The above is only the preferred embodiment of the present invention and not intended
to limit the present invention, and for the technician of the field, the present invention
can have various modifications and variations. Any modifications, equivalent replacements,
improvements and the like within the spirit and principle of the present invention
shall fall within the scope of protection of the present invention.
1. A method for positioning Session Initiation Protocol (SIP) dialog,
characterized by comprising:
receiving, by a network element, an in-dialog SIP message carrying index information,
wherein the index information is used for indicating a position of a dialog at a calling
party or a called party; and
positioning, by the network element, the dialog according to the index information.
2. The method according to claim 1,
characterized in that, based on that the network element is an SIP proxy, before receiving, by the network
element, the in-dialog SIP message carrying the index information, further comprising:
adding, by the SIP proxy, a first index information to an initial message received
from the calling party, wherein the first index information is used for indicating
the position of the current dialog at the calling party; and
transmitting, by the SIP proxy, the initial message carrying the first index information
to the called party.
3. The method according to claim 2,
characterized in that, after transmitting, by the SIP proxy, the initial message carrying the first index
information to the called party, further comprising:
receiving, by the SIP proxy, a response message carrying the first index information
from the called party;
modifying, by the SIP proxy, the first index information, characterized in that, a modified first index information is used for indicating the position of the current
dialog at the called party; and
transmitting, by the SIP proxy, the response message carrying the modified first index
information to the calling party.
4. The method according to claim 3,
characterized in that, receiving, by the network element, the in-dialog SIP message carrying the index
information comprises:
receiving, by the SIP proxy, the in-dialog SIP message carrying the modified first
index information from the calling party, or receiving, by the SIP proxy, the in-dialog
SIP message carrying the first index information from the called party.
5. The method according to claim 4,
characterized in that, positioning, by the network element, the dialog according to the index information
comprises:
acquiring, by the SIP proxy, the modified first index information or the first index
information from the in-dialog SIP message; and
positioning, by the SIP proxy, the dialog according to the modified first index information
or the first index information.
6. The method according to claim 1,
characterized in that, based on that the network element is an SIP User Agent (UA) and is the calling party
of the dialog, before receiving, by the network element, the in-dialog SIP message
carrying the index information, further comprising:
transmitting, by the SIP UA, an initial message carrying second index information
to the called party, wherein the second index information is used for indicating the
position of the current dialog at the calling party.
7. The method according to claim 6,
characterized in that, receiving, by the network element, the in-dialog SIP message carrying the index
information comprises:
receiving, by the SIP UA, the in-dialog SIP message carrying the second index information
from the called party.
8. The method according to claim 7,
characterized in that, positioning, by the network element, the dialog according to the index information
comprises:
acquiring, by the SIP UA, the second index information from the in-dialog SIP message;
and
positioning, by the SIP UA, the current dialog according to the second index information.
9. The method according to claim 1,
characterized in that, based on that the network element is an SIP UA and is the called party of the dialog,
before receiving, by the network element, the in-dialog SIP message carrying the index
information, further comprising:
receiving, by the SIP UA, the initial message from the calling party; and
transmitting, by the SIP UA, a response message carrying third index information to
the calling party, wherein the third index information is used for indicating the
position of the current dialog at the called party.
10. The method according to claim 9,
characterized in that, receiving, by the network element, the in-dialog SIP message carrying the index
information comprises:
receiving, by the SIP UA, the in-dialog SIP message carrying the third index information
from the calling party.
11. The method according to claim 10,
characterized in that, positioning, by the network element, the dialog according to the index information
comprises:
acquiring, by the SIP UA, the third index information from the in-dialog SIP message;
and
positioning, by the SIP UA, the current dialog according to the third index information.
12. The method according to any one of claims 1 to 11, characterized in that, the index information is carried by one of the following fields: Request-uri, contact,
from, to, Route and Record-Route.
13. A device for positioning Session Initiation Protocol (SIP) dialog, applied to a network
element,
characterized by comprising:
a receiving component, configured to receive an in-dialog SIP message carrying index
information, wherein the index information is used for indicating a position of a
dialog at a calling party or a called party; and
a positioning component, configured to position the dialog according to the index
information.
14. A Session Initiation Protocol (SIP) proxy,
characterized by comprising:
a first receiving component, configured to receive an in-dialog SIP message carrying
index information, wherein the index information is used for indicating a position
of a dialog at a calling party or a called party; and
a positioning component, configured to position the dialog according to the index
information.
15. The SIP proxy according to claim 14, further comprising:
an adding component, configured to add a first index information to an initial message
received from the calling party, wherein the first index information is used for indicating
the position of the current dialog at the calling party; and
a first transmissing component, configured to transmit the initial message carrying
the first index information to the called party.
16. The SIP proxy according to claim 15, further comprising:
a second receiving component, configured to receive a response message carrying the
first index information from the called party;
a modifying component, configured to modify the first index information, wherein a
modified first index information is used for indicating the position of the current
dialog at the called party; and
a second transmissing component, configured to transmit the response message carrying
the modified first index information to the calling party.
17. The SIP proxy according to claim 16,
characterized in that, the first receiving component comprises:
a receiving element, configured to receive the in-dialog SIP message carrying the
modified first index information from the calling party, or receive the in-dialog
SIP message carrying the first index information from the called party.
18. The SIP proxy according to claim 17,
characterized in that, the positioning component comprises:
an acquiring element, configured to acquire the modified first index information or
the first index information from the in-dialog SIP message; and
a positioning element, configured to position the dialog according to the modified
first index information or the first index information.
19. The SIP proxy according to any one of claims 14-18, characterized in that, the index information is carried by one of the following fields: Route and Record-Route.
20. A Session Initiation Protocol (SIP) User Agent (UA),
characterized by comprising:
a first receiving component, configured to receive an in-dialog SIP message carrying
index information, characterized in that, the index information is used for indicating a position of a dialog at a calling
party or a called party; and
a positioning component, configured to position the dialog according to the index
information.
21. The SIP UA according to claim 20, further comprising:
a first transmissing component, configured to, based on that the SIP UA is the calling
party of the dialog, transmit an initial message carrying second index information
to the called party, wherein the second index information is used for indicating the
position of the current dialog at the calling party.
22. The SIP UA according to claim 21,
characterized in that, the first receiving component comprises:
a first receiving element, configured to receive the in-dialog SIP message carrying
the second index information from the called party.
23. The SIP UA according to claim 22,
characterized in that, the positioning component comprises:
a first acquiring element, configured to acquire the second index information from
the in-dialog SIP message; and
a first positioning element, configured to position the current dialog according to
the second index information.
24. The SIP UA according to claim 20, further comprising:
a second receiving component, configured to, based on that the SIP UA is the called
party of the dialog, receive the initial message from the calling party; and
a second transmissing component, configured to transmit a response message carrying
third index information to the calling party, wherein the third index information
is used for indicating the position of the current dialog at the called party.
25. The SIP UA according to claim 24,
characterized in that, the first receiving component comprises:
a second receiving element, configured to receive the in-dialog SIP message carrying
the third index information from the calling party.
26. The SIP UA according to claim 25,
characterized in that, the positioning component comprises:
a second acquiring element, configured to acquire the third index information from
the in-dialog SIP message; and
a second positioning element, configured to position the current dialog according
to the third index information.
27. The SIP UA according to any one of claims 20 to 26, wherein the index information
is carried by one of the following fields: Request-uri, contact, from and to.