[OpenSIPS-Users] user alias length in opensips-cp 4

Alex Ionescu alex at opensips.org
Tue May 25 09:57:18 CEST 2010


Hi Albert,

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.
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).

Anyway, if you want to make opensips-cp not ask for alias username  just 
do the following:

- edit the file : 
/var/www/opensips-cp/web/tools/users/user_management/lib/user_management.test.inc.php
- for example, if you want to stop alias username from being required 
just comment the following lines :

if  ($form_valid)
      if  ($alias=="") {
          $form_valid=false;
          $form_error="- invalid<b>Alias</b>  field -";
     }

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.

Hope this helps you!

Regards,
Alex

On 5/23/2010 11:48, Albert Paijmans wrote:
> Hi,
>
> I was wondering about the Alias Username in opensips-cp.
> 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.
> If I do not enter an alias it gives me an error Invalid Alias Field. 
> And the maximum length is only 5 digits.
> But when I examine under 
> /var/opensips-cp/config/tools/users/alias_management/local.inc.php  if 
> find the following line
> $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
>
> 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?
> I suppose one could also choose to only use Alias Management > 
> username-domain / alias-username alias-domain
> Is it possible to fix this in User Management Alias Username?
>
>
> I am using OpenSIPS 1.62 and OpenSIPS Control Panel 4
>
>
> Thanks
>
> Albert
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>    


-- 
Alex Ionescu
www.voice-system.ro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100525/a2f71527/attachment.htm 


More information about the Users mailing list