[SR-Users] [sr-dev] How to uniquely identify SIP WS / WSS endpoint
klaus.mailinglists at pernau.at
Tue Sep 2 16:22:04 CEST 2014
Not sure what you trying to do, but the Via header is for transactions.
It may be different for every transaction. Thus, if you need transaction
matching (requests to responses) then you are fine and should use purely
the branch id.
If you want to match messages from one transaction to messages from
another transaction (e.g. dialog matching or matching multiple dialogs
from the same user) then the Via is probably the wrong choice. Please
also note, that the user can put any data into the Via header and this
may confuse your application if you blindly trusts all the data in the
For matching dialogs you should use call-id and tags (or use the dialog
For matching requests from a certain user agent: I think there is no
reliable way - GRUU may work if available.
But as you are talking about encryption it is more "peer" related then
user-agent related. I say "peer" as the peer may be another proxy with
several user agents behind. To identify peers you should use the data
from the transport: IP, port, protocol. That should be unique for a
peer. For received messages it should be simple to extract them, for
sending, the data should be available too (e.g. in DURI or some
references to a TCP connection).
On 22.08.2014 02:26, Muhammad Shahzad wrote:
> Sorry for putting this question on both dev and user mailing lists, as
> it is a rather theoretical question and i hope some SIP guru on either
> mail list will answer.
> For non-WS endpoints which use TCP or UDP for SIP transport, each
> upstream request has top most VIA header pointing to the previous hop
> which forwarded the request to current hop while each downstream request
> has top most VIA header pointing to next hop to which it will be
> forwarded from current hop.
> But for WS endpoints, the top most VIA has dummy static value, so there
> is no way to identify who sent this request or to whom the reply is
> going to.
> Please note that i am not specifically interested in network address of
> remote endpoint (though VIA header is suppose to provide it), i only
> need to match requests and responses from / to a specific device using
> SIP v2.0 standard.
> Any help is highly appreciated.
> Thank you.
> sr-dev mailing list
> sr-dev at lists.sip-router.org
More information about the sr-users