From f760e98df5b2bc313faf040591467c25197901f1 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Sun, 2 May 2004 10:19:51 +0000 Subject: [PATCH] - better recognition of redirected incoming requests (linke INVITES from sipgate.de - SIP URI points to the real wanted target but To: header only points to the initially wanted target before the redirection) --- ChangeLog | 4 ++++ src/proxy.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index a0400e4..2ad5979 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 0.5.6 ===== + 02-May-2004: - better recognition of redirected incoming requests + (linke INVITES from sipgate.de - SIP URI points to + the real wanted target but To: header only points to + the initially wanted target before the redirection) 11-Apr-2004: - on termination, stop all active RTP streams 24-Apr-2004: - simplified SIP RX & TX routines diff --git a/src/proxy.c b/src/proxy.c index 3c90769..951643a 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -192,6 +192,26 @@ int proxy_request (osip_message_t *request, struct sockaddr_in *from) { */ if (type == 0) for (i=0; ireq_uri, urlmap[i].masq_url)==STS_SUCCESS) || + (!MSG_IS_REGISTER(request) && + (compare_url(request->req_uri, urlmap[i].reg_url)==STS_SUCCESS))) { + type=REQTYP_INCOMING; + break; + } /* incoming request ('to' == 'masq') || (('to' == 'reg') && !REGISTER)*/ if ((compare_url(request->to->url, urlmap[i].masq_url)==STS_SUCCESS) || (!MSG_IS_REGISTER(request) &&