MT#5173 Very basic support for polycom prov

Bootstrap Params: 447=2,445=[% server.uri %],264=2
Bootstrap Method: POST
Bootstrap URI:    http://[% client.ip %]/form-submit
agranig/rest
Andreas Granig 12 years ago
parent 6524548201
commit 6d3fa76e7f

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PHONE_CONFIG>
<ALL
dialplan.digitmap=""
dialplan.digitmap.timeOut=""
feature.presence.enabled="1"
pres.idleTimeout.offHours.enabled="0"
pres.idleTimeout.officeHours.enabled="0"
call.directedCallPickupMethod="native"
call.directedCallPickupString="dpickup"
call.parkedCallRetrieveMethod="native"
call.parkedCallRetrieveString="ppickup"
attendant.behaviors.display.remoteCallerID.normal="1"
attendant.behaviors.display.spontaneousCallAppearances.normal="0"
voIpProt.SIP.useCompleteUriForRetrieve="1"
voIpProt.SIP.strictReplacesHeader="1"
[% FOR range IN phone.lineranges -%]
[% FOR line IN range.lines -%]
[% key = line.keynum + 1 -%]
[% IF range.name == "Phone Keys" -%]
[% IF line.type == "private" -%]
reg.[% key %].address="sip:[% line.username %]@[% line.domain %]"
reg.[% key %].auth.password="[% line.password %]"
reg.[% key %].auth.userId="[% line.username %]"
reg.[% key %].displayName="[% line.displayname %]"
reg.[% key %].label="[% line.displayname %]"
reg.[% key %].type="private"
voIpProt.server.[% key %].address="[% line.domain %]"
[% ELSIF line.type == "shared" -%]
reg.[% key %].address="sip:[% line.username %]@[% line.domain %]"
reg.[% key %].auth.password="[% line.password %]"
reg.[% key %].auth.userId="[% line.username %]"
reg.[% key %].displayName="[% line.displayname %]"
reg.[% key %].label="[% line.displayname %]"
reg.[% key %].type="shared"
voIpProt.server.[% key %].address="[% line.domain %]"
[% ELSIF line.type == "blf" -%]
attendant.resourceList.[% key %].address="sip:[% line.username %]@[% line.domain %]"
attendant.resourceList.[% key %].label="[% line.displayname %]"
attendant.resourceList.[% key %].type="normal"
[% END -%]
[% END -%]
[% END -%]
[% END -%]
/>
</PHONE_CONFIG>

@ -877,8 +877,27 @@ sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() {
$c->response->status(404);
return;
}
if($id =~ /^[a-fA-F0-9]{12}\.cfg$/
&& $c->req->user_agent =~ /PolycomVVX/
) {
$id =~ s/\.cfg$//;
$c->response->content_type('text/xml');
$c->response->body(
'<?xml version="1.0" standalone="yes"?>'.
'<APPLICATION '.
# ' APP_FILE_PATH="sip.ld" '.
' CONFIG_FILES="'.$id.'-phone.cfg" '.
# ' MISC_FILES="huji-polycom-501.bmp" '.
' LOG_FILE_DIRECTORY="" '.
'/>'
);
return;
}
$id =~ s/^([^\=]+)\=0$/$1/;
$id = lc $id;
$id =~ s/\-phone\.cfg$//; # polycoms send a -phone.cfg suffix
my $dev = $c->model('DB')->resultset('autoprov_field_devices')->find({
identifier => $id

Loading…
Cancel
Save