cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
677
Views
0
Helpful
1
Replies

not found the "lines" attribute in the "UpdatePhoneReq" object, as specified in Cisco AXL Documentation.

dguarneri
Level 1
Level 1

Hello,

I'm writing to you because we've a problem with CISCO AXL.

We use Cisco Call Manager 10.0 and we've implemented an interface in .NET to get and send data regarding Line, Phones and End Users.

We've no problems to get data and add or update Lines and End Users.

Using the generated .cs file, we've not found the "lines" attribute in the "UpdatePhoneReq" object, as specified in Cisco AXL Documentation.

So we tried to use the 8.5 schema file of Call Manager to generate the .cs file.

In this way we're able to call correctly the Update Phone Request, with the associated lines.

But now we've a problem with the Add Phone Request.

We tried to send CM one device, sending device name, product, description, devicepool, phonebuttontemplate and owneruser id but CM returns generic error.

We tried to get a device from CM, change only the last character of the device name but the result was the same.

We tried to get a device from CM and send it back to CM but we rightly received a duplicate row error.

We finally tried to use the method found in the example of the axlsqltoolkit with no luck.

The generic error is:

System.Web.Services.Protocols.SoapException

   in System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie

ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal

l)

   in System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN

ame, Object[] parameters)

   in AXLAPIService.addPhone(AddPhoneReq addPhone1) in "PROGRAM PATH, AXLAPIService FILE"

   in CCM_AXL_Interface.Phone.addPhone(String deviceName, String modello, String

description, String commonDevice, String devicePool, String phoneButtonTemplate

, String subscribeCallingSearchSpace, String callingSearchSpace, String softKeyT

emplate, String[] lines, String[] routePartLines, String ownerUserID) in "PROGRAM PATH"

Below the method we implemented to add a phone and parameters values we used.

public string addPhone(string deviceName, string modello, string description, string commonDevice, string devicePool, string phoneButtonTemplate, string subscribeCallingSearchSpace, string callingSearchSpace, string softKeyTemplate, string[] lines, string[] routePartLines, string ownerUserID)

        {

            string uuid = "";

            try

            {

                XPhone phone = new XPhone();

                //Informazioni per associare una o più linee al dispositivo

                if (lines.Count() > 0)

                {

                    XPhoneLines xphoneLines = new XPhoneLines();

                    XPhoneLine[] phoneLineArray = new XPhoneLine[lines.Count()];

                    for (int i = 0; i < lines.Count(); i++)

                    {

                        string line = lines[i];

                        string routePart = routePartLines[i];

                        XDirn dirn = new XDirn();

                        dirn.pattern = line;

                        XFkType rpn = new XFkType();

                        rpn.Value = routePart;

                        dirn.routePartitionName = rpn;

                        XPhoneLine phoneLine = new XPhoneLine();

                        phoneLine.dirn = dirn;

                        phoneLine.index = (i + 1).ToString();

                        phoneLineArray[i] = phoneLine;

                    }

                    xphoneLines.Items = phoneLineArray;

                    phone.lines = xphoneLines;

                }

               

                //Creazione del dispositivo con relativi attributi

                if (!String.IsNullOrEmpty(devicePool))

                {

                    XFkType devPool = new XFkType();

                    devPool.Value = devicePool;

                    phone.devicePoolName = devPool;

                }

                if (!String.IsNullOrEmpty(callingSearchSpace))

                {

                    XFkType css = new XFkType();

                    css.Value = callingSearchSpace;

                    phone.callingSearchSpaceName = css;

                }

                if (!String.IsNullOrEmpty(subscribeCallingSearchSpace))

                {

                    XFkType scss = new XFkType();

                    scss.Value = subscribeCallingSearchSpace;

                    phone.subscribeCallingSearchSpaceName = scss;

                }

                if (!String.IsNullOrEmpty(commonDevice))

                {

                    XFkType cdc = new XFkType();

                    cdc.Value = commonDevice;

                    phone.commonDeviceConfigName = cdc;

                }

                if (!String.IsNullOrEmpty(phoneButtonTemplate))

                {

                    XFkType buttonTemplate = new XFkType();

                    buttonTemplate.Value = phoneButtonTemplate;

                    phone.phoneTemplateName = buttonTemplate;

                }

                if (!String.IsNullOrEmpty(ownerUserID))

                {

                    XFkType owneruserid = new XFkType();

                    owneruserid.Value = ownerUserID;

                    phone.ownerUserName = owneruserid;

                }

                if (!String.IsNullOrEmpty(softKeyTemplate))

                {

                    XFkType SoftKeyTemplate = new XFkType();

                    SoftKeyTemplate.Value = softKeyTemplate;

                    phone.softkeyTemplateName = SoftKeyTemplate;

                }

                if (!String.IsNullOrEmpty(deviceName))

                    phone.name = deviceName;

                if (!String.IsNullOrEmpty(description))               

                    phone.description = description;

                if (!String.IsNullOrEmpty(modello))

                    phone.product = modello;

               

                //Campi con valori fissi in creazione

                phone.@class = "Phone";

                phone.protocol = "SCCP";

                phone.protocolSide = "User";

                XFkType secProfile = new XFkType();

                secProfile.Value = "Universal Device Template - Model-independent Security Profile";

                phone.securityProfileName = secProfile;

                XFkType commonPhoneConfigName = new XFkType();

                commonPhoneConfigName.Value = "Standard Common Phone Profile";

                phone.commonPhoneConfigName = commonPhoneConfigName;

                XFkType locationName = new XFkType();

                locationName.Value = "Hub_None";

                phone.locationName = locationName;

                phone.useTrustedRelayPoint = "Default";

                //Invio della richiesta di inserimento del dispositivo e ricezione dell'uuid del telefono

                AddPhoneReq newPhone = new AddPhoneReq();

                newPhone.phone = phone;

                uuid = axl.addPhone(newPhone).@return;

            }

            catch (Exception e)

            {

                uuid = "ERRORE: " + e.ToString() + " " + e.Message + " " + e.InnerException;

            }

            return uuid;

        }

devicename = "SEP111111111111"

modello = "Cisco 7962"

descrizione = "SEP111111111111"

commondevice = EMPTY

devicepool = "SDP-B1-G729"

phonebuttontemplate = "Standard 7962G SCCP Not Distrurb"

subcss = EMPTY

css = EMPTY

softkeytemplate = EMPTY

lines = EMPTY

routePartLines = EMPTY

owneruserid = "test"

1 Reply 1

Geevarghese Cheria
Cisco Employee
Cisco Employee

Hi

  Can you please try adding the uuid for line.dirn. Please refer - Re: Re: Axl error code -1, message is null

Also SSL issues Using the Admin XML interface with .NET

Thanks and Regards,

Geevarghese