cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
958
Views
0
Helpful
3
Replies

Add or Update campaign API is not accepting 0 as prefix of calling number like 04466 and getting 400 bad request

Hi,

 

I'm working on Unified Contact Center Express (UCCX) System version: 11.6.2.10000-8 Campaign Management Application.

I'm trying to update an IVR Campaign from a web application using the following API URL:

http://192.168.1.106/adminapi/campaign/3

along with following data

{

"campaignName": "vie_unitlink",
"enabled": false,
"description": "vie_unitlink",
"startTime": "00:00",
"endTime": "23:59",
"timeZone": "",
"campaignType": "IVR",
"dialerType": "PREDICTIVE",
"pendingContacts": 0,
"campaignId": 3,
"typeSpecificInfo": {

"obIvrPredictive": {

"campaignCallingNum": "06266",
"maxDialAttempts": 1,
"callbackTimeLimit": 15,
"treatLowVolAsVoice": true,
"noAnswerRingLimit": 15,
"abandonedCallWaitTime": 2,
"retryNoAnswerDelay": 60,
"retryBusySignalDelay": 60,
"retryCustAbandonedDelay": 0,
"retryDialerAbandonedDelay": 0,

"applicationTrigger": {

"@name": "6266",
"refURL": "http://192.168.1.106/adminapi/trigger/6266"

},
"numDedicatedPorts": 3,
"linesPerPort": 1.0,
"ansMachineTreatment": "TRANSFER_TO_IVR",
"maxLinesPerPort": 3.0,
"predictiveCorrectionPace": 100,
"predictiveGain": 1.0,
"callAbandonLimit": 3.0

}

}

}

with following headers

Authorization: Basic 
Content-Type: application/json
Accept: application/json

 

I'm sending the Campaign Calling Number in data with a 0 prefix like 06266 "campaignCallingNum": "06266",

But I'm getting following error

"The remote server returned an error: (400) Bad Request."

 

But if I'm hitting same API URL with the same data from postman I'm getting this following error

{
    "apiError": [
        {
            "errorData""",
            "errorMessage""\nException Description: An error occurred marshalling the object\nInternal Exception: org.xml.sax.SAXParseException; cvc-pattern-valid: Value '06266' is not facet-valid with respect to pattern '(\\+)?[1-9]\\d{0,14}' for type '#AnonType_campaignCallingNumobIVRandAgentcommonInfo'.",
            "errorType""InvalidInput"
        }
    ]
}
 
And when I'm updating same campaign with Campaign Calling Number 06266 from UCCX admin portal, Campaign is updating successfully.
3 Replies 3

At first reaction is that this is a bug in the API implementation which for some reason expects all numbers to start with 1-9. One thing you might try, but doubt it will work, will be to escape the first zero with "\04466" and see if that is accepted. If that doesn't work, I would open a TAC case and see what they tell you.

 

david

Hi @david.macias 

 

I tried your suggestion, but this isn't working.

I'm getting following error:

{
    "apiError": [
        {
            "errorData""Bad Request",
            "errorMessage""The request could not be understood by the server due to malformed syntax",
            "errorType""400"
        }
    ]
}
 
Attaching the screenshot of the data
 "typeSpecificInfo": {
    "obIvrPredictive": {
      "campaignCallingNum": "\06266",
      "maxDialAttempts"1,
      "callbackTimeLimit"15,
      "treatLowVolAsVoice"true,
      "noAnswerRingLimit"15,
      "abandonedCallWaitTime"2,
      "retryNoAnswerDelay"60,
      "retryBusySignalDelay"60,
      "retryCustAbandonedDelay"0,
      "retryDialerAbandonedDelay"0,
      "applicationTrigger": {
        "@name""6266",
        "refURL""http://192.168.1.106/adminapi/trigger/6266"
      },
      "numDedicatedPorts"3,
      "linesPerPort"1.0,
      "ansMachineTreatment""TRANSFER_TO_IVR",
      "maxLinesPerPort"3.0,
      "predictiveCorrectionPace"100,
      "predictiveGain"1.0,
      "callAbandonLimit"3.0
    }
  }
 
"campaignCallingNum": "\06266", this isn't accepted.

I was afraid it was not going to work.  You more than likely have a bug in your hands and need to contact Cisco for support.

 

david