|
|
@ -1045,15 +1045,13 @@ sub dev_field_ajax :Chained('base') :PathPart('device/ajax') :Args(0) :Does(ACL)
|
|
|
|
sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() {
|
|
|
|
sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() {
|
|
|
|
my ($self, $c, $id) = @_;
|
|
|
|
my ($self, $c, $id) = @_;
|
|
|
|
|
|
|
|
|
|
|
|
=pod
|
|
|
|
|
|
|
|
# this is going to be used if we want to do the cert check on the server,
|
|
|
|
# this is going to be used if we want to do the cert check on the server,
|
|
|
|
# the format is like this:
|
|
|
|
# the format is like this:
|
|
|
|
# /C=US/ST=708105B37234/L=CBT153908BX/O=Cisco Systems, Inc./OU=cisco.com/CN=SPA-525G2, MAC: 708105B37234, Serial: CBT153908BX/emailAddress=linksys-certadmin@cisco.com
|
|
|
|
# /C=US/ST=708105B37234/L=CBT153908BX/O=Cisco Systems, Inc./OU=cisco.com/CN=SPA-525G2, MAC: 708105B37234, Serial: CBT153908BX/emailAddress=linksys-certadmin@cisco.com
|
|
|
|
# however, we should do it on nginx, but we need a proper CA cert
|
|
|
|
# however, we should do it on nginx, but we need a proper CA cert
|
|
|
|
# from cisco for checking the client cert?
|
|
|
|
# from cisco for checking the client cert?
|
|
|
|
my $ssl_dn = $c->request->env->{SSL_CLIENT_M_DN} // "";
|
|
|
|
$c->log->debug("SSL_CLIENT_M_DN: " . ($c->request->env->{SSL_CLIENT_M_DN} // ""));
|
|
|
|
say ">>>>>>>>>>>>> ssl_dn=$ssl_dn";
|
|
|
|
$c->log->debug("SSL_CLIENT_CERT: " . ($c->request->env->{SSL_CLIENT_CERT} // ""));
|
|
|
|
=cut
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unless($id) {
|
|
|
|
unless($id) {
|
|
|
|
$c->response->content_type('text/plain');
|
|
|
|
$c->response->content_type('text/plain');
|
|
|
@ -1153,7 +1151,12 @@ sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() {
|
|
|
|
$display_name = $sub->username;
|
|
|
|
$display_name = $sub->username;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
# TODO: only push password for private/shared line?
|
|
|
|
# TODO: only push password for private/shared line?
|
|
|
|
|
|
|
|
my $aliases = [ $sub->voip_dbaliases->search({ is_primary => 0 })->get_column("username")->all ];
|
|
|
|
|
|
|
|
my $primary = $sub->voip_dbaliases->search({ is_primary => 1 })->get_column("username")->first;
|
|
|
|
|
|
|
|
|
|
|
|
push @{ $range->{lines} }, {
|
|
|
|
push @{ $range->{lines} }, {
|
|
|
|
|
|
|
|
alias_numbers => $aliases,
|
|
|
|
|
|
|
|
primary_number => $primary,
|
|
|
|
extension => $sub->pbx_extension,
|
|
|
|
extension => $sub->pbx_extension,
|
|
|
|
username => $sub->username,
|
|
|
|
username => $sub->username,
|
|
|
|
domain => $sub->domain->domain,
|
|
|
|
domain => $sub->domain->domain,
|
|
|
|