Call Control API Phone Device Not Saving

Discussion in 'CRM / Helpdesk / App Integration' started by lixid, Dec 14, 2016.

Thread Status:
Not open for further replies.
  1. lixid

    Joined:
    Dec 14, 2016
    Messages:
    5
    Likes Received:
    0
    When I am editing the phone device for an extension or trying to create a phone device, there is no save option for that device. When I save the extension it saves the extension information but not the phone device.
    I am using the v14 version of the dll, fyi.

    Please advise on how I can do this, Thanks for your help.
     
  2. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    Hi @lixid,
    Can you provide a snippet of your code editing device to see what's wrong?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. lixid

    Joined:
    Dec 14, 2016
    Messages:
    5
    Likes Received:
    0
    In this example the ext will save but the new mac address does not save, and there is no Save() for the device itself.

    Also there seems to be an issue with saving in that the new name does not actually show up in the web gui under that extension until I click ok/apply under that extension. Then it propagates into the phone.
    Is there a different action for changes that are saved to actually be shown in the web gui?
    Thanks for your time on this.

    if (!String.IsNullOrEmpty(value))
    {
    PhoneSystem.CfgServerPassword = value;

    PhoneSystem ps = PhoneSystem.Root; //Access PhoneSystem.Root to initialize ObjectModel

    string output = "";
    Extension ext = ps.GetTenants()[0].GetExtensions().SingleOrDefault(i => i.Number == "2207");

    if (ext != null)
    {
    ext.FirstName = "Bologna999";

    PhoneDevice[] devices = ext.PhoneDevices;
    devices[0].MAC = "00156580A181";
    ext.Save();
    }
    }
     
  4. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    Hi,
    I tested this code on my v15 and it worked out of the box.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. lixid

    Joined:
    Dec 14, 2016
    Messages:
    5
    Likes Received:
    0
    Like I said in my first post.. the extension.FirstName saves, but the mac address does not save in v14... Can you please confirm that it saves on v14? and if so why my save does not work?

     
  6. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    Hi, in v15 the MAC got saved without a problem, I will try that on v14 tomorrow and let you know.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. lixid

    Joined:
    Dec 14, 2016
    Messages:
    5
    Likes Received:
    0
    Ok, thank you very much for your time on this

     
Thread Status:
Not open for further replies.