Blogs

If you just need a simple password control for long distance or international call and don't want to use RADIUS, you can set a parameter in service then in script ask caller to enter password if it matched the one set in IOS configuration then make the call out otherwise disconnect call. A sample script is posted in Documentation section. ...Read More

 

Hi Cisco Developers,

MSE VOIP Sample Application along with User Guide can be found under the below location.
http://developer.cisco.com/web/vgapi/docs

The goal of this sample application is to demonstrate the Integration of IVR(Interactive Voice response) and MSE(Mobility service Engine).
...Read More

 

In IOS 15.2(2)T a new option is introduced for infotag get leg_dnis and infotag get leg_ani

"callnumber" is keyword

infotag get leg_dnis
infotag get leg_ani

example:

infotag get leg_dnis callnumber leg_incoming


This option services the following purposes:

1. Return number portion only for DNIS or ANI in SIP trunk ...Read More

 

The fetchaudio attribute specifies the URI of the audio to be played while the document is being fetched. It can be used with any one of the following VXML Elements <data>; <goto>; <link>; <subdialog>; <submit>

Example: ...Read More

 

Cisco Technology Developer Partners,

Cisco is proud to announce the availability of our Cisco Unified Communications System Release 8.6 Not-For-Resale software bundle on Cisco Marketplace (Partner Login Required).

To purchase the latest Unified Communications NFR Software bundle
- Navigate to Cisco Marketplace
- Login using your Cisco.com UserID ...Read More

 

New Video Tutorial section is added for this Tcl IVR API
Video Tutorial ...Read More

 

param CLI can be mapped to IVR either in the global application mode, or as group params or under the specific dial-peer.

config t
application
service aa flash: app-b-acd-aa.tcl
param aa-pilot 7001

Having the param under the specific dial-peer provides the flexibility by having same application to work with various dial-peers in various ways. ...Read More

 



Cisco Developer Network will be presenting a CDN Developer Track at Cisco Live! London the week of January 31, 2011.

We are presenting technical sessions which highlight Application Programming interfaces (APIs) and Software Developer Kits (SDKs) for Cisco technologies such as Unified Communications, IOS, and Access Routing Technologies ¿ including the new Cisco Cius ...Read More

 

There are a few more tones can be played but are not listed in the programming guide

tn_ringback -- Plays a ring back tone
tn_congestion -- Play a congestion tone
tn_stuttdial -- plays a stutter dial tone
tn_intercept --plays a intercept tone, like busy tone

For example I have to use "leg setup $dest callinfo" for a reason ...Read More

 

Ultimate AA script


Suffering the AA menu prompt tree changing that you need to modify the script frequently? Or trying to find an AA script can fit all menu prompt tree?
You really can create an ultimate script that can fit all prompt structure
Here is the solution: ...Read More

 

I would like to shed some light on IPIPGW concept and its features.
IPIPGW Over TCL-VXML scripts:
We can deploy TCL and VXML scripts on IPIPGW,where DSP¿s are not requried to use this feature.You have to record prompt in the same codec type as you use for a call.This feature will be useful when we deploy prepaid calling cards.
IPIPGW : ...Read More

 

If we download the complete book length programming guide, the information tag leg_state and the status for that lg_xxx are missed.
But if we download chapter by chapter we can get those information.

Here is the link:

http://www.cisco.com/en/US/docs/ios/voice/tcl/developer/guide/tclivrv2_ch5.html


Leg State
The state of the call leg and the corresponding status code is reported in lg_xxx format:
Value for xxx Call Leg
000 LEG_INIT ...Read More

 



There is a perspective that TCL-IVR applications are not flexible enough for a newbie to play around. But in fact, there are lots of IVR applications that are coming inbuilt with Voice GW. You just need to copy/paste in a file editor and tweak it.
...Read More

 

Showing 13 results.
Items per Page 20
of 1

Forums

« Back to TCL-API

httpios geturl does not send header for POST

Combination View Flat View Tree View
Threads [ Previous | Next ]
I had noticed this problem already long time ago but I was hoping it would get fixed in subsequent releases.
However it still exists in 15.0(1)M4. It causes a serious issue, preventing us from completing an application (We are Cisco Registered Developer).
 
The problem is that when -query is used with 'httpios geturl', custom headers are NOT sent to the server. This prevents from using POST and Authorization, that is indispensable for our application to work. I have not found any evidence indicating that one can not set custom headers in TCL http POST.
 
Test code:
proc act_Setup {} {
 set query {Test Body}
 set hdr {Authorization {Basic uuuuu:pppp} Custom XXX}
 set url http://10.0.1.128:8000/post.cgi
 ::httpios::geturl $url -headers $hdr -command httpCallback -query $query
}
proc httpCallback {token} {
 puts -nonewline "Status: [::httpios::status $token]"
 ::httpios::cleanup $token
 call close
}
package require httpios 1.0
set fsm(INIT,ev_handoff) "act_Setup same_state"
fsm define fsm INIT
 
Debug output:
Jan 19 18:36:39.704 CET: //4256//PACK:/tcl_httpiosGeturlObjCmd:  ::httpios::geturl http://10.0.1.128:8000/post.cgi -headers Authorization {Basic uuuuu:pppp} Custom XXX -command httpCallback -query Test Body
Jan 19 18:36:39.708 CET: //4256//PACK:/tcl_httpiosGeturlObjCmd: Current NS: ::
Jan 19 18:36:39.708 CET: //4256//PACK:/tcl_httpiosGeturlObjCmd: URL: http://10.0.1.128:8000/post.cgi
Jan 19 18:36:39.708 CET: //-1//PACK:/httpios_get_custom_headers: No Of Headers: 4
Jan 19 18:36:39.708 CET: //-1//PACK:/httpios_get_custom_headers: Authorization: Basic uuuuu:pppp
Custom: XXX

Received by server:
POST /post.cgi HTTP/1.1
Host: 10.0.1.128:8000
Content-Length: 9
Content-Type: application/x-www-form-urlencoded
Connection: close
Accept: text/vxml, text/x-vxml, application/vxml, application/x-vxml, application/voicexml, application/x-voicexml, text/plain, text/html, audio/basic, audio/wav, multipart/form-data, application/octet-stream
User-Agent: Cisco-IOS-C2801/15.0
 
Test Body
 
Again, when using GET operation, there is no problem and custom header are correctly sent, allowing authorization to work.

 

I noticed this same issue on a VG over a year ago however I only noticed it while doing a HTTP POST. Is this still an issue or has this been resolved?
 
I had noticed this problem already long time ago but I was hoping it would get fixed in subsequent releases.
However it still exists in 15.0(1)M4. It causes a serious issue, preventing us from completing an application (We are Cisco Registered Developer).
 
The problem is that when -query is used with 'httpios geturl', custom headers are NOT sent to the server. This prevents from using POST and Authorization, that is indispensable for our application to work. I have not found any evidence indicating that one can not set custom headers in TCL http POST.
 
Test code:
proc act_Setup {} {
 set query {Test Body}
 set hdr {Authorization {Basic uuuuu:pppp} Custom XXX}
 set url http://10.0.1.128:8000/post.cgi
 ::httpios::geturl $url -headers $hdr -command httpCallback -query $query
}
proc httpCallback {token} {
 puts -nonewline "Status: [::httpios::status $token]"
 ::httpios::cleanup $token
 call close
}
package require httpios 1.0
set fsm(INIT,ev_handoff) "act_Setup same_state"
fsm define fsm INIT
 
Debug output:
Jan 19 18:36:39.704 CET: //4256//PACK:/tcl_httpiosGeturlObjCmd:  ::httpios::geturl http://10.0.1.128:8000/post.cgi -headers Authorization {Basic uuuuu:pppp} Custom XXX -command httpCallback -query Test Body
Jan 19 18:36:39.708 CET: //4256//PACK:/tcl_httpiosGeturlObjCmd: Current NS: ::
Jan 19 18:36:39.708 CET: //4256//PACK:/tcl_httpiosGeturlObjCmd: URL: http://10.0.1.128:8000/post.cgi
Jan 19 18:36:39.708 CET: //-1//PACK:/httpios_get_custom_headers: No Of Headers: 4
Jan 19 18:36:39.708 CET: //-1//PACK:/httpios_get_custom_headers: Authorization: Basic uuuuu:pppp
Custom: XXX

Received by server:
POST /post.cgi HTTP/1.1
Host: 10.0.1.128:8000
Content-Length: 9
Content-Type: application/x-www-form-urlencoded
Connection: close
Accept: text/vxml, text/x-vxml, application/vxml, application/x-vxml, application/voicexml, application/x-voicexml, text/plain, text/html, audio/basic, audio/wav, multipart/form-data, application/octet-stream
User-Agent: Cisco-IOS-C2801/15.0
 
Test Body
 
Again, when using GET operation, there is no problem and custom header are correctly sent, allowing authorization to work.

 

Hi,

if you don't use -query with 'httpios geturl', will you able to send customer headers.

Thanks,
Raghavendra

if you don't use -query with 'httpios geturl', will you able to send customer headers.



 
Excuse me, and how one would be supposed to do POST without using -query ?
 
From http TCL manual:
This flag causes ::http::geturl to do a POST request that passes the query to the server. The query must be an x-url-encoding formatted query. The::http::formatQuery procedure can be used to do the formatting.

Again, the question is:
 
Using POST method with httpio AND Basic authentication appears not to be possible

Collateral


No files available