<html><body><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">I have a uuid in the usr_preferences table set to attribute = sim_calls with value = 15 calls allowed but am getting the concurrency limit error when 2 calls are up and trying to establish the 3rd call. Can anyone help figure out why?</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 00px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">Config Snips:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "avp_table", "usr_preferences")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "use_domain", 0)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "uuid_column", "uuid")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "username_column", "username")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "domain_column", "domain")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "attribute_column", "attribute")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "value_column", "value")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("avpops", "type_column", "type")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">loadmodule "dialog.so"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("dialog", "dlg_flag", 4)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("dialog", "db_mode", 1)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times"># TODO: rename profile "caller" to something more deliberate</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">modparam("dialog", "profiles_with_value", "caller;carrierin;carrierout")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;# fetch group the user belongs to</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; avp_db_query("select grp from grp where username='$avp(s:username)'", "$avp(s:group)");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(avp_check("$avp(s:group)","re/.*/g")) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_INFO", "----- user $avp(s:username) belongs to $avp(s:group) group\n");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # find out how many calls are allowed, match username to uuid column</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(avp_db_load("$avp(s:group)/uuid","$avp(s:sim_calls)")) {</p>
<p style="margin: 0.0px 0.0px 0.0px 00px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_INFO", "----- group $avp(s:group) can have max $avp(s:sim_calls) calls\n");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # check active calls</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get_profile_size("caller","$avp(s:group)","$avp(s:cnt)");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_INFO", "----- currently the group $avp(s:group) has $avp(s:cnt) active outgoing calls\n");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 140px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # reject if there is more than $sim_calls active calls from this user</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($avp(s:cnt) &gt;= $avp(s:sim_calls)) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_send_reply("486","Concurrency Limit Exceeded");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # store dialog on the profile</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_dlg_profile("caller","$avp(s:group)");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_INFO", "----- group $avp(s:group) doesn't have sim_calls limit\n");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_INFO", "----- user $avp(s:username) doesn't belong to any groups\n");</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 00px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">root@sip01:~# opensipsctl fifo profile_get_values caller</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">value:: 80 count=2</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 00px 0.0px 0.0px; font: 12.0px Times">root@sip01:~# opensipsctl fifo profile_get_values carrierin</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">value:: 192.168.1.234 count=2</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">profile_list_dlgs:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">opensipsctl fifo profile_list_dlgs caller</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">dialog::&nbsp; hash=57:1237628390</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; state:: 4</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; user_flags:: 0</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; timestart:: 1299009653</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; timeout:: 1786844</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; callid:: <a href="mailto:32d75fda0adefcc6454938161fa8f488@69.25.128.234"><span style="text-decoration: underline">32d75fda0adefcc6454938161fa8f488@192.168.1.234</span></a></span></p>
<p style="margin: 0.0px 00px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; from_uri:: <a href="mailto:sip%3A%2B16465222041@69.25.128.234"><span style="text-decoration: underline">sip:+16465222041@192.168.1.234</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; to_uri:: <a href="mailto:sip%3A%2B19194397540@72.15.219.141"><span style="text-decoration: underline">sip:+18642227540@10.1.0.141</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_tag:: as303e8090</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; caller_contact:: <a href="mailto:sip%3A%2B16465222041@69.25.128.234"><span style="text-decoration: underline">sip:+16465222041@192.168.1.234</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_cseq:: 102</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_route_set::&nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_bind_addr:: udp:<a href="http://72.15.219.141:5060/"><span style="text-decoration: underline ; color: #1438e7">10.1.0.141:5060</span></a></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_tag:: as6b251cdf</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; callee_contact:: <a href="mailto:sip%3A9194397540@72.15.219.137"><span style="text-decoration: underline">sip:8642227540@10.1.0.137</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_cseq:: 102</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_route_set::&nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_bind_addr:: udp:<a href="http://72.15.219.141:5060/"><span style="text-decoration: underline ; color: #1438e7">10.1.0.141:5060</span></a></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">dialog::&nbsp; hash=1234:1922532974</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; state:: 4</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; user_flags:: 0</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; timestart:: 1299009708</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; timeout:: 1786898</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; callid:: <a href="mailto:61e4b8a31839e0c311ed482c6453317a@69.25.128.234"><span style="text-decoration: underline">61e4b8a31839e0c311ed482c6453317a@192.168.1.234</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; from_uri:: <a href="mailto:sip%3A%2B12127858470@69.25.128.234"><span style="text-decoration: underline">sip:+12127858470@192.168.1.234</span></a></span></p>
<p style="margin: 0.0px 0.0px 00px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; to_uri:: <a href="mailto:sip%3A%2B19194397540@7215.219.141"><span style="text-decoration: underline">sip:+18642227540@10.1.0.141</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_tag:: as7c87f91d</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; caller_contact:: <a href="mailto:sip%3A%2B12127858470@69.25.128.234"><span style="text-decoration: underline">sip:+12127858470@192.168.1.234</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_cseq:: 102</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_route_set::&nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_bind_addr:: udp:<a href="http://72.15.219.141:5060/"><span style="text-decoration: underline ; color: #1438e7">10.1.0.141:5060</span></a></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_tag:: as7bd2b3e8</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #1438e7"><span style="color: #000000">&nbsp;&nbsp;&nbsp; callee_contact:: <a href="mailto:sip%3A9194397540@72.15.219.137"><span style="text-decoration: underline">sip:8642227540@10.1.0.137</span></a></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; caller_cseq:: 102</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_route_set::&nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times">&nbsp;&nbsp;&nbsp; callee_bind_addr:: udp:<a href="http://72.15.219.141:5060/"><span style="text-decoration: underline ; color: #1438e7">10.1.0.141:5060</span></a></p></div></body></html>