Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

UCCX8.5 send HTTP trigger? for another server application

We have an Outage Management System (OMS) that will accept an HTTP string that creates a new outage record. So, if I enter the included example into any browser window in our network, it will create a new OMS record. 

For customers dialing into our phone system, I want them to be able to "report" an outage by building this http string and sending it to our OMS server.  I have a script that prompts the caller for their account number.  I need to add this account number onto the end of the http string (in the example, $CustomerAccount), and then send this string to a browser to create a new OMS record.  The HTTP string:

//OMSServerName/outage/main/xdoReqHandler?beanName=AutomatedDevice&methodName=get&accountNumber=$CustomerAccount

can someone explain to me if any of the Http Contact steps would be able to do this?  In my attached script, I have tried using the Http Redirect step.  My resulting error is:

Am I using these steps as designed? (with the error - apparently not).

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Re: UCCX8.5 send HTTP trigger? for another server application

change

+ "$CustomerAccount "

to

+ CustomerAccount

CustomerAccount is the name of the variable, so you do not need to put it in " ", and you do not need a $.

Alternatively use the parameters section of the Create URL Document properties to add the parameters for you ...

Brian

Please rate helpful posts

11 REPLIES
Silver

Re: UCCX8.5 send HTTP trigger? for another server application

Use the 'Create URL Document' step instead...

TestDoc = Create URL Document("http://www.testurl.com/")

Set HttpResponseStr = (String)TestDoc

Brian

Re: UCCX8.5 send HTTP trigger? for another server application

I have never found a use for the Create URL Document step.

Your example could be reduced to the Set step alone, and the cast is unnecessary, because the Set step will auto cast.

Set http_resp = URL[http://www.google.com/search?q=duckfatfries]

Is all you need for an HTTP GET.

For an HTTP POST, it is:

Set http_resp = URL[http://www.google.com/search, TEXT[q=duckfatfries]]

Not that I think google takes search queries via HTTP POST, but it illustrates the method easily.

One thing to note about the HTTP POST method is that you cannot set any HTTP headers. So no file uploads, just form submission type stuff.

Sent from Cisco Technical Support iPhone App

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Silver

Re: UCCX8.5 send HTTP trigger? for another server application

Excellent Anthony, that makes it easier

New Member

UCCX8.5 send HTTP trigger? for another server application

Thank you Anthony for the reply.  I'm not entirely clear on some of the info, if I may ask more questions, please.

In your example, http_resp is a string?  Since I don't want to go through google (tested, my http string (not using scripting here, direct test) will not work in a google search), i am trying the following:

Set http_resp=URL[http://OMSServerName/outage/main/xdoReqHandler?beanName=AutomatedDevice&methodName=get&accountNumber=$CustomerAccount]

correct?  I did run it this way, and no new outage record was created on our OM server.

Can you please expand on the comment -

the cast is unnecessary, because the Set step will auto cast.

does this mean that using the Set command will insert the above URL into the default browser and it will go (run) without any other intervention?

thank you

-wes.

Re: UCCX8.5 send HTTP trigger? for another server application

Casting has to do with data types. Don't worry about it, it's not needed in your efforts.

Yes http_resp is a string. You will want to inspect the string to see if a success message or an errr message was returned.

Because you are pointing at the web server via non fully qualified domain name, I doubt UCCX can resolve that name. Try again with IP or FQDN.

Also, I see you have the customer account number looking like a variable place holder and not actually giving an account number. Try replacing that dollar sign and following text with an actual account number. Hard code it for now.

Good luck and happy HTTP GETing!

Sent from Cisco Technical Support iPhone App

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

UCCX8.5 send HTTP trigger? for another server application

anthony,

you make a good point to check for success or error on the string. how can i evaluate/see the response code?

I really stripped my script to test.  Still no luck, yet.  i have masked the IP for security reasons and dummied AccountNumber, but here is a snapshot of what i'm trying.  i have tried variations of removing the http with and without the //'s. 

I did get on with the admin account on our uccx server and I can ping this ip address successfully.  where does the browser reside that actually received this URL from the Set command - server or enduser?

and additional recommendations?  I feel this is so close, and I appreciate your input. 

Re: UCCX8.5 send HTTP trigger? for another server application

I'll take a look at the attachment when I get to a computer. The mobile app doesn't show embedded images. Crap!

But to answer your immediate questions:

1. Set yourself up with a new script that has a single string variable (http_resp) and a single set step (http_resp = URL[...]) and then press F10 to debug the script. When you have the End step highlighted in red, look at the value of the http_resp variable. You'll have to look through the response body to get an answer. There's no HTTP headers to look at. So an HTTP 200 is not what you'll see.

2. The "browser" is on UCCX. it's actually an instance of a Java class, and not a browser in the IE, FF, Chrome sense. But for all intents and purposes, you can think of it as a browser on UCCX. Think about how the client, a caller, would have a browser? Make sense?

Sent from Cisco Technical Support iPhone App

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Re: UCCX8.5 send HTTP trigger? for another server application

Welcome to the world of Active Debugging.

Delete the Accept and Terminate steps, and the Press F10 to start the debugger.  Press F10 again, and again, until the End step it highlighted in Red.  At that time, look down at your http_resp variable and inspect its value.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

UCCX8.5 send HTTP trigger? for another server application

Brian,

I was able to make your recomendation work out.  thank you.  I used my HTTP string with a fixed Account Number value and it generated a new record in our OMS server!  Just what I wanted.  My next step is to use a variable for the Account Number so I can capture it from my scripting.  can you comment on how a variable string may be used in your example?  here is what I have so far:

(I have changed the OMSServerName and Account Number as obscure to protect my records)

with an actual IP, and valid account Number in the set statement, the resulting message in the sendHTTPString name:

U"\r\n  \r\n    \r\n      Account number invalid\r\n      \r\n    \r\n  \r\n"

Again, if i input the account number inside the docURL variable instead of the $CustomerAccount it works!  The $CustomerAccount is not getting translated in this environment?

Here is the variable name and value when I debug the script:

Should I expect to see the actual account number in this value?

thank you for the help

-Wes.

Silver

Re: UCCX8.5 send HTTP trigger? for another server application

change

+ "$CustomerAccount "

to

+ CustomerAccount

CustomerAccount is the name of the variable, so you do not need to put it in " ", and you do not need a $.

Alternatively use the parameters section of the Create URL Document properties to add the parameters for you ...

Brian

Please rate helpful posts

New Member

UCCX8.5 send HTTP trigger? for another server application

Thank you BOTH Brian and Anthony for your willingness to help educate all of us in the posts/forums.  Your feedback has been very much appreciated!!!!

917
Views
5
Helpful
11
Replies
CreatePlease to create content