Add Phone

Version 1
    This document was generated from CDN thread

    Created by: Mayank Sharma on 08-11-2010 07:27:49 PM
    I have been trying to add a phone using AXL and C#. I have it partially working, in the sense that I can add a phone but am not able to figure out how to populate other default values.
     
    This is what I am doing to add a phone:
     

                AddPhoneReq addPhone1 = new AddPhoneReq();
                XIPPhone phone = new XIPPhone();
                phone.name = "SEP000111000111";
                phone.description = "TEST1"; 
                phone.@class = "Phone";
                phone.protocol = "SCCP";
                phone.protocolSide = "User";
                phone.Item = "Cisco 7961"; //Product
                phone.Item1 = "Cisco 7961";//Model
                phone.Item3 = "My-DP"; //Device Pool
     
                //phone.Item5 = "Standard Common Phone Profile";
                //phone.Item6 =  "Hub_None";
     
                addPhone1.newPhone = phone;            
                Globals.myService.addPhone(addPhone1);

     
    How would I set other properties like:
    1. Device Pool
    2. Calling Search Space
    3. SUBSCRIBE Calling Search Space
    4. Common Device Configuration
     
    Also, when I try to set Standard Common Phone Profile and Location, I get the following errors:
    Item not valid: The specified Standard Common Phone Profile was not found
    Item not valid: The specified Hub_None was not found
     
    Thanks,
    Max

    Subject: RE: Add Phone
    Replied by: MARCUS STOLZENBERG on 10-11-2010 10:48:46 AM
    Hi Max,
     
    I added a phone with PHP:
     
    I used the following parameters:
     
    "callingSearchSpaceName"=>"whatever"
    "devicePoolName"=>"Default"
    "commonPhoneConfigName"=>"Standard Common Phone Profile"
     
     
    Best Regards,
    Marcus
     
     
     

    Subject: RE: Add Phone
    Replied by: Mayank Sharma on 10-11-2010 01:00:39 PM
    Hi Marcus-
     
    Thanks for your reply. I saw that example in one the threads in this forum but unfortunately I am using C# and I don't get anything like that. I see Item properties like Item1, Item2 etc. but I have no clue what is what.
     
    For the time being, what I am doing is adding a phone with as much information as I can, then updating that phone with additional properties. It's just a workaround for now.
     
    Thanks,
    Max 

    Subject: RE: Add Phone
    Replied by: Chandan Agrawal on 10-11-2010 01:43:40 PM
    Hi Marcus-
     
    Thanks for your reply. I saw that example in one the threads in this forum but unfortunately I am using C# and I don't get anything like that. I see Item properties like Item1, Item2 etc. but I have no clue what is what.
     
    For the time being, what I am doing is adding a phone with as much information as I can, then updating that phone with additional properties. It's just a workaround for now.
     
    Thanks,
    Max 


    Hi Max,
     
    I face the same problem. Whereas looking for the documentation is one thing, I have my own wayaround for that. I read the same object already created in the CM and the 'Watch' the contents of Item1, Item2 etc in the IDE I am using and the reverse analyse what should be going in these fields when I am creating a new object.
    Not elegant, but does the job.
     
    Chandan