Call Control API Help....

Status
Not open for further replies.

Ian Groves

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;
 
It would seem that PhoneDevice is lacking the .Save function........
 
I am having a similar issue with editing a phone device and not being able to save it also.
It would be great if when you edit the phone device and save that it saves that phones config and propagates those changes on save.

Can anyone at 3cx help with this? Is there a different way we could be doing this?
Thanks
 
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,889
Members
165,470
Latest member
Robert Lee