Forum Discussion
Microsoft Teams SIP Device Management
Satyendra Sharma Hi!
I know that you ask this question a while ago but I have a way to do it... sort of...
After doing the Microsoft configuration, I activate the REST API and send custom config with a powershell script directly to the phone.
Here a example:
$ip = "10.0.1.254"
$secret = "12345"
$user = "Polycom"
$pass = ConvertTo-SecureString -String $secret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($user,$pass)
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3, [Net.SecurityProtocolType]::Tls, [Net.SecurityProtocolType]::Tls11, [Net.SecurityProtocolType]::Tls12
$data = @{
"device.set" = "1";
"lcl.ml.lang.clock.7.format" ="DD/MM/YYYY";
"lcl.ml.lang.clock.7.24HourClock" = "1";
"tcpIpApp.sntp.gmtOffset" = "-18000";
"tcpIpApp.sntp.gmtOffsetcityID" = "16"
} | convertto-json
$data = "{ `"data`": $data }"
Invoke-RestMethod -Uri "https://$ip/api/v1/mgmt/config/set" -Method POST -Credential $cred -Body $data -ContentType "application/json" | fl
First, the API user is Polycom, not "admin" but it use the admin password (yeah, logic!).
The TLS part is for trusting the SSL cert (self-sign).
After that, you make your config in JSON (I choose to use a powershell array and convert it to JSON) and send it to the phone.
You can find the REST API reference for 6.1.0 here: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiAgbzmwJz3AhURHc0KHTAQCgEQFnoECAkQAQ&url=https%3A%2F%2Fsupport.polycom.com%2Fcontent%2Fdam%2Fpolycom-support%2Fproducts%2Fvoice%2Fbusiness-media-phones%2Fother-documents%2Fen%2Fucsoftware-restapi-6-1-0.pdf&usg=AOvVaw1NrpWBHNb8iSD5aM36ifM4
Hope that help and if you had find another way, please share with us!