summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-03-11 00:49:00 +0000
committerMark Michelson <mmichelson@digium.com>2009-03-11 00:49:00 +0000
commitc1e2636be761ab577037e8a87c2f4410b4438941 (patch)
treec7249c4aacc88c4c9da056bc96ce8a5c6b491f70 /channels/chan_sip.c
parent85a5f68fe13bbabbc14417c9abf686c452d1fff4 (diff)
Add missing comment that quotes RFC 3891
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1ff4d35fc..77bd396ae 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12404,7 +12404,20 @@ static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *t
sip_pvt_ptr->outgoing_call == TRUE ? "OUTGOING": "INCOMING", sip_pvt_ptr->callid);
return NULL;
}
-
+ /* RFC 3891
+ * > 3. User Agent Server Behavior: Receiving a Replaces Header
+ * > The Replaces header contains information used to match an existing
+ * > SIP dialog (call-id, to-tag, and from-tag). Upon receiving an INVITE
+ * > with a Replaces header, the User Agent (UA) attempts to match this
+ * > information with a confirmed or early dialog. The User Agent Server
+ * > (UAS) matches the to-tag and from-tag parameters as if they were tags
+ * > present in an incoming request. In other words, the to-tag parameter
+ * > is compared to the local tag, and the from-tag parameter is compared
+ * > to the remote tag.
+ *
+ * Thus, the totag is always compared to the local tag, regardless if
+ * this our call is an incoming or outgoing call.
+ */
frommismatch = !!strcmp(fromtag, sip_pvt_ptr->theirtag);
tomismatch = !!strcmp(totag, sip_pvt_ptr->tag);