# HG changeset patch # User Michael Schloh von Bennewitz # Date 1316613974 -7200 # Node ID b972dc20871f9e398e3c16e192b4ecb80f1934c4 # Parent 8ddd39bcf2ecc4db48d6210789ac13a6d6defcdf Warning, downgrading software version due to TLS or TCP blocking defects in newest vendor version. diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.cfg --- a/opensips/opensips.cfg Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.cfg Wed Sep 21 16:06:14 2011 +0200 @@ -115,6 +115,7 @@ modparam("usrloc|uri|auth_db", "db_url", "text://@l_prefix@/var/opensips/db") # ----- rr params ----- +modparam("rr", "enable_full_lr", 1) # add value to ;lr param for broken UAs modparam("rr", "append_fromtag", 1) # important when using detect_direction # ----- usrloc params ----- @@ -129,6 +130,7 @@ modparam("acc", "db_url", "dbtext://@l_prefix@/var/opensips/db") #modparam("acc", "db_url", "flatstore:@l_prefix@/var/opensips/acc") modparam("acc", "early_media", 1) +modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 1) modparam("acc", "log_level", 2) diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.patch --- a/opensips/opensips.patch Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.patch Wed Sep 21 16:06:14 2011 +0200 @@ -2,7 +2,7 @@ diff -Nau main.c.orig main.c --- main.c.orig 2009-12-10 14:11:03.590141302 +0100 +++ main.c 2009-12-10 14:11:07.246237908 +0100 -@@ -1038,6 +1038,10 @@ +@@ -952,6 +952,10 @@ ret=-1; my_argc=argc; my_argv=argv; @@ -13,7 +13,7 @@ /*init pkg mallocs (before parsing cfg or cmd line !)*/ if (init_pkg_mallocs()==-1) goto error00; -@@ -1370,6 +1374,11 @@ +@@ -1284,6 +1288,11 @@ /* init_daemon? */ if (!dont_fork){ @@ -29,7 +29,7 @@ diff -Nau Makefile.defs.orig Makefile.defs --- Makefile.defs.orig 2007-12-13 14:39:06.000000000 +0100 +++ Makefile.defs 2008-01-14 16:48:02.811615000 +0100 -@@ -220,7 +220,7 @@ +@@ -216,7 +216,7 @@ else doc-dir = doc/$(MAIN_NAME)/ man-dir = man/ @@ -38,7 +38,7 @@ LOCALBASE ?= $(SYSBASE)/local endif endif -@@ -1432,6 +1432,10 @@ +@@ -1427,6 +1427,10 @@ LIBS+= -lsctp endif @@ -74,7 +74,7 @@ use IO::Socket; use Socket; #use Net::IP; -@@ -378,6 +377,12 @@ +@@ -396,6 +395,12 @@ } } @@ -119,17 +119,17 @@ diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c --- modules/nathelper/nathelper.c.orig 2010-12-20 14:33:50.000000000 +0100 +++ modules/nathelper/nathelper.c 2011-01-26 17:48:40.685941382 +0100 -@@ -288,6 +288,9 @@ - return 0; - } +@@ -273,6 +273,9 @@ + #define MI_RECHECK_TICKS "recheck_ticks" + #define MI_RECHECK_T_LEN (sizeof(MI_RECHECK_TICKS)-1) +/* MSvB macros */ +#define OPENSIPS_NOOP ((void)0) + - -@@ -805,6 +808,7 @@ + /* Supported version of the RTP proxy command protocol */ +@@ -1921,6 +1925,7 @@ #define FIX_MEDIP 0x02 #define ADD_ANORTPPROXY 0x04 #define FIX_ORGIP 0x08 @@ -137,7 +137,20 @@ #define ADIRECTION "a=direction:active" #define ADIRECTION_LEN (sizeof(ADIRECTION) - 1) -@@ -821,7 +825,9 @@ +@@ -2050,6 +2055,12 @@ + return -1; + } + ++ if (level & FIX_RTCPIP) { ++ /* Iterate all a=rtcp: and replace ips in them. */ ++ if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) ++ return -1; ++ } ++ + return 1; + } + +@@ -2215,7 +2226,9 @@ { char *buf; int offset; @@ -147,14 +160,14 @@ str omip, nip, oip; /* check that updating mediaip is really necessary */ -@@ -852,7 +858,19 @@ +@@ -2246,7 +2259,19 @@ memcpy(buf, CRLF, CRLF_LEN); memcpy(buf + CRLF_LEN, omip.s, omip.len); memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len); - if (insert_new_lump_after(anchor, buf, + -+ /* if the oldmediaip string is already */ -+ /* in the body then don't add it again */ ++ /* if the oldmediaip string is already */ ++ /* in the body then don't add it again */ + binlump = 0; + for (templump = msg->body_lumps; templump; templump = templump->next) + if (templump->op == LUMP_ADD && strstr(templump->u.value, buf)) @@ -168,19 +181,6 @@ omip.len + oldip->len + CRLF_LEN, 0) == NULL) { LM_ERR("insert_new_lump_after failed\n"); pkg_free(buf); -@@ -1038,6 +1056,12 @@ - p= p->next; - } - -+ if (level & FIX_RTCPIP) { -+ /* Iterate all a=rtcp: and replace ips in them. */ -+ if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) -+ return -1; -+ } -+ - return 1; - } - Index: parser/sdp/sdp_helpr_funcs.c diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c --- parser/sdp/sdp_helpr_funcs.c.orig 2010-12-08 15:14:06.000000000 +0100 diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.patch.reg --- a/opensips/opensips.patch.reg Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.patch.reg Wed Sep 21 16:06:14 2011 +0200 @@ -2,7 +2,7 @@ diff -Nau modules/registrar/save.c.orig modules/registrar/save.c --- modules/registrar/save.c.orig 2008-08-03 15:53:57.000000000 +0200 +++ modules/registrar/save.c 2009-03-24 21:44:46.182865192 +0100 -@@ -76,7 +76,7 @@ +@@ -74,7 +74,7 @@ struct save_ctx { unsigned int flags; str aor; @@ -11,7 +11,7 @@ }; -@@ -388,7 +388,7 @@ +@@ -386,7 +386,7 @@ if (e == 0) continue; @@ -20,7 +20,7 @@ if (_sctx->flags®_SAVE_FORCE_REG_FLAG) { /* we are overflowing the number of maximum contacts, so remove the first (oldest) one to prevent this */ -@@ -494,6 +494,7 @@ +@@ -492,6 +492,7 @@ contact_t* _c, struct save_ctx *_sctx) { ucontact_info_t *ci; @@ -28,7 +28,7 @@ ucontact_t* c; int e; unsigned int cflags; -@@ -554,7 +555,7 @@ +@@ -552,7 +553,7 @@ continue; /* we need to add a new contact -> too many ?? */ @@ -37,7 +37,7 @@ if (_sctx->flags®_SAVE_FORCE_REG_FLAG) { /* we are overflowing the number of maximum contacts, so remove the first (oldest) one to prevent this */ -@@ -581,6 +582,23 @@ +@@ -579,6 +580,23 @@ goto error; } diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.patch.uac --- a/opensips/opensips.patch.uac Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.patch.uac Wed Sep 21 16:06:14 2011 +0200 @@ -2,7 +2,7 @@ diff -Nau modules/uac/auth.c.orig modules/uac/auth.c --- modules/uac/auth.c.orig 2008-08-03 15:53:40.000000000 +0200 +++ modules/uac/auth.c 2009-03-24 21:48:53.478867420 +0100 -@@ -143,14 +143,172 @@ +@@ -375,14 +375,172 @@ HASHHEX response; str *new_hdr; @@ -70,7 +70,7 @@ + crd->passwd = pv_val.rs; + + if (nret) { /* if not found, look into predefined credentials */ -+ tst = uac_auth_api._lookup_realm(&crd->realm); ++ tst = lookup_realm(&crd->realm); + + if (tst==0) { /* found? */ + LM_DBG("no credential for realm \"%.*s\"\n", \ @@ -121,25 +121,25 @@ + + /* set the nonce from existing UAC message */ + tmp_hdr = msg->proxy_auth; -+ auth->nonce.len = 0; -+ auth->nonce.s = 0; ++ auth.nonce.len = 0; ++ auth.nonce.s = 0; + while (tmp_hdr) { + if(pv_get_spec_value(msg, &auth_realm_spec, &pv_val)==0 \ + && pv_val.rs.len>0) /* ensure realm is the desired one */ + if (strncmp(crd->realm.s, pv_val.rs.s, crd->realm.len)==0) { -+ auth->nonce.s = strchr(strstr(tmp_hdr->body.s, "nonce="), '"') + 1; -+ auth->nonce.len = strchr(auth->nonce.s, '"') - auth->nonce.s; ++ auth.nonce.s = strchr(strstr(tmp_hdr->body.s, "nonce="), '"') + 1; ++ auth.nonce.len = strchr(auth.nonce.s, '"') - auth.nonce.s; + } + tmp_hdr = tmp_hdr->sibling; + } -+ if (auth->nonce.s == 0) { ++ if (auth.nonce.s == 0) { + LM_DBG("failed to retrieve nonce from UAC message\n"); + pkg_free(crd); + goto error; + } + + /* do authentication */ -+ uac_auth_api._do_uac_auth(msg, newuri, crd, auth, &auth_nc_cnonce, response); ++ do_uac_auth(msg, newuri, crd, &auth, response); + if (response==0) { + LM_ERR("failed to calculate challenge response\n"); + pkg_free(crd); @@ -147,7 +147,7 @@ + } + + /* build the authorization header */ -+ new_hdr = uac_auth_api._build_authorization_hdr(407, newuri, crd, auth, &auth_nc_cnonce, response); ++ new_hdr = build_authorization_hdr(407, newuri, crd, &auth, response); + if (new_hdr==0) { + LM_ERR("failed to build authorization hdr\n"); + pkg_free(crd); @@ -184,7 +184,7 @@ diff -Nau modules/uac/uac.c.orig modules/uac/uac.c --- modules/uac/uac.c.orig 2008-08-03 15:53:40.000000000 +0200 +++ modules/uac/uac.c 2009-03-24 21:49:48.922890737 +0100 -@@ -117,7 +117,7 @@ +@@ -106,7 +106,7 @@ REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE }, {"uac_auth", (cmd_function)w_uac_auth, 0, 0, 0, diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.spec --- a/opensips/opensips.spec Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.spec Wed Sep 21 16:06:14 2011 +0200 @@ -22,6 +22,8 @@ ## # package options +%define V_major 1.6.4 +%define V_minor 2 %define V_rtpproxy 1.2.1 # package information @@ -34,8 +36,8 @@ Class: PLUS Group: VoIP License: GPL -Version: 1.7.0 -Release: 20110912 +Version: %{V_major}.%{V_minor} +Release: 20110200 # package options %option with_cons yes @@ -57,7 +59,7 @@ %option with_dbgmem no # list of sources -Source0: http://www.opensips.org/pub/opensips/%{version}/src/opensips-%{version}_src.tar.gz +Source0: http://www.opensips.org/pub/opensips/%{V_major}/src/opensips-%{V_major}-%{V_minor}-tls_src.tar.gz Source1: http://www.b2bua.org/chrome/site/rtpproxy-%{V_rtpproxy}.tar.gz Source2: rc.opensips Source3: fsl.opensips @@ -65,8 +67,9 @@ Patch0: opensips.patch Patch1: opensips.patch.dict Patch2: opensips.patch.uac -Patch3: opensips.patch.reg -Patch4: opensips.patch.rtpproxy +Patch3: opensips.patch.lcr +Patch4: opensips.patch.reg +Patch5: opensips.patch.rtpproxy # build information Prefix: %{l_prefix} @@ -166,11 +169,11 @@ %track prog opensips = { - version = %{version} + version = %{V_major}-%{V_minor} url = http://www.opensips.org/pub/opensips/ regex = (\d+\.\d+\.\d+)/ url = http://www.opensips.org/pub/opensips/__NEWVER__/src/ - regex = opensips-(__VER__)_src\.tar\.gz + regex = opensips-(__VER__)-tls_src\.tar\.gz } prog opensips:rtpproxy = { version = %{V_rtpproxy} @@ -179,14 +182,15 @@ } %prep - %setup -q -n opensips-%{version}-tls - %setup -q -n opensips-%{version}-tls -T -D -a 1 + %setup -q -n opensips-%{V_major}-%{V_minor}-tls + %setup -q -n opensips-%{V_major}-%{V_minor}-tls -T -D -a 1 %patch -p0 %patch -p0 -P 1 %patch -p0 -P 2 %patch -p0 -P 3 + %patch -p0 -P 4 ( cd rtpproxy-%{V_rtpproxy} - %patch -p0 -P 4 + %patch -p0 -P 5 ) || exit $? %{l_shtool} subst \ -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \ @@ -302,6 +306,9 @@ -e 's;\(script_flags(int\));\1,null);' \ scripts/dbtext/opensips/dialog %{l_shtool} subst \ + -e 's;\(gw_name(string).*\) *$;\1 user(string,null) realm(string,null) passwd(string,null);' \ + scripts/dbtext/opensips/gw + %{l_shtool} subst \ -e 's;body(string);body(blob);' \ -e 's;sender(string);sender(string,null);' \ scripts/dbtext/opensips/presentity