[asterisk-users] asterisk trunk CURL hangs in the dialplan

Eric Chamberlain eric at rf.com
Mon Nov 23 21:30:10 CST 2009


We've encountered a strange issue with the trunk version of asterisk.

Our dialplan makes CURL calls and occasionally CURL stops working.

The dialplan looks something like this:

[macro-curl]
; ${ARG1} CURL URL
; ${ARG2} CURL POST

exten => s,1,NoOp(CURL)
...
exten => s,n(post),Set(RF_CURL_POST=userID=${RF_DIALER_USERID}&password=${RF_PASSWORD}&${ARG2})
exten => s,n,Set(CURLOPT(httptimeout)=5)
exten => s,n,Set(CURLOPT(conntimeout)=5)
exten => s,n,NoOp(CURL(${RF_URL}/${ARG1}?${RF_CURL_POST}))
exten => s,n,Set(RF_CURL_RESPONSE=${CURL(${RF_URL}/${ARG1},${RF_CURL_POST})})

At this point, CURL either works or it will occasionally hang for a few minutes.  tcpdump doesn't show any traffic from the asterisk box to the web server.

Something seems to be causing CURL to hang, before it sends out the http request and the CURLOPT timeouts have no effect on the behavior.

Once CURL hangs, any additional calls to CURL also hang.

After a few minutes, tcpdump will show the CURL traffic going to the web server.

And CURL begins functioning normally for a while.


Has anyone else seen this?  Or have any suggestions on how to debug this?

--
Eric Chamberlain, Founder
RF.com - http://RF.com/










More information about the asterisk-users mailing list