Fix for added users without user_group

Small fix for PJSIP

git-svn-id: svn://192.168.202.10@4025 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2026-09-10 05:22:35 +00:00
parent 12a518040a
commit 6861b0d850
2 changed files with 10 additions and 5 deletions
+4 -2
View File
@@ -188,9 +188,10 @@
# 260826-1814 - Added FastAGIServer code # 260826-1814 - Added FastAGIServer code
# 260902-1718 - Fix for PJSIP monitoring # 260902-1718 - Fix for PJSIP monitoring
# 260903-1914 - Added -ra-delay=X flag # 260903-1914 - Added -ra-delay=X flag
# 260910-0116 - Small fix for PJSIP
# #
$build = '260903-1914'; $build = '260910-0116';
$DB=0; # Debug flag $DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file $teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -4408,10 +4409,10 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$Ppjsipw .= "endpoint/callerid=\"$fullname[$i]\" <$outbound_cid[$i]>\n"; $Ppjsipw .= "endpoint/callerid=\"$fullname[$i]\" <$outbound_cid[$i]>\n";
} }
$Ppjsipw .= "endpoint/mailboxes=$voicemail[$i]\n"; $Ppjsipw .= "endpoint/mailboxes=$voicemail[$i]\n";
$Ppjsipw .= "endpoint/accountcode=$extension[$i]\n";
if (($codecs_with_template[$i] > 0) || (!($template_contents[$i] =~ /allow=/i))) if (($codecs_with_template[$i] > 0) || (!($template_contents[$i] =~ /allow=/i)))
{$Ppjsipw .= "$Pcodec";} {$Ppjsipw .= "$Pcodec";}
$Ppjsipw .= "$template_contents[$i]\n"; $Ppjsipw .= "$template_contents[$i]\n";
$conf_entry_written++; $conf_entry_written++;
} }
$sthA->finish(); $sthA->finish();
@@ -4446,6 +4447,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$Ppjsipw .= "endpoint/callerid=\"$fullname[$i]\" <$outbound_cid[$i]>\n"; $Ppjsipw .= "endpoint/callerid=\"$fullname[$i]\" <$outbound_cid[$i]>\n";
} }
$Ppjsipw .= "endpoint/mailboxes=$voicemail[$i]\n"; $Ppjsipw .= "endpoint/mailboxes=$voicemail[$i]\n";
$Ppjsipw .= "endpoint/accountcode=$extension[$i]\n";
$Ppjsipw .= "$Pcodec"; $Ppjsipw .= "$Pcodec";
$Ppjsipw .= "endpoint/dtmf_mode = rfc4733\n"; $Ppjsipw .= "endpoint/dtmf_mode = rfc4733\n";
$Ppjsipw .= "endpoint/trust_id_inbound = no\n"; $Ppjsipw .= "endpoint/trust_id_inbound = no\n";
+6 -3
View File
@@ -7777,12 +7777,13 @@ if ($SSscript_remove_js > 0)
# 260822-0855 - Added many input variable declarations, added agent_ingroup_availability API function # 260822-0855 - Added many input variable declarations, added agent_ingroup_availability API function
# 260902-1656 - Fix for PJSIP # 260902-1656 - Fix for PJSIP
# 260907-1810 - Added copy_phone API function # 260907-1810 - Added copy_phone API function
# 260910-0111 - Fix for added users without user_group
# #
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
$admin_version = '2.14-964a'; $admin_version = '2.14-965a';
$build = '260907-1810'; $build = '260910-0111';
$STARTtime = date("U"); $STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s"); $SQLdate = date("Y-m-d H:i:s");
@@ -13492,7 +13493,7 @@ if ($ADD=="2")
{ {
$user = 'AUTOGENERA'; $user = 'AUTOGENERA';
} }
if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or ( (mb_strlen($user,'utf-8') > 20) and (!preg_match('/AUTOGENERA/',$user)) ) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) ) if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or (preg_match('/---ALL---/',$user_group)) or ( (mb_strlen($user,'utf-8') > 20) and (!preg_match('/AUTOGENERA/',$user)) ) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) )
{ {
echo "<br>"._QXZ("USER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "<br>"._QXZ("USER NOT ADDED - Please go back and look at the data you entered")."\n";
echo "<br>"._QXZ("user id must be between 2 and 20 characters long")."\n"; echo "<br>"._QXZ("user id must be between 2 and 20 characters long")."\n";
@@ -13504,6 +13505,7 @@ if ($ADD=="2")
else else
{echo "<br>"._QXZ("full name and password must be at least 2 characters long")."\n";} {echo "<br>"._QXZ("full name and password must be at least 2 characters long")."\n";}
echo "<br>"._QXZ("you must select a user group")."\n"; echo "<br>"._QXZ("you must select a user group")."\n";
exit;
} }
else else
{ {
@@ -13823,6 +13825,7 @@ if ($ADD=="2A")
else else
{echo "<br>"._QXZ("full name and password must be at least 2 characters long")."\n";} {echo "<br>"._QXZ("full name and password must be at least 2 characters long")."\n";}
echo "<!-- |$user|$pass|$full_name| -->\n"; echo "<!-- |$user|$pass|$full_name| -->\n";
exit;
} }
else else
{ {