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

Passing a parameter with an HTTP Trigger

Is it possible to pass a parameter in an HTTP trigger? For example, we have a script which fetches some CSQ statistics and generates some XML for display on an IP Phone. If stats for three difference CSQs are required, it would be useful to pass the CSQ name in the HTTP trigger, and have just one script and .jsp page.

1 REPLY
Silver

Re: Passing a parameter with an HTTP Trigger

I have since found out that a "Get HTTP Contact" step will extract the parameters from an HTTP trigger formatted like a GET request, e.g.

http://ipcc:8080/stats?CSQ=test

The CSQ value is then mapped to a parameter name as part of a "Send JSP" step. This can be used in the resultant XML output. However, I can't see how to use the value in the url in the addHeader response to provide automatic refresh using the correct URL.

Ideally I need to integrate '<%= parameters.get("QueueName") %>' into the **** position, but it doesn't work as a simple cut-and-paste.

<%@ page language="java" import="java.util.*" %>

scope="request"/>

<%

response.addHeader("Refresh","60; url=http://ipcc01:8080/stats?CSQ=****");

response.setContentType("text/xml");

%>

<%= parameters.get("QueueName") %> CSQ Stats

...

333
Views
0
Helpful
1
Replies
CreatePlease to create content