cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1405
Views
0
Helpful
1
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Laith Abbas on 16-07-2013 11:00:09 AM
Hi, 

I am trying to use the getLine method with version 9.1. I am giving it a pattern but I keep getting the exception "Item not valid: the specified line was not found"

I am wondering what am I doing wrong Here is the code that I am trying to execute, I hope that somebody will help.

 public static void callGetLine(AXLAPIService service, string ext)       
{           
      GetLineReq req = new GetLineReq();
      req.ItemsElementName = new ItemsChoiceType55[1];
      req.ItemsElementName[0] = ItemsChoiceType55.pattern;
      req.Items = new object[1];
      req.Items[0] = ext; 
      GetLineRes res = service.getLine(req); 
      GetLineResReturn ret = res.@return;
  }
Comments
asdfdddd
Community Member

Hello Laith,

Even though the thread isn't the newest I found it and had the same problem.

First of all: Since 9.1 (maybe 8.6 as well), you need to specify RoutePartitionName when trying to get a line.

If you still don't get any replies, you might be running in the same problem as I did, as well. I never got any results while specifying a correct pattern AND the correct route partition name.

So to figure out what the system is expecting from me, I tried to run listLine. The SOAP-Request looks like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/9.1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:listLine sequence="10">
         <searchCriteria>
            <pattern>MY_PHONE_NUMBER</pattern>
         </searchCriteria>
         <returnedTags>
            <pattern/>
            <description/>
            <usage/>
            <routePartitionName/>
            <aarNeighborhoodName/>
            <aarDestinationMask/>
            <aarKeepCallHistory/>
            <aarVoiceMailEnabled/>
            <callPickupGroupName/>
            <autoAnswer/>
            <networkHoldMohAudioSourceId/>
            <userHoldMohAudioSourceId/>
            <alertingName/>
            <asciiAlertingName/>
            <presenceGroupName/>
            <shareLineAppearanceCssName/>
            <voiceMailProfileName/>
            <patternPrecedence/>
            <releaseClause/>
            <hrDuration/>
            <hrInterval/>
            <cfaCssPolicy/>
            <defaultActivatedDeviceName/>
            <parkMonForwardNoRetrieveDn/>
            <parkMonForwardNoRetrieveIntDn/>
            <parkMonForwardNoRetrieveVmEnabled/>
            <parkMonForwardNoRetrieveIntVmEnabled/>
            <parkMonForwardNoRetrieveCssName/>
            <parkMonForwardNoRetrieveIntCssName/>
            <parkMonReversionTimer/>
            <partyEntranceTone/>
            <allowCtiControlFlag/>
            <rejectAnonymousCall/>
         </returnedTags>

      </ns:listLine>
   </soapenv:Body>
</soapenv:Envelope>

Here is the response plain (values changed for privacy):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:listLineResponse sequence="10" xmlns:ns="http://www.cisco.com/AXL/API/9.1">
         <return>
            <line uuid="{898FCBDF-1000-325D-A13C-966AE25D477B}">
               <pattern>MYLINENUMBER</pattern>
               <description>MYDESCRIPTION</description>
               <usage>Device</usage>
               <routePartitionName uuid="{94F7DB3A-5854-07E9-8F14-CB8C19A48834}">MYPARTITION</routePartitionName>
               <aarNeighborhoodName/>
               <aarDestinationMask/>
               <aarKeepCallHistory>true</aarKeepCallHistory>
               <aarVoiceMailEnabled>false</aarVoiceMailEnabled>
               <callPickupGroupName/>
               <autoAnswer>Auto Answer Off</autoAnswer>
               <networkHoldMohAudioSourceId/>
               <userHoldMohAudioSourceId/>
               <alertingName>Some Alerting Name</alertingName>
               <asciiAlertingName>Some Alerting Name</asciiAlertingName>
               <presenceGroupName uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence group</presenceGroupName>
               <shareLineAppearanceCssName uuid="{A03F593C-FE6F-6482-EDF4-0E480512F202}">MYCSS</shareLineAppearanceCssName>
               <voiceMailProfileName uuid="{00000000-1111-0000-0000-000000000000}">NoVoiceMail</voiceMailProfileName>
               <patternPrecedence>Default</patternPrecedence>
               <releaseClause>No Error</releaseClause>
               <hrDuration/>
               <hrInterval/>
               <cfaCssPolicy>Use System Default</cfaCssPolicy>
               <defaultActivatedDeviceName/>
               <parkMonForwardNoRetrieveDn/>
               <parkMonForwardNoRetrieveIntDn/>
               <parkMonForwardNoRetrieveVmEnabled>false</parkMonForwardNoRetrieveVmEnabled>
               <parkMonForwardNoRetrieveIntVmEnabled>false</parkMonForwardNoRetrieveIntVmEnabled>
               <parkMonForwardNoRetrieveCssName/>
               <parkMonForwardNoRetrieveIntCssName/>
               <parkMonReversionTimer/>
               <partyEntranceTone>Default</partyEntranceTone>
            </line>
         </return>
      </ns:listLineResponse>
   </soapenv:Body>
</soapenv:Envelope>

Strange thing is, if I run my GetLine request again, it worked. Using the same parameters! No idea why it didn't before. Maybe the route partition has to be in a cache, which now is after that I've listed them.

So here's the request in Java code I'm using. I don't know what language your code is in. To me, it looks like C#. I'm sure you can translate the code which looks like:

public static void getLine(String phoneNumber, String partition) {
    GetLineReq req = new GetLineReq();
    req.setPattern(phoneNumber);
    XFkType routePartitionName = new XFkType();
    routePartitionName.setValue("MYPARTITION");
    req.setRoutePartitionName(new JAXBElement(QName.valueOf("routePartitionName"), XFkType.class, routePartitionName));
    GetLineRes res;

    res = stub.getLine(req);
    GetLineRes.Return ret = res.getReturn();
}

I don't know whether XFkType is specific to JAX/WS. Maybe you can just simply use string as the partition's name.

Hope it helps

regards

Tobias

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links