summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-07-27 04:04:45 +0000
committerMark Spencer <markster@digium.com>2004-07-27 04:04:45 +0000
commita395d75a91a01528d8d0e32fb780683e85aa4132 (patch)
tree38095a323a29fe4d6366ffb873d6fa0ccae49abe /channels
parent42837cde4c58ac582e54d99f37e9932c94303f02 (diff)
Make request URI in CANCEL match that of the original INVITE exactly (bug #2134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 987538f53..a93d6c00a 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3105,8 +3105,10 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, char *msg, int se
else /* Some implementations (e.g. Uniden UIP200) can't handle rport being in the message!! */
snprintf(p->via, sizeof(p->via), "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport, p->branch);
}
-
- if (!ast_strlen_zero(p->uri)) {
+ if (!strcasecmp(msg, "CANCEL")) {
+ /* MUST use original URI */
+ c = p->initreq.rlPart2;
+ } else if (!ast_strlen_zero(p->uri)) {
c = p->uri;
} else {
if (p->outgoing)