Call Control API Help....

Discussion in 'CRM / Helpdesk / App Integration' started by Ian Groves, Dec 8, 2016.

Thread Status:
Not open for further replies.
  1. Ian Groves

    Joined:
    Dec 8, 2016
    Messages:
    2
    Likes Received:
    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;
     
  2. Ian Groves

    Joined:
    Dec 8, 2016
    Messages:
    2
    Likes Received:
    0
    It would seem that PhoneDevice is lacking the .Save function........
     
  3. lixid

    Joined:
    Dec 14, 2016
    Messages:
    5
    Likes Received:
    0
    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
     
Thread Status:
Not open for further replies.