- Joined
- Dec 8, 2016
- Messages
- 2
- Reaction score
- 0
Hi,
I'm able to do most things with the call control API just fine however....
I want to be able to create Phone Devices for extensions, i.e associated a Yealink T46 with a specific MAC to an extension.
I would have thought this would do it but it does not create the device or even throw an error.....
If I provide a malformed MAC address I get an exception so it is close but it just doesn't save the device....
foreach (Extension ext in ps.GetTenants()[0].GetExtensions())
{
if (ext.AuthID == extslistBox.SelectedItem.ToString())
{
logtextbox.Text += "IMPORTING" + System.Environment.NewLine;
var pd = ext.CreatePhoneDevice() as PhoneDevice;
pd.Interface = interfacetextBox.Text;
pd.MAC = mactextBox.Text;
pd.ProvisioningFilename2 = ProvisioningFilename2textBox.Text;
pd.Settings = settingstextbox.Text;
pd.TemplateFilename = templatefilenametextBox.Text;
ext.Save();
logtextbox.Text += "ADDED" + System.Environment.NewLine;
I'm able to do most things with the call control API just fine however....
I want to be able to create Phone Devices for extensions, i.e associated a Yealink T46 with a specific MAC to an extension.
I would have thought this would do it but it does not create the device or even throw an error.....
If I provide a malformed MAC address I get an exception so it is close but it just doesn't save the device....
foreach (Extension ext in ps.GetTenants()[0].GetExtensions())
{
if (ext.AuthID == extslistBox.SelectedItem.ToString())
{
logtextbox.Text += "IMPORTING" + System.Environment.NewLine;
var pd = ext.CreatePhoneDevice() as PhoneDevice;
pd.Interface = interfacetextBox.Text;
pd.MAC = mactextBox.Text;
pd.ProvisioningFilename2 = ProvisioningFilename2textBox.Text;
pd.Settings = settingstextbox.Text;
pd.TemplateFilename = templatefilenametextBox.Text;
ext.Save();
logtextbox.Text += "ADDED" + System.Environment.NewLine;