diff --git a/debian/patches/series b/debian/patches/series index f0b3c08ee..41a643dc9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -40,5 +40,7 @@ sipwise/rtpengine-compatibility.patch sipwise/db_postgres-timeout sipwise/usrloc_dbro.patch sipwise/nathelper_socket_filter.patch +sipwise/pua_reginfo_fix.patch # backport from master upstream/0001-nathelper-add-append_sdp_oldmediaip-parameter.patch + diff --git a/debian/patches/sipwise/pua_reginfo_fix.patch b/debian/patches/sipwise/pua_reginfo_fix.patch new file mode 100644 index 000000000..920b9a80c --- /dev/null +++ b/debian/patches/sipwise/pua_reginfo_fix.patch @@ -0,0 +1,39 @@ +--- a/modules/pua_reginfo/usrloc_cb.c ++++ b/modules/pua_reginfo/usrloc_cb.c +@@ -219,9 +219,9 @@ + str content_type; + udomain_t * domain; + urecord_t * record; ++ ucontact_t* _c = NULL; + int res; + str uri = {NULL, 0}; +- str user = {NULL, 0}; + + char* at = NULL; + char id_buf[512]; +@@ -246,9 +246,6 @@ + LM_ERR("Unknown Type %i\n", type); + return; + } +- /* make a local copy of the AOR */ +- user.len = c->aor->len; +- user.s = c->aor->s; + + /* Get the UDomain for this account */ + res = ul.get_udomain(c->domain->s, &domain); +@@ -257,10 +254,11 @@ + return; + } + +- /* Get the URecord for this AOR */ +- res = ul.get_urecord(domain, &user, &record); +- if (res > 0) { +- LM_ERR("' %.*s (%.*s)' Not found in usrloc\n", c->aor->len, c->aor->s, c->domain->len, c->domain->s); ++ /* Get the URecord for this ruid */ ++ res = ul.get_urecord_by_ruid(domain, ul.get_aorhash(c->aor), &(c->ruid), ++ &record, &_c); ++ if (res < 0) { ++ LM_ERR("'%.*s (%.*s)' Not found in usrloc\n", c->aor->len, c->aor->s, c->domain->len, c->domain->s); + return; + } +