<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Albert,<br>
<br>
The $config->alias_format is a regex and the alias user name that
you insert must match this regex. If you can see, in the default regex
you are allowed to use aliases that start with 9 and are 5 digits long.<br>
This can be changed if you want. Just simply edit the regex (it is true
... the line is not present in
/var/opensips-cp/config/tools/users/user_management/local.inc.php,
because it's being read from the alias_management folder).<br>
<br>
Anyway, if you want to make opensips-cp not ask for alias username
just do the following:<br>
<br>
- edit the file :
/var/www/opensips-cp/web/tools/users/user_management/lib/user_management.test.inc.php<br>
- for example, if you want to stop alias username from being required
just comment the following lines :<br>
<br>
<pre><span class="hl kwa">if</span> <span class="hl sym">(</span><span
class="hl kwc">$form_valid</span><span class="hl sym">)</span>
<span class="hl line"> </span> <span class="hl kwa">if</span> <span
class="hl sym">(</span><span class="hl kwc">$alias</span><span
class="hl sym">==</span><span class="hl str">""</span><span
class="hl sym">) {</span>
<span class="hl line"></span> <span class="hl kwc">$form_valid</span><span
class="hl sym">=</span>false<span class="hl sym">;</span>
<span class="hl line"></span> <span class="hl kwc">$form_error</span><span
class="hl sym">=</span><span class="hl str">"- invalid <b>Alias</b> field -"</span><span
class="hl sym">;</span>
<span class="hl line"></span> <span class="hl sym">}
You can do the same for the other fields if you want - just find them (the names are very intuitive) and comment the lines above.
</span></pre>
Hope this helps you!<br>
<br>
Regards,<br>
Alex<br>
<br>
On 5/23/2010 11:48, Albert Paijmans wrote:
<blockquote
cite="mid:AANLkTimKpaqeHelMQatW0eWrQ0yAl2UKunVzas_ralUI@mail.gmail.com"
type="cite">Hi,
<div><br>
</div>
<div>I was wondering about the Alias Username in opensips-cp.</div>
<div>When I try to add a new user in the control panel under Users /
User Management I must give an Alias Username, but this can only be 5
digits long.</div>
<div>If I do not enter an alias it gives me an error Invalid Alias
Field. And the maximum length is only 5 digits.</div>
<div>But when I examine under
/var/opensips-cp/config/tools/users/alias_management/local.inc.php if
find the following line</div>
<div>$config->alias_format = "/^9[0-9][0-9][0-9][0-9]/"; This
line is not present in
/var/opensips-cp/config/tools/users/user_management/local.inc.php</div>
<div><br>
</div>
<div>So my question is how do I make opensips-cp not ask for an Alias
Username? Or choose any lenth / combination of letters or numbers?</div>
<div>I suppose one could also choose to only use Alias Management
> username-domain / alias-username alias-domain</div>
<div>Is it possible to fix this in User Management Alias Username?</div>
<div><br>
</div>
<div><br>
</div>
<div>I am using OpenSIPS 1.62 and OpenSIPS Control Panel 4</div>
<div><br>
<br>
Thanks</div>
<div><br>
Albert</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alex Ionescu
<a class="moz-txt-link-abbreviated" href="http://www.voice-system.ro">www.voice-system.ro</a> </pre>
</body>
</html>