<h3>Description</h3>

<p>After upgrading from 5.0 to 5.1.0, the use_domain parameter of the group module doesn't seem to work properly.  The configuration file was not changed for the upgrade.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Verified proper configuration</p>
<pre><code>#!define WITH_GROUP

...

#!ifdef WITH_MULTIDOMAIN
#!define MULTIDOMAIN 1
#!else
#!define MULTIDOMAIN 0
#!endif

...

#!ifdef WITH_GROUP
# ----- group params -----
modparam("group", "db_url", DBURL)
modparam("group", "use_domain", MULTIDOMAIN)
#!endif

</code></pre>
<h4>Log Messages</h4>

<p>The actual phone number has been replaced by <code>+1NXXNXXXXXX</code> below.</p>
<pre><code>kamailio[5663]: DEBUG: <core> [core/select.c:412]: run_select(): Calling SELECT 0x7f072eecf700
kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 12 chars, out: 12 chars
kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 3 chars, out: 3 chars
kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 0 chars, out: 0 chars
kamailio[5663]: DEBUG: db_postgres [km_dbase.c:248]: db_postgres_submit_query(): sending query ok: 0x7f072efefca0 (2) - [select grp from grp where username='+1NXXNXXXXXX' AND grp='did' AND domain='']
kamailio[5663]: DEBUG: <core> [db_res.c:119]: db_new_result(): allocate 56 bytes for result set at 0x7f072efce170
kamailio[5663]: DEBUG: db_postgres [km_dbase.c:530]: db_postgres_store_result(): 0x7f072efefca0 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(0x14f5d00)
kamailio[5663]: DEBUG: db_postgres [km_res.c:95]: db_postgres_get_columns(): 1 columns returned from the query
kamailio[5663]: DEBUG: <core> [db_res.c:156]: db_allocate_columns(): allocate 8 bytes for result names at 0x7f072f065478
kamailio[5663]: DEBUG: <core> [db_res.c:167]: db_allocate_columns(): allocate 4 bytes for result types at 0x7f072f065118
kamailio[5663]: DEBUG: db_postgres [km_res.c:112]: db_postgres_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f072efef9e8
kamailio[5663]: DEBUG: db_postgres [km_res.c:119]: db_postgres_get_columns(): RES_NAMES(0x7f072efef9e8)[0]=[grp]
kamailio[5663]: DEBUG: db_postgres [km_res.c:154]: db_postgres_get_columns(): use DB1_STRING result type
kamailio[5663]: DEBUG: db_postgres [km_res.c:200]: db_postgres_convert_rows(): no rows returned from the query
kamailio[5663]: DEBUG: group [group.c:182]: is_user_in_helper(): user is not in group 'did'
</code></pre>
<h4>SIP Traffic</h4>

<p>Since the group isn't found with the domain, the call is rejected (but the SIP traffic isn't an issue here).</p>
<h3>Possible Solutions</h3>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.1.0 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 18:49:15 Dec 11 2017 with gcc 7.2.1
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>Linux example.com 4.14.3-300.fc27.x86_64 #1 SMP Mon Dec 4 17:18:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1363">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZSnRxourofb_G-GWkxrLhqWv2IsLks5s_yERgaJpZM4Q_23X">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZUeqk1TjMzRlQNCHNy7G1qT-Zp5bks5s_yERgaJpZM4Q_23X.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1363"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"5.1.0 group use_domain not working (after upgrade from 5.0) (#1363)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1363"}}}</script>