[asterisk-bugs] [Asterisk 0012920]: [patch] Added CURL() Function Timeout Argument

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Jul 14 08:19:14 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12920 
====================================================================== 
Reported By:                davevg
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12920
Category:                   Functions/func_curl
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 124707 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-23-2008 16:12 CDT
Last Modified:              07-14-2008 08:19 CDT
====================================================================== 
Summary:                    [patch] Added CURL() Function Timeout Argument
Description: 
If you have a long running web script the CURL function is currently hard
coded to timeout after 180 seconds.  This patch adds a 3rd parameter to the
function which when set overrides the 180 second default.

Example usage:
exten => 1,1,Set(foo=${CURL(http://127.0.0.1/test.pl,,3)})
Which will set a timeout of 3 seconds on the CURL call.
====================================================================== 

---------------------------------------------------------------------- 
 davevg - 07-14-08 08:19  
---------------------------------------------------------------------- 
Did an svn update this morning on trunk, and I no longer receive any
crashes.  The only issue that remains is the options set by
Set(CURLOPT()=)) seem to be ignored.
I've tried the following options and looked at the apache and squid proxy
logs with no change:
exten => 77,1,Answer()
exten => 77,n,NoOp(${EPOCH})
exten => 77,n,Set(CURLOPT(httptimeout)=10)
exten => 77,n,Set(CURLOPT(conntimeout)=10)
exten => 77,n,Set(CURLOPT(proxy)=192.168.175.97)
exten => 77,n,Set(CURLOPT(proxytype)=http)
exten => 77,n,Set(CURLOPT(proxyport)=3128)
exten => 77,n,Set(CURLOPT(referer)=127.0.0.1)
exten => 77,n,Set(CURLOPT(useragent)="Mozilla/4.0 test")
exten => 77,n,Set(foo=${CURL(http://192.168.175.97/nascar/test.pl)})
exten => 77,n,NoOp(${EPOCH})
exten => 77,n,Hangup 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-14-08 08:19  davevg         Note Added: 0090194                          
======================================================================




More information about the asterisk-bugs mailing list