Update line display text error message

Version 1
    This document was generated from CDN thread

    Created by: Michael Dunsdon on 22-11-2011 08:39:47 AM
    Hi
     
    I'm trying to update the text that's displayed on the recieving phone to say who is calling.
    Setting it when creating the phone is fine but if I try and update it I get the following error
     
    "The type CiscoAXL.RPhoneLine was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically."
    Since this is being done through the .net axl dll I
     
    The getUpdateReqForPhone function does a axlApiService.getPhone(getPhoneReq) request and copies the contents into an   UpdatePhoneReq so I was planning to just update the field I wanted and send it back.
     
    I'm asseming the problem is that the  getPhoneReq.returnedTags.lines.Items array is defined in the dll as an object array even though I' actually fill it with RPhoneLine
    ( getPhoneReq.returnedTags.lines.Items = New RPhoneLine() {})

     
     
            Dim updateReq As UpdatePhoneReq = getUpdateReqForPhone(svcCM, phoneName)
            For Each line As RPhoneLine In updateReq.lines.Items
                If line.index = 1 Then line.display = displaytext
            Next
            svcCM.updatePhone(updateReq)
     
    Hope that all made sense
    Any suggestions how to update the line.display text ?
     
    Thanks

    Subject: RE: Update line display text error message
    Replied by: Michael Dunsdon on 24-11-2011 05:43:40 AM
    Hi

    As I understand it UpdateLine changes the text that's displayed on the phone you're calling from not the phone being called.

    i.e.
    When I make a call to the manager from extension 104 the display on my phone will say "Manager" but the phone I'm calling will just say "104" not the name of the person that's calling me

    It's the name of the person calling me I want to update and that's part of the phone.lines.items as far as I can tell

    Subject: RE: Update line display text error message
    Replied by: Bin L on 23-11-2011 07:14:35 PM
    Hi Michael
    The getPhoneReq.returnTags.lines.Items only give you uuid of all diretorynumbers. You can use the uuid to updateLine.

    Subject: RE: Update line display text error message
    Replied by: Bin L on 27-11-2011 06:08:40 PM
    You need to update the phone's line 1 label.
    foreach (object line in phoneProfile.lines.Items)
    {
                    XLine xline = line as XLine;
                    xline.label = "Your manager's name";
                    xline.asciiLabel = "Your manager's name";
                   ....
    }

    Subject: RE: Update line display text error message
    Replied by: Dan-Anders Hook on 01-12-2011 07:48:26 PM
    Hi,

    Not my programming language, but I don't think casting the returned RPhone to UpdatePhoneReq works. I would create an UpdatePhoneReq instead, and just include the necessary tags in order to update the line. You are absolutely right that you have to do this via the phone, since it is the line appearance that holds the display name. The line itself only holds the alerting name.

    Kind regards,

    //Dan